View all methods
catalog.entityTypes.update
Update an existing entity type in your software catalog.
Facts
| Method | POST https://api.getdx.com/catalog.entityTypes.update |
| Required scope | catalog:write:entities |
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
identifier |
Text |
The user defined unique identifier for the entity type. |
Optional arguments
| Name | Type | Description |
|---|---|---|
name |
Text |
The user defined name of the entity type. |
description |
Text |
The description of the entity type. |
properties |
Array<Property> |
A list of properties defined for the entity type. |
aliases |
Record<AliasTypeKey, boolean> |
Key/Value object of the aliases available for the entity type. See the catalog docs for a list of supported aliases. |
Property Management
When updating an entity type, you must include all existing properties in your request. The API will replace the entire properties list with the one you provide.
- To keep existing properties: Include them in the
propertiesarray - To add new properties: Add them to the
propertiesarray - To delete properties: Simply omit them from the
propertiesarray - To modify existing properties: Include them with updated values
Example request
This is a typical request:
curl -X POST https://api.getdx.com/catalog.entityTypes.update \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
--data '{
"identifier": "www",
"name": "Website",
"description": "DX Website entities.",
"ordering": 0,
"properties": [
{
"type": "multi_select",
"identifier": "language",
"name": "Language",
"description": "Languages used by the website",
"visibility": "visible",
"ordering": 0,
"definition": {
"options": [
{ "value": "Ruby", "color": "#fb923c" },
{ "value": "HTML", "color": "#fb923c" },
{ "value": "Shell", "color": "#fb923c" }
]
},
}
],
"aliases": {
"github_repo": true
}
}'
Example response
This is a typical success response:
{
"ok": true,
"entity_type": {
"identifier": "www",
"created_at": "2025-01-02 20:48:45.77969",
"updated_at": "2025-01-02 20:48:45.77969",
"name": "Website",
"description": "DX Website entities.",
"ordering": 0,
"properties": [
{
"type": "multi_select",
"identifier": "language",
"name": "Language",
"description": "Languages used by the website",
"visibility": "visible",
"ordering": 0,
"definition": {
"options": [
{ "value": "Ruby", "color": "#fb923c" },
{ "value": "HTML", "color": "#fb923c" },
{ "value": "Shell", "color": "#fb923c" }
]
}
}
],
"aliases": {
"github_repo": true
}
}
}
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. |
conflict |
There is a conflict between an update to a Property definition and current Entity Properties. The on_definition_conflict field can be used to resolve these conflicts. |
Legacy path
This method is temporarily still available at the following legacy path:
POST https://api.getdx.com/entityTypes.update