Entity Relationships (Beta)
Use these operations to interact with entity relationships in Cortex.
Required permissions
Create and Update Relationships: Your API key must have the Edit entities
permission.
Your tenant must also have the Entity relationships
feature enabled.
Operations
List all entity destinations for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
Maximum depth to traverse in the relationship hierarchy. Defaults to 1 (i.e., direct relationships only).
2
If true will include relationships that traverse archived entities
false
Example: false
Successfully retrieved entity sources
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"destinations": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
Update all direct destinations for a given entity and entity relationship type
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationship destinations
List of code tags for the entities to add as sources
["entity-1","entity-2"]
Successfully updated entity destinations
Relationship validation error
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
PUT /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"destinations": [
"entity-1",
"entity-2"
]
}
{
"destinations": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
Add direct destinations for a given entity and entity relationship type
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationship destinations
List of code tags for the entities to add as sources
["entity-1","entity-2"]
Successfully added entity destinations
Relationship validation error
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"destinations": [
"entity-1",
"entity-2"
]
}
{
"destinations": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
List all entity sources for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
Maximum depth to traverse in the relationship hierarchy. Defaults to 1 (i.e., direct relationships only).
2
If true will include relationships that traverse archived entities
false
Example: false
Successfully retrieved entity sources
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"sources": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
Update all direct sources for a given entity and entity relationship type
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationship sources
List of code tags for the entities to add as sources
["entity-1","entity-2"]
Successfully updated entity sources
Relationship validation error
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
PUT /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"sources": [
"entity-1",
"entity-2"
]
}
{
"sources": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
Add direct sources for a given entity and entity relationship type
The tag (x-cortex-tag
) or unique, auto-generated identifier for the entity.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationship sources
List of code tags for the entities to add as sources
["entity-1","entity-2"]
Successfully added entity sources
Relationship validation error
Entity or relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"sources": [
"entity-1",
"entity-2"
]
}
{
"sources": [
{
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
]
}
List all entity relationships for a certain relationship type.
Number of results to return per page, between 1 and 1000. Default 250.
250
Page number to return, 0-indexed. Default 0.
0
Successfully retrieved entity relationships
Relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"page": 1,
"relationships": [
{
"destinationEntity": {
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
},
"providerType": "WORKDAY",
"relationshipTypeTag": "depends-on",
"sourceEntity": {
"description": "text",
"id": "en2da8159dbeefb974",
"name": "My Favorite Entity",
"tag": "my-favorite-entity",
"type": "service"
}
}
],
"total": 1,
"totalPages": 1
}
Update all entity relationships for a certain relationship type.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationships
Successfully updated entity relationships
Relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
PUT /api/v1/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"relationships": [
{
"destination": "service-b",
"source": "service-a"
}
]
}
{
"errors": [
{
"destinationEntityTag": "service-b",
"errorMessage": "Source entity not found",
"relationshipTypeTag": "depends-on",
"sourceEntityTag": "service-a"
}
],
"relationships": [
{
"destinationEntityTag": "service-b",
"providerType": "WORKDAY",
"relationshipTypeTag": "depends-on",
"sourceEntityTag": "service-a"
}
]
}
Add all entity relationships for a certain relationship type.
When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.
Updates to entity relationships
Successfully added entity relationships
Relationship type not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/relationships/{relationshipTypeTag} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"relationships": [
{
"destination": "service-b",
"source": "service-a"
}
]
}
{
"errors": [
{
"destinationEntityTag": "service-b",
"errorMessage": "Source entity not found",
"relationshipTypeTag": "depends-on",
"sourceEntityTag": "service-a"
}
],
"relationships": [
{
"destinationEntityTag": "service-b",
"providerType": "WORKDAY",
"relationshipTypeTag": "depends-on",
"sourceEntityTag": "service-a"
}
]
}
Last updated
Was this helpful?