Skip to content

Commit

Permalink
Added discovery endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Feb 16, 2023
1 parent c590a3d commit 7b6380b
Showing 1 changed file with 74 additions and 1 deletion.
75 changes: 74 additions & 1 deletion spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ swagger: '2.0'
info:
title: Open Cloud Mesh API
description: Open Cloud Mesh Open API Specification.
version: 1.0.0
version: 2.0.0
x-logo:
url: logo.png
schemes:
Expand Down Expand Up @@ -30,6 +30,19 @@ parameters:
the HAL navigation links (e.g. `_links.next.href`) to paginate. These
links enable the possibility to use vendor specific pagination.
paths:
/ocm-provider:
get:
summary: Discovery endpoint
description: >
This endpoint returns a number of properties used to discover the capabilities
offered by a remote cloud storage. The endpoint is named `/ocm-provider` owing
to already established practices and constraints with the main cloud storages
that implement OCM (see https://github.com/cs3org/OCM-API/pull/37#issuecomment-435875108
for more details).
responses:
"200":
schema:
$ref: "#/definitions/Discovery"
/shares:
post:
summary: Create a new share
Expand Down Expand Up @@ -214,6 +227,66 @@ definitions:
(e.g. no use of special characters) providing more information
on the cause of the error.
example: RESOURCE_NOT_FOUND
Discovery:
type: object
required:
- enabled
- apiVersion
- endpoint
- resourceTypes
properties:
enabled:
type: boolean
description: Whether the OCM service is enabled at this endpoint
apiVersion:
type: string
description: The OCM API version this endpoint supports
example: 2.0alpha
endpoint:
type: string
description: The URI of the OCM API available at this endpoint
example: https://my-cloud-storage.org/ocm
provider:
type: string
description: A friendly branding name of this endpoint
example: MyCloudStorage
resourceTypes:
type: array
description: A list of all supported resource types with their access protocols
items:
type: object
properties:
name:
type: string
description: |
A supported resource type (file, folder, calendar, contact, ...)
example: file
shareTypes:
type: array
description: The supported recipient share types
items:
type: string
enum: ["user", "group"]
protocols:
type: object
description: |
The supported protocols to access shares at this endpoint
anyOf:
- properties:
webdav:
type: string
description: The top-level WebDAV endpoint
example: /ocm
- properties:
webapp:
type: string
description: The top-level endpoint for web apps
example: /
- properties:
datatx:
type: string
description: The top-level endpoint for data transfers
example: /
NewShare:
type: object
required:
Expand Down

0 comments on commit 7b6380b

Please sign in to comment.