Skip to main content
PATCH
http://localhost:3000
/
resource-hierarchy
curl -X PATCH 'https://api.example.com/resource-hierarchy' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "parentResourceId": "resource_folder_123",
    "childResourceId": "resource_doc_456",
    "cascade": "none"
  }'
{
  "parentResourceId": "resource_folder_123",
  "childResourceId": "resource_doc_456",
  "relationshipType": "contains",
  "cascade": "none",
  "createdAt": "2024-01-15T10:30:00Z"
}

Request Body

parentResourceId
string
required
The parent resource ID
childResourceId
string
required
The child resource ID
cascade
string
Cascade mode: inherit or none
relationshipType
string
Type of relationship (e.g., contains, references)

Response

Returns the updated hierarchy edge.
curl -X PATCH 'https://api.example.com/resource-hierarchy' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "parentResourceId": "resource_folder_123",
    "childResourceId": "resource_doc_456",
    "cascade": "none"
  }'
{
  "parentResourceId": "resource_folder_123",
  "childResourceId": "resource_doc_456",
  "relationshipType": "contains",
  "cascade": "none",
  "createdAt": "2024-01-15T10:30:00Z"
}