Skip to content

Commit 91c1889

Browse files
committed
ResourceDiscovery: This patch adds a new resource discovery mechanism.
The intention is to allow for a way to advertise the existence of resources at the OCM server. Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent 3994f34 commit 91c1889

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

IETF-RFC.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ The JSON response body offered by the Discoverable Server SHOULD contain the fol
243243
* REQUIRED: apiVersion (string) - The OCM API version this endpoint supports. Example: `"1.2.0"`
244244
* REQUIRED: endPoint (string) - The URI of the OCM API available at this endpoint. Example: `"https://my-cloud-storage.org/ocm"`
245245
* OPTIONAL: provider (string) - A friendly branding name of this endpoint. Example: `"MyCloudStorage"`
246+
* OPTIONAL: resourceAdvertismentUri (string) - A URI that, if accessed, will advertise available resources at this endpoint.
246247
* REQUIRED: resourceTypes (array) - A list of all resource types this server supports in both the Sending Server role and the Receiving Server role, with their access protocols. Each item in this list should
247248
itself be an object containing the following fields:
248249
* name (string) - A supported resource type (file, folder, calendar, contact, ...).
@@ -644,6 +645,83 @@ A third-party Directory Service is a back-end service used to federate multiple
644645
}
645646
```
646647

648+
# Appendix D: Resource Discovery Service
649+
650+
An OCM Server MAY publicly advertise available resources. This is done via the `resourceAdvertismentUri`. It is expected to expose, via anonymous HTTP GET, a JSON document with the following format:
651+
652+
* REQUIRED: `server` - a human-readable name for the Servers providing the Resource Discovery Service
653+
* REQUIRED: `resources` - a JSON array of objects to describe the list of OCM Servers with the following fields:
654+
* OPTIONAL: `displayName` - the human-readable name of the OCM Server
655+
* OPTIONAL: `publicUrl` - an public URL that can be used for direct download via anonymous HTTP GET
656+
* OPTIONAL: `rocrate` - an embedded JSON object following the [ROCRATE](https://www.researchobject.org/ro-crate/specification/1.1/data-entities.html) data-entities specification.
657+
* REQUIRED: `id` - the unique identifier of the resource at the OCM Server
658+
Example:
659+
```json
660+
{
661+
"server": "OCM Server 1",
662+
"resources": [
663+
{
664+
"publicUrl": "https://ocm-server-1.fqdn/s/1234567890abcdef",
665+
"displayName": "Public Dataset 1",
666+
"id": "1234567890abcdef",
667+
"rocrate": {
668+
"@context": "https://w3id.org/ro/crate/1.1/context",
669+
"@graph": [
670+
{
671+
"@id": "ro-crate-metadata.json",
672+
"@type": "CreativeWork",
673+
"conformsTo": {
674+
"@id": "https://w3id.org/ro/crate/1.1"
675+
},
676+
"about": {
677+
"@id": "./"
678+
}
679+
},
680+
{
681+
"@id": "./",
682+
"@type": "Dataset",
683+
"name": "A RO-Crate embedded in OCM"
684+
},
685+
{
686+
"@id": "https://ocm-server-1.fqdn/s/1234567890abcdef",
687+
"@type": "File",
688+
"name": "Public data file"
689+
}
690+
]
691+
}
692+
},
693+
{
694+
"displayName": "Private Data Set 1",
695+
"id": "0987654321fedcba",
696+
"rocrate": {
697+
"@context": "https://w3id.org/ro/crate/1.1/context",
698+
"@graph": [
699+
{
700+
"@id": "ro-crate-metadata.json",
701+
"@type": "CreativeWork",
702+
"conformsTo": {
703+
"@id": "https://w3id.org/ro/crate/1.1"
704+
},
705+
"about": {
706+
"@id": "./"
707+
}
708+
},
709+
{
710+
"@id": "./",
711+
"@type": "Dataset",
712+
"name": "A RO-Crate embedded in OCM"
713+
},
714+
{
715+
"@id": "0987654321fedcba",
716+
"@type": "File",
717+
"name": "Private data file"
718+
}
719+
]
720+
}
721+
}
722+
]
723+
}
724+
```
647725

648726
# Acknowledgements
649727

spec.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ components:
342342
type: string
343343
description: A friendly branding name of this endpoint
344344
example: MyCloudStorage
345+
resourceadvertismenturi:
346+
type: string
347+
description: the uri of the ocm resources advertised at this endpoint
348+
example: https://my-cloud-storage.org/ocm/resources
345349
resourceTypes:
346350
type: array
347351
description: |

0 commit comments

Comments
 (0)