> For the complete documentation index, see [llms.txt](https://docs.cortex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortex.io/api/readme/entity-relationships.md).

# Entity Relationships

Use these operations to interact with [entity relationships](/ingesting-data-into-cortex/entities-overview/entities/defining-relationship-types.md) 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 entity destinations for a relationship type

> List all entity destinations for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"EntityDestinationsResponse":{"required":["destinations"],"type":"object","properties":{"destinations":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations":{"get":{"description":"List all entity destinations for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.","operationId":"listEntityDestinationsForRelationshipType","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"Maximum depth to traverse in the relationship hierarchy. Defaults to 1 (i.e., direct relationships only).","in":"query","name":"depth","required":false,"schema":{"type":"string"}},{"description":"If true will include relationships that traverse archived entities","in":"query","name":"includeArchived","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDestinationsResponse"}}},"description":"Successfully retrieved entity sources"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List entity destinations for a relationship type","tags":["Entity Relationships"]}}}}
```

## Update direct entity destinations for a given entity

> Update all direct destinations for a given entity and entity relationship type

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationshipDestinations":{"required":["destinations"],"type":"object","properties":{"destinations":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"type":"string","description":"List of code tags for the entities to add as sources"}}},"description":"Updates to entity relationship destinations"},"EntityDestinationsResponse":{"required":["destinations"],"type":"object","properties":{"destinations":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations":{"put":{"description":"Update all direct destinations for a given entity and entity relationship type","operationId":"updateEntityDestinations","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationshipDestinations"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDestinationsResponse"}}},"description":"Successfully updated entity destinations"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship validation error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update direct entity destinations for a given entity","tags":["Entity Relationships"]}}}}
```

## Add direct entity destinations for a given entity

> Add direct destinations for a given entity and entity relationship type

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationshipDestinations":{"required":["destinations"],"type":"object","properties":{"destinations":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"type":"string","description":"List of code tags for the entities to add as sources"}}},"description":"Updates to entity relationship destinations"},"EntityDestinationsResponse":{"required":["destinations"],"type":"object","properties":{"destinations":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/destinations":{"post":{"description":"Add direct destinations for a given entity and entity relationship type","operationId":"addEntityDestinations","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationshipDestinations"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDestinationsResponse"}}},"description":"Successfully added entity destinations"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship validation error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Add direct entity destinations for a given entity","tags":["Entity Relationships"]}}}}
```

## List entity sources for a relationship type

> List all entity sources for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"EntitySourcesResponse":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources":{"get":{"description":"List all entity sources for a certain relationship type. Optional depth parameter to limit the depth of the relationship tree.","operationId":"listEntitySourcesForRelationshipType","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"Maximum depth to traverse in the relationship hierarchy. Defaults to 1 (i.e., direct relationships only).","in":"query","name":"depth","required":false,"schema":{"type":"string"}},{"description":"If true will include relationships that traverse archived entities","in":"query","name":"includeArchived","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySourcesResponse"}}},"description":"Successfully retrieved entity sources"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List entity sources for a relationship type","tags":["Entity Relationships"]}}}}
```

## Update direct entity sources for a given entity

> Update all direct sources for a given entity and entity relationship type

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationshipSources":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"type":"string","description":"List of code tags for the entities to add as sources"}}},"description":"Updates to entity relationship sources"},"EntitySourcesResponse":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources":{"put":{"description":"Update all direct sources for a given entity and entity relationship type","operationId":"updateEntitySources","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationshipSources"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySourcesResponse"}}},"description":"Successfully updated entity sources"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship validation error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update direct entity sources for a given entity","tags":["Entity Relationships"]}}}}
```

## Add direct entity sources for a given entity

> Add direct sources for a given entity and entity relationship type

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationshipSources":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"type":"string","description":"List of code tags for the entities to add as sources"}}},"description":"Updates to entity relationship sources"},"EntitySourcesResponse":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntityDetails"}}}},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/catalog/{tagOrId}/relationships/{relationshipTypeTag}/sources":{"post":{"description":"Add direct sources for a given entity and entity relationship type","operationId":"addEntitySources","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each `/` as `%2F`. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag `/services/payments-api` is referenced as `%2Fservices%2Fpayments-api`). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}},{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationshipSources"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySourcesResponse"}}},"description":"Successfully added entity sources"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship validation error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entity or relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Add direct entity sources for a given entity","tags":["Entity Relationships"]}}}}
```

