Create or Update an Entity Type

post

/serviceapi/entityModel/uds/entityTypes

Creates or updates an entity type.

In case the payload contains assets that don't exist yet, Oracle Management Cloud will create the missing assets out of a template.

Request

Supported Media Types
Body ()

Describes an entity type.

Root Schema : UdsEntityType
Type: object

Describes an entity type.

Show Source
Nested Schema : metrics
Type: array
The metrics for this entity type
Show Source
Nested Schema : properties
Type: array
The Properties for this entity type
Show Source
Nested Schema : UdsMetricType
Type: object

Describes a metric type.

Show Source
Nested Schema : dimensions
Type: array
The dimensions of this metric
Show Source
Nested Schema : UdsPropertyType
Type: object

Describes a property type.

Show Source
Back to Top

Response

Supported Media Types

200 Response

Success - An existing type has been updated

201 Response

Success - A new type has been created
Back to Top

Examples

Create or update an entity type:

Payload:

{
  "entityType": "MyHostType",
  "typeDisplayName": "My Host Type",
  "metrics": [
    {
      "metric": "cpuIdle",
      "type": "NUM",
      "dimensions": [
        "cpuId"
      ]
    },
    {
      "metric": "cpuSystem",
      "type": "NUM",
      "dimensions": [
        "cpuId"
      ]
    },
    {
      "metric": "cpuUser",
      "type": "NUM",
      "dimensions": [
        "cpuId"
      ]
    }
  ]
}
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/entityModel/uds/entityTypes"
Back to Top