Batches
List all batches
Returns an array of all batches with filtering and sorting capabilities.
GET
/
batches
List all batches
curl --request GET \
--url https://app.gomangrove.com/api/v1/batches \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/batches"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gomangrove.com/api/v1/batches', 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.gomangrove.com/api/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.gomangrove.com/api/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.gomangrove.com/api/v1/batches")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "ba_abc123def456",
"tracking_id": "Q1-2025-001",
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-03-31T23:59:59.000Z",
"state": "complete",
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"primary_output": {
"id": 1,
"name": "Net Carbon Removal",
"unit": "t",
"data_point_type_id": 5,
"value": 100.5
},
"ledger_balance": 50.25,
"allocations": [],
"model_run": {
"id": "mr_AbCd1234567890Ef",
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-03-31T23:59:59.000Z",
"state": "updated",
"error_message": null,
"processed": true,
"incomplete_nodes": [],
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"calculations": [],
"output_data_points": []
},
"feedstocks": []
}
],
"info": {
"items": 1,
"page_size": 10,
"total_items": 1,
"current_page": 1,
"next_page": null,
"previous_page": null,
"total_pages": 1,
"sort": [],
"filter": []
}
}"{}"Authorizations
Query Parameters
Filter by project ID
Required range:
1 <= x <= 200Comma-separated list of fields to sort by. Prefix with - for descending. Available fields: id, start_time, end_time, tracking_id, friendly_id, created_at, updated_at
Example:
"-created_at"
Filter by exact batch ID
Controls response format. default returns paginated data. summary returns count and 10 samples. summary_with_export returns summary and triggers an async export.
Available options:
default, summary, summary_with_export File format for async export (only with response_mode=summary_with_export). Default: csv.
Available options:
csv, json ⌘I
List all batches
curl --request GET \
--url https://app.gomangrove.com/api/v1/batches \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/batches"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gomangrove.com/api/v1/batches', 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.gomangrove.com/api/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.gomangrove.com/api/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.gomangrove.com/api/v1/batches")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "ba_abc123def456",
"tracking_id": "Q1-2025-001",
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-03-31T23:59:59.000Z",
"state": "complete",
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"primary_output": {
"id": 1,
"name": "Net Carbon Removal",
"unit": "t",
"data_point_type_id": 5,
"value": 100.5
},
"ledger_balance": 50.25,
"allocations": [],
"model_run": {
"id": "mr_AbCd1234567890Ef",
"start_time": "2025-01-01T00:00:00.000Z",
"end_time": "2025-03-31T23:59:59.000Z",
"state": "updated",
"error_message": null,
"processed": true,
"incomplete_nodes": [],
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"calculations": [],
"output_data_points": []
},
"feedstocks": []
}
],
"info": {
"items": 1,
"page_size": 10,
"total_items": 1,
"current_page": 1,
"next_page": null,
"previous_page": null,
"total_pages": 1,
"sort": [],
"filter": []
}
}"{}"