Returns the document's ancestors.
Base Request
GET /api/documents/[docId]/ancestors
where [docId] is the alphanumeric ID for the document.
Headers
Header Name | Description | Required | Values |
---|---|---|---|
Authorization | The access token | Required |
Bearer [access_token]
where [access_token] is a string generated when you complete authentication (see Getting Started) |
User-Agent | Identity of the client making the request to the server | Required |
[product]/[version]
where [product] is the name of the software you are using to make the request and [version] is the numbered version of the software (for example, MyCompanyProduct/1.0). For information on other types of values commonly included in user-agent request headers, see the User-Agent HTTP header reference section on the Mozilla developer documentation website. |
HXCS-REPOSITORY | The repository ID | Optional | Any contributed repository name. Default is default. |
Accept | The format of the data to be returned | Optional | application/vnd.hxcs.v1+json |
Sample Request
GET /api/documents/[docId]/ancestors Authorization: Bearer [access_token] User-Agent: MyCompanyProduct/1.0 HXCS-REPOSITORY: default Accept: application/vnd.hxcs.v1+json
Response Body
See Document for response body details. The response body for this endpoint follows the same structure as the common response body for the other Document API endpoints, only the response body for this endpoint includes the common elements as children of the ancestors parent element.
Sample Response
{ "ancestors": [ { "sys_repository": "string", "sys_id": "string", "sys_primaryType": "string", "sys_title": "string", "sys_name": "string", "sys_path": "string", "sys_parentId": "string", "sys_parentPath": "string", "sys_version": 0, "sys_versionSeriesId": "string", "sys_isCheckedIn": true, "sys_isFolderish": true, "sys_isProxy": true, "sys_isTrashed": true, "sys_isVersion": true, "sys_isLatestVersion": true, "sys_mixinTypes": [ "string" ], "sys_lifecycleState": "string", "sys_pos": 0, "sys_acl": [ { "creator": "string", "permission": "string", "granted": true, "user": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "group": { "id": "string", "name": "string", "label": "string" }, "end": "2022-03-10T16:15:50Z", "begin": "2022-03-10T16:15:50Z", "status": "PENDING" } ], "sys_effectiveAcl": [ { "creator": "string", "permission": "string", "granted": true, "user": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "group": { "id": "string", "name": "string", "label": "string" }, "end": "2022-03-10T16:15:50Z", "begin": "2022-03-10T16:15:50Z", "status": "PENDING" } ], "sys_fulltextBinary": "string", "additionalProp1": {} } ] }
Status Codes and Errors
The following table lists the returned status codes.
Code | Description | Notes |
---|---|---|
200 | OK | Returns a list of the ancestors of the document with the specified ID. |
401 | Not Authorized | Authentication has failed or was not provided. |
403 | Not Allowed | Access permissions are invalid or missing. |
404 | Not Found | The document could not be found. |