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
- application/json
Describes an entity type.
Root Schema : UdsEntityType
Type:
object
Describes an entity type.
-
entityType:
string
The entity typeExample:
my_host
-
metrics(optional):
array metrics
The metrics for this entity type
-
properties(optional):
array properties
The Properties for this entity type
-
typeDisplayName(optional):
string
The entity type display nameExample:
My Host Type
Nested Schema : metrics
Type:
array
The metrics for this entity type
Show Source
-
Array of:
object UdsMetricType
Describes a metric type.
Nested Schema : properties
Type:
array
The Properties for this entity type
Show Source
-
Array of:
object UdsPropertyType
Describes a property type.
Nested Schema : UdsMetricType
Type:
object
Describes a metric type.
-
dimensions(optional):
array dimensions
The dimensions of this metric
-
group(optional):
string
The metric group nameExample:
cpuUtil
-
metric:
string
The metric nameExample:
cpuIdle
-
type:
string
The metric typeExample:
NUM
Nested Schema : UdsPropertyType
Type:
object
Describes a property type.
-
displayName:
string
The display name of a propertyExample:
listen port
-
identifyingProperty:
boolean
Default Value:
false
The identifying propertyExample:false
-
name:
string
The name of the propertyExample:
port
Response
Supported Media Types
- application/json
200 Response
Success - An existing type has been updated
201 Response
Success - A new type has been created
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