Export Quick Reports

Export Quick Reports

POST https://api.ocamba.com/v1/hood/quick-reports/{id}/export

Create an Export request for Quick Reports.

Rate limits:

Burst: 10/s
Steady: 150/m

Request schema

body

Response schemas

POST https://api.ocamba.com/v1/hood/quick-reports/{id}/export HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "fields": "channel_type,sent,delivered,total_click,click_rate,unsubscribed",
  "sort": "-click_rate",
  "resolution": "day",
  "out": "json",
  "precision": 4,
  "custom_parameter": "custom_value"
}
curl -X POST "https://api.ocamba.com/v1/hood/quick-reports/{id}/export" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fields":"channel_type,sent,delivered,total_click,click_rate,unsubscribed","sort":"-click_rate","resolution":"day","out":"json","precision":4,"custom_parameter":"custom_value"}'
fetch("https://api.ocamba.com/v1/hood/quick-reports/{id}/export", {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "fields": "channel_type,sent,delivered,total_click,click_rate,unsubscribed",
      "sort": "-click_rate",
      "resolution": "day",
      "out": "json",
      "precision": 4,
      "custom_parameter": "custom_value"
    }
  )
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/quick-reports/{id}/export");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "fields" => "channel_type,sent,delivered,total_click,click_rate,unsubscribed",
    "sort" => "-click_rate",
    "resolution" => "day",
    "out" => "json",
    "precision" => 4,
    "custom_parameter" => "custom_value"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

202 Accepted

HTTP/1.1 202 Accepted
Content-Type: application/json

400 Bad Request

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

HTTP/1.1 500 Internal Server Error
Content-Type: application/json

{
  "code": 500,
  "title": "Internal server error.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses

Note
1
The request body can be passed either as application/json or url encoded form data.
2
In the request body, the standard parameters are described, but you can add any other add any other parameter for filtering, as long as it’s supported by Ocamba and the specific report you’re trying to export.
3
A successful request will result in an email and ws notification to the creator of the export.
4
The response body of the successful request will be a long running operation metadata. You can check out the progress of export by listing lro tasks with the ID provided in the response body.
5
If you want to see the export instance, list download center records.
Warning
1
If you want to define specific time range for which the report should be exported. Please use the pattern ‘field’: ‘daterange’