Run a report / report data
POST/api/v3/_report/:report_id/_action/reportData
You can also get the data from a specific report via the API by using the report's report_id
.
Ordering and limiting report data:
It is possible to order or to limit the results you get back from the report if desired. For example, if you wanted to view the "All Customers" report with the list of customers in ascending order based off of customer_id, you could use:
/api/v3/_report/37?action=reportData&order=customer_customer_id:ASC
There are two parameters used for limiting the data that is returned: offset
and limit
.
offset
determines how far into the report the data is returned from. For example, if you are calling for the "All Customers" report and have ten customers ranging from customer_id=1 and customer_id=10 and offset=0
then the returned report will start with the customer whose customer_id = 1. However, if the offset=3
then the report data that is returned will start with the customer who has a customer_id = 4.
Note: If you request an offset
you MUST also specify an order
with ASC
for ascending or DESC
for descending.
limit
determines the number of objects returned from the report. For example if limit=5
for the "All Customers" report, you would get back the data for no more than five customers in the report. The maximum page size for report data is 1000.
One last example:
/api/v3/_report/37?action=reportData&offset=10&limit=50&order=customer_customer_id:ASC
If you used the above API call you would get back no more than 50 objects from the report, starting with the 10th object in the report.
Request
- application/json
Body
array
Array [
]
string
Responses
- 200
- 400
- 401
Action completed successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": true
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}