Create or Update an Entity

post

/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

Supported Media Types
Body ()

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.

Root Schema : UdsManageableEntity
Type: 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.

Show Source
Nested Schema : associations
Type: array
The associated entities
Show Source
  • UdsAssociation

    This model describes an association between two or more entities. An entity can have associations to other entities which are called associates.

Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
The properties assigned to the entity
Nested Schema : tags
Type: object
Additional Properties Allowed
Show Source
The tags assigned to the entity
Nested Schema : UdsAssociation
Type: object

This model describes an association between two or more entities. An entity can have associations to other entities which are called associates.

Show Source
Nested Schema : tags
Type: object
Additional Properties Allowed
Show Source
The association tags
Back to Top

Response

Supported Media Types

200 Response

Success - An existing entity has been updated

201 Response

Success - A new entity has been created
Back to Top

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