Preview release.These docs are a work in progress. Pages are still being written, links may break, and structure may shift without notice. Treat everything here as a draft and report issues onGitHub.
Visible dataset policies (ODRL JSON-LD)
GET
/metadata/policies
const url = 'https://data.example.test/metadata/policies';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://data.example.test/metadata/policies \ --header 'Authorization: Bearer <token>'Returns the ODRL access-policy documents for datasets visible to the calling principal.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”ODRL JSON-LD policy collection
Media typeapplication/ld+json
object
Examples
Examplepolicy_collection
Dataset ODRL policy collection.
{ "@context": { "dcterms": "http://purl.org/dc/terms/", "odrl": "http://www.w3.org/ns/odrl/2/", "odrl:action": { "@type": "@id" }, "odrl:assigner": { "@type": "@id" }, "odrl:target": { "@type": "@id" }, "odrl:uid": { "@type": "@id" } }, "@graph": [ { "@context": { "dcterms": "http://purl.org/dc/terms/", "odrl": "http://www.w3.org/ns/odrl/2/", "odrl:action": { "@type": "@id" }, "odrl:assigner": { "@type": "@id" }, "odrl:target": { "@type": "@id" }, "odrl:uid": { "@type": "@id" } }, "@id": "#policy-social_registry-offer", "@type": "odrl:Offer", "odrl:assigner": { "@id": "did:web:data.example.test" }, "odrl:permission": [ { "odrl:action": { "@id": "odrl:use" }, "odrl:assigner": { "@id": "did:web:data.example.test" }, "odrl:target": { "@id": "#dataset-social_registry" } } ], "odrl:uid": "#policy-social_registry-offer" } ], "@id": "https://data.example.test/metadata/policies", "dcterms:isPartOf": "https://data.example.test/metadata/dcat.jsonld", "dcterms:title": "Dataset access policies"}Missing or invalid bearer credential.
Media typeapplication/problem+json
RFC 9457 Problem Details, returned for every non-2xx response.
object
code
required
string
detail
required
string
request_id
required
string
status
required
integer format: int32
title
required
string
type
required
string format: uri
key
additional properties
any
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}Authenticated principal lacks the scope required for this operation.
Media typeapplication/problem+json
RFC 9457 Problem Details, returned for every non-2xx response.
object
code
required
string
detail
required
string
request_id
required
string
status
required
integer format: int32
title
required
string
type
required
string format: uri
key
additional properties
any
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}default
Section titled “default”Problem Details error response.
Media typeapplication/problem+json
RFC 9457 Problem Details, returned for every non-2xx response.
object
code
required
string
detail
required
string
request_id
required
string
status
required
integer format: int32
title
required
string
type
required
string format: uri
key
additional properties
any
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}