## List entity relationships for a relationship type

> List all entity relationships for a certain relationship type.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"ListRelationships":{"required":["page","relationships","total","totalPages"],"type":"object","properties":{"page":{"type":"integer","description":"Current page number, 0-indexed","format":"int32"},"relationships":{"type":"array","items":{"$ref":"#/components/schemas/EntityRelationshipDetails"}},"total":{"type":"integer","description":"Total number of results","format":"int32"},"totalPages":{"type":"integer","description":"Total number of pages","format":"int32"}},"description":"List of related entities."},"EntityRelationshipDetails":{"required":["destinationEntity","relationshipTypeTag","sourceEntity"],"type":"object","properties":{"destinationEntity":{"$ref":"#/components/schemas/RelatedEntityDetails"},"providerType":{"type":"string","description":"Provider that created or manages this relationship","enum":["WORKDAY"]},"relationshipTypeTag":{"type":"string","description":"Tag of the relationship type"},"sourceEntity":{"$ref":"#/components/schemas/RelatedEntityDetails"}},"description":"Describes a specific entity relationship"},"RelatedEntityDetails":{"required":["id","name","tag","type"],"type":"object","properties":{"description":{"type":"string","description":"Description of the entity visible in the Service, Resource, or Domain Catalog. This may contain markdown."},"id":{"type":"string","description":"Unique, immutable, 18-character auto-generated identifier for the entity."},"name":{"type":"string","description":"Human-readable name for the entity"},"tag":{"type":"string","description":"Unique identifier for the entity. Corresponds to the x-cortex-tag field in the entity descriptor."},"type":{"type":"string","description":"Type of the entity. Corresponds to the x-cortex-type field in the entity descriptor or 'service' for services."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/relationships/{relationshipTypeTag}":{"get":{"description":"List all entity relationships for a certain relationship type.","operationId":"listEntityRelationships","parameters":[{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"Number of results to return per page, between 1 and 1000. Default 250.","in":"query","name":"pageSize","required":true,"schema":{"type":"integer","format":"int32","default":250}},{"description":"Page number to return, 0-indexed. Default 0.","in":"query","name":"page","required":true,"schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRelationships"}}},"description":"Successfully retrieved entity relationships"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List entity relationships for a relationship type","tags":["Entity Relationships"]}}}}
```

## Update entity relationships for a relationship type

> Update all entity relationships for a certain relationship type.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationships":{"required":["relationships"],"type":"object","properties":{"relationships":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"$ref":"#/components/schemas/EntityRelationshipRequest"}}},"description":"Updates to entity relationships"},"EntityRelationshipRequest":{"required":["destination","source"],"type":"object","properties":{"destination":{"type":"string","description":"Code Tag for the destination entity"},"source":{"type":"string","description":"Code Tag for the source entity"}},"description":"Request to create a relationship between two entities"},"BulkUpdateEntityRelationshipsResponse":{"required":["errors","relationships"],"type":"object","properties":{"errors":{"type":"array","description":"Errors encountered during the operation","items":{"$ref":"#/components/schemas/EntityRelationshipError"}},"relationships":{"type":"array","description":"Successfully created or updated relationships","items":{"$ref":"#/components/schemas/EntityRelationship"}}},"description":"Response from bulk entity relationship operations"},"EntityRelationshipError":{"required":["destinationEntityTag","errorMessage","relationshipTypeTag","sourceEntityTag"],"type":"object","properties":{"destinationEntityTag":{"type":"string","description":"Code tag of the destination entity"},"errorMessage":{"type":"string","description":"Human-readable error message"},"relationshipTypeTag":{"type":"string","description":"Tag of the relationship type"},"sourceEntityTag":{"type":"string","description":"Code tag of the source entity"}},"description":"Error details for a failed relationship operation"},"EntityRelationship":{"required":["destinationEntityTag","relationshipTypeTag","sourceEntityTag"],"type":"object","properties":{"destinationEntityTag":{"type":"string","description":"Code tag of the destination entity"},"providerType":{"type":"string","description":"Provider that created or manages this relationship","enum":["WORKDAY"]},"relationshipTypeTag":{"type":"string","description":"Tag of the relationship type"},"sourceEntityTag":{"type":"string","description":"Code tag of the source entity"}},"description":"A relationship between two entities"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/relationships/{relationshipTypeTag}":{"put":{"description":"Update all entity relationships for a certain relationship type.","operationId":"updateEntityRelationships","parameters":[{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationships"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateEntityRelationshipsResponse"}}},"description":"Successfully updated entity relationships"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update entity relationships for a relationship type","tags":["Entity Relationships"]}}}}
```

