Skip to main content
GET
http://localhost:3000
/
resource-hierarchy
/
ancestors
/
{resourceId}
curl -X GET 'https://api.example.com/resource-hierarchy/ancestors/resource_doc_456' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "resource_folder_123",
    "resourceTypeId": "rtype_folder",
    "displayName": "Engineering Docs",
    "cascade": "inherit"
  },
  {
    "id": "resource_workspace_root",
    "resourceTypeId": "rtype_workspace",
    "displayName": "Workspace",
    "cascade": "inherit"
  }
]

Path Parameters

resourceId
string
required
The resource ID to get ancestors for

Query Parameters

cascadeOnly
boolean
default:"false"
Only return ancestors with cascade: inherit

Response

Returns an array of ancestor resources, ordered from immediate parent to root.
curl -X GET 'https://api.example.com/resource-hierarchy/ancestors/resource_doc_456' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "resource_folder_123",
    "resourceTypeId": "rtype_folder",
    "displayName": "Engineering Docs",
    "cascade": "inherit"
  },
  {
    "id": "resource_workspace_root",
    "resourceTypeId": "rtype_workspace",
    "displayName": "Workspace",
    "cascade": "inherit"
  }
]