Get An Entity By Id
To get an entity, we need to make the following HTTP request
get
/api/v1/{entity-type}/id
Parameters
Path
entity-type*
The type of entity to retrieve
id*
The ID of the entity to retrieve
Header
authorization*
Set to
Bearer {access-token}
if roles in schema is not anonymous. Else authorization can be emptycontent-type*
Set to
application/json
to retrieve in json. Other allowed values include application/vc+ld+json
, application/ld+json
, application/pdf
, image/svg+xml
, text/html
template-key
template-key
is an optional header, it can be used for pdf/html/svg
content type. It should be one of the keys mentioned in certificateTemplates in the schema config.template
template
is an optional header where we can pass the URL of the external template directly in the API. To use this enable_external_templates
ENV needs to be enabledResponses
200: OK
Response when content-type is application/json
Important variables in the response body:
Field | Type | Description |
---|---|---|
_osState/{field} | String | State of an attestable field. Can be DRAFT (when it has not been sent for attestation), ATTESTATION_REQUESTED (when sent for attestation), PUBLISHED (when successfully attested) and REJECTED (when rejected by the attestor) |
_osOwner | String | User ID of the entity in Keycloak. |
Last modified 5mo ago