Custom metrics
SAM: Custom metrics (1.0.0)
Download OpenAPI specification:Download
API for interacting with custom metrics.
Get custom metrics
Returns a collection of custom metrics.
Authorizations:
query Parameters
page_size | integer <= 1000 Default: 25 The maximum number of items in the response. |
page_number | integer <int64> Default: 1 The page number. |
filter | string For more information on the available operators and which data types those operators work on, see Filter API call results. |
sort | string For more information on sorting capability and examples, see Sort API call results. |
Responses
Response samples
- 200
- 403
- 500
{- "items": [
- {
- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "Name",
- "description": "Description",
- "customFieldId": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "_links": [
- {
- "href": "/api/custom-metrics/v1/custom-metrics",
- "method": "GET",
- "rel": "self"
}
]
}
], - "pagination": {
- "page_size": 25,
- "page_number": 1,
- "total_pages": 5,
- "total_items": 110
}, - "_links": [
- {
- "href": "/api/custom-metrics/v1/custom-metrics",
- "method": "GET",
- "rel": "self"
}
]
}
Add custom metric
Creates a custom metric.
Authorizations:
Request Body schema: application/json
name required | string Name of the custom metric. |
description | string Description of the custom metric. |
customFieldId required | string <uuid> non-empty The unique ID of the custom field. |
Responses
Request samples
- Payload
{- "name": "Name",
- "description": "Name",
- "customFieldId": "a8411272-aa0d-42f3-823f-0fb1ceee16c0"
}
Response samples
- 201
- 400
- 403
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}
Delete custom metrics
Delete a collection of custom metrics.
Authorizations:
Request Body schema: application/json
ids required | Array of strings <uuid> [ items <uuid > ] The unique ID of the custom metric. |
Responses
Request samples
- Payload
{- "ids": [
- "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
]
}
Response samples
- 400
- 403
- 500
{- "error": {
- "code": 400,
- "message": "Filter field name needs to be formatted as a string."
}
}
Get custom metric
Returns the details of a given custom metric.
Authorizations:
path Parameters
customMetricId required | string <uuid> The unique ID of the custom metric. |
Responses
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "name": "Name",
- "description": "Description",
- "customFieldId": "a8411272-aa0d-42f3-823f-0fb1ceee16c0",
- "_links": [
- {
- "href": "/api/custom-metrics/v1/custom-metrics",
- "method": "GET",
- "rel": "self"
}
]
}
Replace custom metric
Replaces a custom metric.
Authorizations:
path Parameters
customMetricId required | string <uuid> The unique ID of the custom metric. |
Request Body schema: application/json
name required | string Name of the custom metric. |
description | string Description of the custom metric. |
customFieldId required | string <uuid> non-empty The unique ID of the custom field. |
Responses
Request samples
- Payload
{- "name": "Name",
- "description": "Name",
- "customFieldId": "a8411272-aa0d-42f3-823f-0fb1ceee16c0"
}
Response samples
- 200
- 400
- 403
- 404
- 500
{- "id": "ab3263e4-a4dc-483e-ab4b-3ddd298f558e"
}
Delete custom metric
Removes the given custom metric.
Authorizations:
path Parameters
customMetricId required | string <uuid> The unique ID of the custom metric. |
Responses
Response samples
- 400
- 403
- 404
- 500
{- "error": {
- "code": 400,
- "message": "Filter field name needs to be formatted as a string."
}
}