View all methods
catalog.relations.update
Update an existing relation definition. The following fields cannot be changed after creation: identifier, source entity type, target entity type, and cardinality. Changing type updates the stored relation type and derived inverse_type automatically.
Facts
| Method | POST https://api.getdx.com/catalog.relations.update |
| Required scope | catalog:write:entities |
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
identifier |
Text |
Current relation definition identifier. |
Optional arguments
| Name | Type | Description |
|---|---|---|
type |
Text |
One of the standard relation types; updates the stored type and derived inverse. |
description |
Text |
Updated description. |
Example request
This is a typical request:
curl -X POST https://api.getdx.com/catalog.relations.update \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
--data '{
"identifier": "service-depends-on-service",
"description": "Updated: runtime dependencies between services",
"type": "depends on"
}'
Example response
This is a typical success response:
{
"ok": true,
"relation": {
"identifier": "service-depends-on-service",
"type": "depends on",
"inverse_type": "dependency of",
"cardinality": "many_to_many",
"description": "Updated: runtime dependencies between services",
"source_entity_type_identifier": "service",
"target_entity_type_identifier": "service",
"created_at": "2025-01-02T20:48:45.77969Z",
"updated_at": "2025-01-03T10:15:22.11223Z"
}
}
Errors
This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok param in the response.
| Error | Description |
|---|---|
not_authed |
No authentication token provided. |
invalid_auth |
Some aspect of authentication cannot be validated. |
invalid_arguments |
One or more arguments are invalid, or an attempt was made to change immutable fields. |
not_found |
No relation definition matches the given identifier. |