## Add entity relationships for a relationship type

> Add all entity relationships for a certain relationship type.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Entity Relationships"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateEntityRelationships":{"required":["relationships"],"type":"object","properties":{"relationships":{"type":"array","description":"List of code tags for the entities to add as sources","items":{"$ref":"#/components/schemas/EntityRelationshipRequest"}}},"description":"Updates to entity relationships"},"EntityRelationshipRequest":{"required":["destination","source"],"type":"object","properties":{"destination":{"type":"string","description":"Code Tag for the destination entity"},"source":{"type":"string","description":"Code Tag for the source entity"}},"description":"Request to create a relationship between two entities"},"BulkUpdateEntityRelationshipsResponse":{"required":["errors","relationships"],"type":"object","properties":{"errors":{"type":"array","description":"Errors encountered during the operation","items":{"$ref":"#/components/schemas/EntityRelationshipError"}},"relationships":{"type":"array","description":"Successfully created or updated relationships","items":{"$ref":"#/components/schemas/EntityRelationship"}}},"description":"Response from bulk entity relationship operations"},"EntityRelationshipError":{"required":["destinationEntityTag","errorMessage","relationshipTypeTag","sourceEntityTag"],"type":"object","properties":{"destinationEntityTag":{"type":"string","description":"Code tag of the destination entity"},"errorMessage":{"type":"string","description":"Human-readable error message"},"relationshipTypeTag":{"type":"string","description":"Tag of the relationship type"},"sourceEntityTag":{"type":"string","description":"Code tag of the source entity"}},"description":"Error details for a failed relationship operation"},"EntityRelationship":{"required":["destinationEntityTag","relationshipTypeTag","sourceEntityTag"],"type":"object","properties":{"destinationEntityTag":{"type":"string","description":"Code tag of the destination entity"},"providerType":{"type":"string","description":"Provider that created or manages this relationship","enum":["WORKDAY"]},"relationshipTypeTag":{"type":"string","description":"Tag of the relationship type"},"sourceEntityTag":{"type":"string","description":"Code tag of the source entity"}},"description":"A relationship between two entities"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/relationships/{relationshipTypeTag}":{"post":{"description":"Add all entity relationships for a certain relationship type.","operationId":"addEntityRelationships","parameters":[{"in":"path","name":"relationshipTypeTag","required":true,"schema":{"type":"string"}},{"description":"When true, overrides values that were defined in the catalog descriptor. Will be overwritten the next time the catalog descriptor is processed.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRelationships"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateEntityRelationshipsResponse"}}},"description":"Successfully added entity relationships"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Relationship type not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Add entity relationships for a relationship type","tags":["Entity Relationships"]}}}}
```
