Base path: /statistics/v3
POST
|
/operations/get-statistic-ex
Get the values of a set of statistics
|
Get the current value of predefined statistics from Stat Server without a subscription.
Parameters
Name |
Default |
Description |
Parameter Type |
Data Type |
Required
|
statistics
|
|
The set of statistics you want to get the values of from Stat Server.
|
body
|
|
true
|
|
Responses
Code |
Reason
|
200
|
Ok
|
{
"data": {
"statistics": [
{
"name": "string",
"objectId": "string",
"objectType": "string",
"timestamp": 0,
"value": {
}
}
]
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
PeekedStatisticValue
|
name
|
(string):
The name of the statistic.
|
objectId
|
(string):
The ID of the object (in Stat Server's terms).
|
objectType
|
(string):
The type of object.
|
timestamp
|
(integer):
The timestamp when the statistic value was generated (provided by Stat Server).
|
value
|
(object):
The value of the statistic. Its structure reflects the structure of the Stat Server message.
|
PeekedStatistics
|
statistics
|
(array:PeekedStatisticValue):
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
PeekedStatisticsResponse
|
data
|
(PeekedStatistics):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
400
|
Bad Request
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
500
|
Internal server error
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
503
|
Service Unavailable
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
504
|
Backend timeout
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
Usage
curl -X POST
-H "x-api-key: your_API_key"
-H "Content-Type: application/json"
-d '{object}'
"https://api-demo.com/statistics/v3/operations/get-statistic-ex?"
GET
|
/statistic-values/{statisticName}
Get the value of a single statistic
|
Get the current value of a statistic from Stat Server.
Parameters
Name |
Default |
Description |
Parameter Type |
Data Type |
Required
|
objectId
|
|
The ID of the object.
|
query
|
string
|
true
|
objectType
|
|
The type of object to which the statistic is applied.
|
query
|
string
|
true
|
statisticName
|
|
The name of the pre-configured statistic to retrieve.
|
path
|
string
|
true
|
Responses
Code |
Reason
|
200
|
Ok
|
{
"data": {
"statistic": {
"name": "string",
"objectId": "string",
"objectType": "string",
"timestamp": 0,
"value": {
}
}
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
PeekedStatisticValue
|
name
|
(string):
The name of the statistic.
|
objectId
|
(string):
The ID of the object (in Stat Server's terms).
|
objectType
|
(string):
The type of object.
|
timestamp
|
(integer):
The timestamp when the statistic value was generated (provided by Stat Server).
|
value
|
(object):
The value of the statistic. Its structure reflects the structure of the Stat Server message.
|
PeekedStatistic
|
statistic
|
(PeekedStatisticValue):
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
PeekedStatisticResponse
|
data
|
(PeekedStatistic):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
400
|
Bad Request
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
404
|
NotFound
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
500
|
Internal server error
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
503
|
Service Unavailable
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
504
|
Backend timeout
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
Usage
curl -X GET
-H "x-api-key: your_API_key"
-H "Content-Type: application/json"
"https://api-demo.com/statistics/v3/statistic-values/{statisticName}?objectId=string&objectType=string"
POST
|
/subscriptions
Open a subscription
|
Open a subscription for the specified set of statistics.
Parameters
Name |
Default |
Description |
Parameter Type |
Data Type |
Required
|
statistics
|
|
Definitions of the statistics to monitor.
|
body
|
|
true
|
|
verbose
|
INFO
|
Specifies whether the Statistics API should return additional information about opened statistics in the response. Possible values are: OFF and INFO.
|
query
|
string
|
|
Responses
Code |
Reason
|
200
|
Ok
|
{
"data": {
"operationId": "string",
"statistics": [
{
"name": "string",
"objectId": "string",
"objectType": "string",
"statisticId": "string",
"timestamp": 0,
"value": {
}
}
],
"subscriptionId": "string"
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
StatisticValue
|
name
|
(string):
The name of the statistic used during the subscribe procedure.
|
objectId
|
(string):
The ID of the object (in Stat Server's terms).
|
objectType
|
(string):
The type of object.
|
statisticId
|
(string):
The ID of the statistic. This ID is unique inside the subscription.
|
timestamp
|
(integer):
The timestamp when the statistic value was generated (provided by Stat Server).
|
value
|
(object):
The value of the statistic. Its structure reflects the structure of the Stat Server message.
|
StatisticData
|
operationId
|
(string):
|
statistics
|
(array:StatisticValue):
|
subscriptionId
|
(string):
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
StatisticDataResponse
|
data
|
(StatisticData):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
400
|
Bad Request
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
403
|
Forbidden
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
500
|
Internal server error
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
503
|
Service Unavailable
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
504
|
Backend timeout
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
Usage
curl -X POST
-H "x-api-key: your_API_key"
-H "Content-Type: application/json"
-d '{object}'
"https://api-demo.com/statistics/v3/subscriptions?verbose=string"
DELETE
|
/subscriptions/{id}
Delete a subscription
|
Delete the specified subscription by closing all its statistics. This is a fire-and-forget operation and it always returns a success response.
Parameters
Name |
Default |
Description |
Parameter Type |
Data Type |
Required
|
id
|
|
The ID of the subscription to delete.
|
path
|
string
|
true
|
Responses
Code |
Reason
|
200
|
Ok
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
Usage
curl -X DELETE
-H "x-api-key: your_API_key"
-H "Content-Type: application/json"
"https://api-demo.com/statistics/v3/subscriptions/{id}?"
GET
|
/subscriptions/{id}/statistic-values
Get the values of statistics in a subscription
|
Get the values of a set of statistics that was opened with a subscription.
Parameters
Name |
Default |
Description |
Parameter Type |
Data Type |
Required
|
id
|
|
The ID of the subscription.
|
path
|
string
|
true
|
statisticIds
|
|
A comma-delimited list of statistic IDs that belong to the specified subscription. If omitted, the Statistics API returns the current values of all statistics opened within the subscription. If specified, the Statistics API returns values for the statistics with the specified IDs.
|
query
|
string
|
|
verbose
|
INFO
|
Specifies whether the Statistics API should return additional information about opened statistics in the response. Possible values are: OFF and INFO.
|
query
|
string
|
|
Responses
Code |
Reason
|
200
|
Ok
|
{
"data": {
"operationId": "string",
"statistics": [
{
"name": "string",
"objectId": "string",
"objectType": "string",
"statisticId": "string",
"timestamp": 0,
"value": {
}
}
],
"subscriptionId": "string"
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
StatisticValue
|
name
|
(string):
The name of the statistic used during the subscribe procedure.
|
objectId
|
(string):
The ID of the object (in Stat Server's terms).
|
objectType
|
(string):
The type of object.
|
statisticId
|
(string):
The ID of the statistic. This ID is unique inside the subscription.
|
timestamp
|
(integer):
The timestamp when the statistic value was generated (provided by Stat Server).
|
value
|
(object):
The value of the statistic. Its structure reflects the structure of the Stat Server message.
|
StatisticData
|
operationId
|
(string):
|
statistics
|
(array:StatisticValue):
|
subscriptionId
|
(string):
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
StatisticDataResponse
|
data
|
(StatisticData):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
500
|
Internal server error
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
503
|
Service Unavailable
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
504
|
Backend timeout
|
{
"data": {
},
"errors": [
{
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
],
"path": "string",
"status": {
"code": 0,
"detail": {
},
"message": "string"
}
}
|
ResponseStatus
|
code
|
(integer):
|
detail
|
(object):
|
message
|
(string):
|
ErrorResponse
|
status
|
(ResponseStatus):
|
ApiResponse
|
data
|
(object):
|
errors
|
(array:ErrorResponse):
|
path
|
(string):
|
status
|
(ResponseStatus):
|
|
|
Usage
curl -X GET
-H "x-api-key: your_API_key"
-H "Content-Type: application/json"
"https://api-demo.com/statistics/v3/subscriptions/{id}/statistic-values?statisticIds=string&verbose=string"