Resource query
POST/api/sase/v1.0/resource/tenant/:tenant_id/query/:resource_name
Retrieve general information from your tenant.
Request
Path Parameters
-
site_current_status
Provides connection status information.
-
alerts
Provides information on alerts raised by your tenant.
Name of the resource that you want to query. The supported resources are:
Unique tenant ID.
Header Parameters
Sub-tenant ID. This parameter is required only if a sub-tenant is configured.
- application/json
Body
required
The JSON object used to query the resource. The query consists of four parts, show below.
- Properties - Data fields to include in the query output.
- Query - Filter conditions to apply to the query.
- Sort - Sort order for the the data.
- Count - Maximum number of records to retrieve.
- Array [
- ]
- Array [
- ]
- Array [
- ]
addOnFilter object
Add on data Filter Condition. (The existing property will be replaced)
Possible values: [AND
, OR
]
Default value: AND
Query operator
rules object[]
Enable character escaping for value
format object
Number Format function (optional)
Possible values: [ceil
, floor
, round
, trunc
]
Possible values: [AND
, OR
]
Operator
Resource Property
subQuery object
Subquery (optional)
Possible values: [local
, pre_defined
]
Operator
Flag to indicate total rows processed for query
Possible values: >= 1
and <= 10000
Default value: 10000
Maximum number of records
filter objectrequired
Filter Condition
Possible values: [AND
, OR
]
Default value: AND
Query operator
rules object[]
Enable character escaping for value
format object
Number Format function (optional)
Possible values: [ceil
, floor
, round
, trunc
]
Possible values: [AND
, OR
]
Operator
Resource Property
subQuery object
Subquery (optional)
Possible values: [local
, pre_defined
]
Operator
histogram object
Histogram Condition
Property Alias
Enable filling empty record for intervals with no data
Property
Possible values: [day
, hour
, minute
, month
, week
, year
]
Histogram Range
sort object
Sort Condition (optional)
Possible values: [asc
, desc
]
Histogram range value (only 1 is supported)
Flag to indicate add row number to response
properties object[]required
Resource properties
Property Alias (Name to include in response)
format object
Number Format function (optional)
Possible values: [ceil
, floor
, round
, trunc
]
Possible values: [ceil
, floor
, round
, trunc
]
Aggregation function (Applicable only to metric properties)
Property
sort object
Sort Condition (optional)
Possible values: [asc
, desc
]
Responses
- 200
- 400
- 403
- 404
- 500
List of resources
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
data object[]required
Response Data
header objectrequired
Response header
{
"data": [
{
"average_property3": 10.75,
"property1": "value1",
"property2": 10
},
{
"average_property3": 20.99,
"property1": "value2",
"property2": 25
}
],
"header": {
"createdAt": "Fri Jan 1 00:00:00 PST 2021",
"name": "Response Name",
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}
Invalid Resource Query request responses
- Invalid Resource property name (Error code: DATA10002)
- Invalid Resource request parameter (Error code: DATA10003)
- The resource or property is not licensed (Error code: DATA10004)
- application/json
- Schema
- Example (from schema)
Schema
Error details
Error code
Error Message
Values in error details. Used to construct error in different language
{
"details": "Resource property 'property1' is not valid",
"errorCode": "DATA10002",
"message": "Invalid Resource property name",
"values": [
"property1"
]
}
Permission response
- Permission Denied (Error code: REST10003)
- application/json
- Schema
- Example (from schema)
Schema
Error details
Error code
Error Message
Values in error details. Used to construct error in different language
{
"details": "Permission Denied",
"errorCode": "REST10003",
"message": "Permission Denied",
"values": [
"value1"
]
}
Resource not available response
- Resource not found (Error code: REST10002)
- application/json
- Schema
- Example (from schema)
Schema
Error details
Error code
Error Message
Values in error details. Used to construct error in different language
{
"details": "Resource not found",
"errorCode": "REST10002",
"message": "Resource not found",
"values": [
"value1"
]
}
Unexpected server error response
- Unexpected server error (Error code: REST10001)
- application/json
- Schema
- Example (from schema)
Schema
Error details
Error code
Error Message
Values in error details. Used to construct error in different language
{
"details": "Failed to process request",
"errorCode": "REST10001",
"message": "Unexpected server error",
"values": [
"value1"
]
}