Create or Update an Entity
/serviceapi/entityModel/uds/entities
Creates or updates an entity.
This endpoint can be used even if the associated entity type doesn't exist.
The entities created can be tagged with a set of keys and values using the tags attribute. It is also possible to specify a set of tagged associations with the given destination entities.
If the entity already exists it is updated with the given data. Existing tags and associations which are not specified in the updated payload will be removed.
Request
- application/json
This model describes an entity managed by Oracle Management Cloud. An entity is defined by its name and type. It can have a different display name than the entity name. The display name is used in the GUI to display the entity. There can be associations to other entities and an entity can be tagged by a key/value pair.
object
This model describes an entity managed by Oracle Management Cloud. An entity is defined by its name and type. It can have a different display name than the entity name. The display name is used in the GUI to display the entity. There can be associations to other entities and an entity can be tagged by a key/value pair.
-
associations(optional):
array associations
The associated entities
-
entityDisplayName(optional):
string
The entity display nameExample:
My Entity Name
-
entityName:
string
The entity nameExample:
my_entity_name
-
entityType:
string
The entity typeExample:
my_entity_type
-
properties(optional):
object properties
Additional Properties Allowed: additionalPropertiesThe properties assigned to the entity
-
tags(optional):
object tags
Additional Properties Allowed: additionalPropertiesThe tags assigned to the entity
-
typeDisplayName(optional):
string
The entity type display nameExample:
My Entity Type
array
-
Array of:
object UdsAssociation
This model describes an association between two or more entities. An entity can have associations to other entities which are called associates.
object
object
This model describes an association between two or more entities. An entity can have associations to other entities which are called associates.
-
entityName:
string
The entity name of the associateExample:
MyLinuxHost
-
entityType:
string
The entity type of the associateExample:
omc_host_linux
-
tags:
object tags
Additional Properties Allowed: additionalPropertiesThe association tags
Response
- application/json
200 Response
201 Response
Examples
Create an entity by given name and type:
Payload
{ "entityType":"HostLinux", "entityName":"myHostEntity" }
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/entityModel/uds/entities"
Create or update an entity with given tags for location and organization:
Payload
{ "entityType":"HostLinux", "entityName":"MyHostEntity", "tags":{ "loc":"nyc", "org":"support" } }
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/entityModel/uds/entities"
Create or update an Entity with given associations:
Payload
{ "entityType":"HostLinux", "entityName":"MyHostEntity", "associations"[ { "tags": { "runs_on":"app" } "entityType":"MyApplicationType", "entityName":"MyApplication" } ] }
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/entityModel/uds/entities"Back to Top