Get a policy
const url = 'https://example.com/api/v1/policies/example';const options = { method: 'GET', headers: {cookie: 'bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E'}};
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://example.com/api/v1/policies/example \ --cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3EAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the policy.
Responses
Section titled “Responses”OK.
A policy as the management API shows it.
object
A permission, prohibition or obligation.
object
E.g. use, read, write.
A condition of a rule, e.g. bl:role isAnyOf [climate_optimizer].
object
bl:membership, bl:role, bl:participant, odrl:dateTime,
odrl:purpose or bl:signedRequests.
eq, isAnyOf, isNoneOf, lt, lteq, gt or gteq.
A string, a list of strings, a date-time or a boolean.
A permission, prohibition or obligation.
object
E.g. use, read, write.
A condition of a rule, e.g. bl:role isAnyOf [climate_optimizer].
object
bl:membership, bl:role, bl:participant, odrl:dateTime,
odrl:purpose or bl:signedRequests.
eq, isAnyOf, isNoneOf, lt, lteq, gt or gteq.
A string, a list of strings, a date-time or a boolean.
A permission, prohibition or obligation.
object
E.g. use, read, write.
A condition of a rule, e.g. bl:role isAnyOf [climate_optimizer].
object
bl:membership, bl:role, bl:participant, odrl:dateTime,
odrl:purpose or bl:signedRequests.
eq, isAnyOf, isNoneOf, lt, lteq, gt or gteq.
A string, a list of strings, a date-time or a boolean.
The policy as ODRL, as it goes into the catalog.
object
The policy in a sentence, for people.
Example generated
{ "id": "example", "title": "example", "description": "example", "permissions": [ { "action": "example", "constraints": [ { "left_operand": "example", "operator": "example", "right_operand": "example" } ] } ], "prohibitions": [ { "action": "example", "constraints": [ { "left_operand": "example", "operator": "example", "right_operand": "example" } ] } ], "obligations": [ { "action": "example", "constraints": [ { "left_operand": "example", "operator": "example", "right_operand": "example" } ] } ], "odrl": {}, "summary": "example"}No valid session, DPoP-bound token or API key.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}Not found.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}