Create a Metric Type
post
/api/metric/Types
Creates a metric type.
The minimum required properties in the request body are:
The minimum required properties in the request body are:
- MetricTypeName
- Unit
- Abbr
- ValueType
- MetricGroupID
- FormatID
- Direction
- TopNTypeID
- TopNScopeID
- UnitDivisionID
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
Abbr: string
Type AbbreviationExample:
Conn
-
Direction: integer
Direction Allowed Values: - 0 => Descending (Normal) - 1 => AscendingExample:
0
-
FormatID: integer
Format ID Allowed Values: - 0 => Integer - 1 => FloatExample:
0
-
MetricGroupID: integer
Metric Group IDExample:
141
-
MetricTypeName: string
The metric type name.
To avoid confusion with numeric IDs, the name value cannot be integers only or integers prefixed with the + or - symbols only. It must contain letters or other characters. For example, 1234, +1234, and -1234 are not valid, but US1234, US+1234 and US_1234 are.Example:Apache Accesses
-
TopNScopeID: integer
TopNScope Allowed Values: - 0 => Disabled - 1 => Utilization - 2 => Value - 3 => BothExample:
0
-
TopNTypeID: integer
TopNType Allowed Values: - 0 => Both - 1 => Average - 2 => PeakExample:
0
-
Unit: string
Type UnitExample:
Connections
-
UnitDivisionID: integer
UnitDivisionID Allowed Values: - 0 => None - 60 => Time - 1000 => SI (1000) - 1023 => Deprecated Binary (1000) - 1024 => Binary/IEC (1024)Example:
0
-
ValueType: integer
Value Type Allowed Values: - 0 => Raw - 100 => UtilizationExample:
0
Response
Supported Media Types
- application/json
200 Response
Successful operation
Root Schema : schema
Match All
Show Source
-
object
SuccessfulAddOperation
The response body for a successful add operation.
-
object
type
Nested Schema : SuccessfulAddOperation
Type:
object
The response body for a successful add operation.
Show Source
-
message: string
The response message.Example:
Added record
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Nested Schema : type
Type:
Show Source
object
-
data: array
data
The new metric type.
-
total: integer
The total number of results regardless of paging.Example:
1
Nested Schema : metricTypesRead
Type:
Show Source
object
-
Abbr: string
Type AbbreviationExample:
Conn
-
Direction: integer
Direction Allowed Values: - 0 => Descending (Normal) - 1 => AscendingExample:
0
-
DirectionName: string
Sort direction Allowed Values: - Descending (Normal) - AscendingExample:
Descending (Normal)
-
FormatID: integer
Format ID Allowed Values: - 0 => Integer - 1 => FloatExample:
0
-
FormatName: string
Format. Allowed Values: - Integer - FloatExample:
Integer
-
Measurement: string
MeasurementExample:
metrictype_Apache_Accesses
-
MetricGroupID: integer
Metric Group IDExample:
141
-
MetricGroupName: string
Metric Group Name for displaying metrics togetherExample:
Network Traffic
-
MetricTypeID: integer
Metric Type IDExample:
515
-
MetricTypeName: string
Metric Type NameExample:
Apache Accesses
-
TopNScopeID: integer
TopNScope Allowed Values: - 0 => Disabled - 1 => Utilization - 2 => Value - 3 => BothExample:
0
-
TopNScopeName: string
TopN scope Allowed Values: - Disabled - Utilization - Value - BothExample:
Disabled
-
TopNTypeID: integer
TopN Type Allowed Values: - 0 => Both - 1 => Average - 2 => PeakExample:
0
-
TopNTypeName: string
TopN Type Allowed Values: - Both - Average - PeakExample:
Both
-
Unit: string
Type UnitExample:
Connections
-
UnitDivisionID: integer
UnitDivisionID Allowed Values: - 0 => None - 60 => Time - 1000 => SI (1000) - 1023 => Deprecated Binary (1000) - 1024 => Binary/IEC (1024)Example:
0
-
UnitDivisionName: string
Unit division Allowed values - None - Time - SI(1000) - Deprecated Binary(1000) - Binary/IEC(1024)Example:
None
-
ValueType: integer
Value type Allowed Values: - 0 => Raw - 100 => UtilizationExample:
0
-
ValueTypeName: string
Value type name Allowed Values: - Raw - UtilizationExample:
Raw
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object
-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
-
Array of:
object items
An error.
Nested Schema : items
Type:
object
An error.