Auth is required for this API meaning that you must supply a Bearer Token via an Authorization header or an API Key via an Authorization or Api-Key header.
Errors
If an error occours you will receive a HTTP status code along with an API error code and an error message in the response body.
JSON example:
{"error": {"code":"Unauthorized","message":"Authorization has been denied for this request." }}
Get by id
Get a specific relation by its integer ID.
URL: /relation/{id}
Method: GET
Permissions required : Access to Settings section of the Umbraco Backoffice
Success Response
Code: 200
Content Example:
{"_id":4,"parentId":"af3e08fc-fb90-4c78-b11c-c1a0cf43bd31","childId":"e0c5f0e5-c1f0-4422-9ac0-6dbb536e8eb5","relationTypeAlias":"relateDocumentOnCopy","comment":"Testing relations for relateDocumentOnCopy","_links": {"self": {"href":"https://api.umbraco.io/relation/4" } }}
Get by relation type alias
Get a list of relations by their Relation Type alias.
URL: /relation/{alias}
Method: GET
Permissions required : Access to Settings section of the Umbraco Backoffice
Permissions required : Access to Settings section of the Umbraco Backoffice
Request
{"parentId":"af3e08fc-fb90-4c78-b11c-c1a0cf43bd31","childId":"e0c5f0e5-c1f0-4422-9ac0-6dbb536e8eb5","relationTypeAlias":"relateDocumentOnCopy","comment":"Testing relations for relateDocumentOnCopy"}
Success Response
Code: 201
Content Example:
{"_id":4,"parentId":"af3e08fc-fb90-4c78-b11c-c1a0cf43bd31","childId":"e0c5f0e5-c1f0-4422-9ac0-6dbb536e8eb5","relationTypeAlias":"relateDocumentOnCopy","comment":"Testing relations for relateDocumentOnCopy","_links": {"self": {"href":"https://api.umbraco.io/relation/4" } }}
Delete relation
Delete a relation by its integer ID.
URL: /relation/{id}
Method: DELETE
Permissions required : Access to Settings section of the Umbraco Backoffice
Success Response
Code: 200
Content Example:
DELETE https://api.umbraco.io/relation/4
{"_id":4,"parentId":"af3e08fc-fb90-4c78-b11c-c1a0cf43bd31","childId":"e0c5f0e5-c1f0-4422-9ac0-6dbb536e8eb5","relationTypeAlias":"relateDocumentOnCopy","comment":"Testing relations for relateDocumentOnCopy","_links": {"self": {"href":"https://api.umbraco.io/relation/4" } }}