Models
Get model schema
Get a model’s schema including required inputs, outputs, and available operators. Useful for discovering what inputs a simulation needs.
GET
/
models
/
{model_id}
/
schema
Get model schema
curl --request GET \
--url https://app.gomangrove.com/api/v1/models/{model_id}/schema \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/models/{model_id}/schema"
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/models/{model_id}/schema', 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/models/{model_id}/schema",
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/models/{model_id}/schema"
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/models/{model_id}/schema")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/models/{model_id}/schema")
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{
"model": {
"id": "mdl_abc123def456",
"name": "Carbon Calculation Model",
"version": 1
},
"required_inputs": [
{
"slug": "feedstock-volume",
"name": "Feedstock Volume",
"type": "numeric",
"unit": "kg",
"description": "Volume of feedstock processed"
}
],
"outputs": [
{
"id": 1,
"name": "Net Carbon Removal",
"unit": "t",
"ghg": "co2e",
"lca_role": "net"
}
],
"operators": [
"add",
"subtract",
"multiply",
"divide"
],
"example_simulation": {
"inputs": {
"feedstock-volume": 1000
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
}Authorizations
Path Parameters
Model friendly ID (e.g., mdl_abc123def456)
Previous
Simulate a modelRun a dry-run simulation against a model using provided input values. Does not create a model run or persist results.
Next
⌘I
Get model schema
curl --request GET \
--url https://app.gomangrove.com/api/v1/models/{model_id}/schema \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/models/{model_id}/schema"
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/models/{model_id}/schema', 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/models/{model_id}/schema",
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/models/{model_id}/schema"
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/models/{model_id}/schema")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/models/{model_id}/schema")
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{
"model": {
"id": "mdl_abc123def456",
"name": "Carbon Calculation Model",
"version": 1
},
"required_inputs": [
{
"slug": "feedstock-volume",
"name": "Feedstock Volume",
"type": "numeric",
"unit": "kg",
"description": "Volume of feedstock processed"
}
],
"outputs": [
{
"id": 1,
"name": "Net Carbon Removal",
"unit": "t",
"ghg": "co2e",
"lca_role": "net"
}
],
"operators": [
"add",
"subtract",
"multiply",
"divide"
],
"example_simulation": {
"inputs": {
"feedstock-volume": 1000
},
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-03-31T23:59:59Z"
}
}