Skip to main content
GET
/
production-reports
Get production reports
curl --request GET \
  --url https://app.colacloud.us/api/v1/production-reports \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://app.colacloud.us/api/v1/production-reports"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://app.colacloud.us/api/v1/production-reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.colacloud.us/api/v1/production-reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.colacloud.us/api/v1/production-reports"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.colacloud.us/api/v1/production-reports")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.colacloud.us/api/v1/production-reports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "commodity": "<string>",
      "report_type": "<string>",
      "year": 123,
      "month_number": 123,
      "report_date": "2023-12-25",
      "statistical_group": "<string>",
      "statistical_category": "<string>",
      "statistical_detail": "<string>",
      "count_ims": 123,
      "value": 123,
      "value_unit": "<string>",
      "is_redacted": true
    }
  ],
  "meta": {
    "total": 123,
    "page": 123,
    "per_page": 123,
    "has_more": true
  }
}

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header

Query Parameters

commodity
string

Filter by commodity

year
integer

Filter by year

month
integer

Filter by month (1-12)

Required range: 1 <= x <= 12
report_type
string

Filter by report type

statistical_group
string

Filter by statistical group

page
integer
default:1

Page number (max 100)

Required range: 1 <= x <= 100
per_page
integer
default:100

Results per page (max 100)

Required range: 1 <= x <= 100

Response

Successful response

data
object[]
meta
object

Response metadata with pagination