Filter Baselines
This task shows you how to retrieve baseline estimates available for a specific dataset. Baselines provide generic environmental impact estimates that you can use for benchmarking and early-stage analysis when product-specific EPDs are not yet selected.
By the end of this task, you will know how to:
- Call the baselines endpoint to get available baseline estimates within a dataset
- Understand the structure of baseline information
- Work with pagination for large result sets
- Prepare for filtering (as capabilities expand)
You use the following operation for this task:
| Operation | HTTP Request |
|---|---|
| Filter Baselines for Dataset | POST /v3/datasets/{datasetId}/baselines/list:filter |
Prerequisites
Before starting this task, ensure you have:
- The access token from Obtain an Access Token (it should start with something like
eyJhbGciOiJIUzI1NiIs...) - Completed Get the List of Supported Datasets and obtained a dataset ID
Warning
Filter support varies by dataset. Before building filter expressions, call the Get Baselines Filters endpoint to discover which filters are supported and which operators and values are allowed.
Step 1: Call the Baselines Endpoint
Use the access token from Obtain an Access Token and a dataset ID from Get the List of Supported Datasets to call the baselines endpoint. This endpoint returns baseline estimates available for the specified dataset. Filtering is provided via a request body object and may expand over time.
Replace <YOUR_ACCESS_TOKEN> with the actual access token you obtained in Obtain an Access Token, and <DATASET_ID> with a dataset ID from Get the List of Supported Datasets.
Code Examples:
Here are examples of how to call the baselines endpoint:
curl -v 'https://developer.api.autodesk.com/sustainability/v3/datasets/<DATASET_ID>/baselines/list:filter' \
-X 'POST' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"filters": {}
}'
const accessToken = "<YOUR_ACCESS_TOKEN>";
const datasetId = "<DATASET_ID>";
const url = `https://developer.api.autodesk.com/sustainability/v3/datasets/${datasetId}/baselines/list:filter`;
const filterCriteria = {
filters: {}
};
fetch(url, {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify(filterCriteria)
})
.then(response => response.json())
.then(data => {
console.log(`Found ${data.results.length} baselines:`);
data.results.forEach((baseline, index) => {
console.log(`\nBaseline ${index + 1}:`);
console.log(` ID: ${baseline.id}`);
console.log(` Name: ${baseline.name}`);
console.log(` Description: ${baseline.description || 'N/A'}`);
console.log(` Declared Unit: ${baseline.declaredUnit?.qty} ${baseline.declaredUnit?.unit}`);
console.log(` Jurisdictions: ${(baseline.jurisdictions || []).join(', ')}`);
console.log(` Version: ${baseline.version || 'N/A'}`);
console.log(` Category IDs: ${(baseline.categoryIds || []).join(', ') || 'N/A'}`);
});
if (data.pagination && data.pagination.nextUrl) {
console.log(`\nMore results available. Next page: ${data.pagination.nextUrl}`);
}
})
.catch(error => console.error('Error:', error));
import requests
access_token = "<YOUR_ACCESS_TOKEN>"
dataset_id = "<DATASET_ID>"
url = f"https://developer.api.autodesk.com/sustainability/v3/datasets/{dataset_id}/baselines/list:filter"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
filter_data = { "filters": {} }
response = requests.post(url, headers=headers, json=filter_data)
if response.status_code == 200:
data = response.json()
print(f"Found {len(data['results'])} baselines:")
for index, baseline in enumerate(data['results'], 1):
print(f"\nBaseline {index}:")
print(f" ID: {baseline['id']}")
print(f" Name: {baseline.get('name', 'N/A')}")
print(f" Description: {baseline.get('description', 'N/A')}")
du = baseline.get('declaredUnit') or {}
if 'qty' in du and 'unit' in du:
print(f" Declared Unit: {du['qty']} {du['unit']}")
print(f" Jurisdictions: {', '.join(baseline.get('jurisdictions', []))}")
print(f" Version: {baseline.get('version', 'N/A')}")
print(f" Category IDs: {', '.join(baseline.get('categoryIds', [])) or 'N/A'}")
# Handle pagination
if data.get('pagination') and data['pagination'].get('nextUrl'):
print(f"\nMore results available. Next page: {data['pagination']['nextUrl']}")
else:
print(f"Error: {response.status_code} - {response.text}")
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
public class BaselinesService
{
private readonly HttpClient _httpClient;
public BaselinesService()
{
_httpClient = new HttpClient();
}
public async Task GetBaselinesAsync(string accessToken, string datasetId)
{
string url = $"https://developer.api.autodesk.com/sustainability/v3/datasets/{datasetId}/baselines/list:filter";
_httpClient.DefaultRequestHeaders.Clear();
_httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
_httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
var filterData = new { filters = new { } };
string jsonContent = JsonConvert.SerializeObject(filterData);
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
try
{
HttpResponseMessage response = await _httpClient.PostAsync(url, content);
response.EnsureSuccessStatusCode();
string responseContent = await response.Content.ReadAsStringAsync();
dynamic data = JsonConvert.DeserializeObject(responseContent);
Console.WriteLine($"Found {data.results.Count} baselines:");
for (int i = 0; i < data.results.Count; i++)
{
var baseline = data.results[i];
Console.WriteLine($"\nBaseline {i + 1}:");
Console.WriteLine($" ID: {baseline.id}");
Console.WriteLine($" Name: {baseline.name ?? "N/A"}");
Console.WriteLine($" Description: {baseline.description ?? "N/A"}");
if (baseline.declaredUnit != null)
{
Console.WriteLine($" Declared Unit: {baseline.declaredUnit.qty} {baseline.declaredUnit.unit}");
}
Console.WriteLine($" Jurisdictions: {string.Join(", ", baseline.jurisdictions ?? new string[]{ })}");
Console.WriteLine($" Version: {baseline.version ?? "N/A"}");
Console.WriteLine($" Category IDs: {string.Join(", ", baseline.categoryIds ?? new string[]{})}");
}
if (data.pagination?.nextUrl != null)
{
Console.WriteLine($"\nMore results available. Next page: {data.pagination.nextUrl}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
Step 2: Understanding the Response
A successful response will return a JSON object containing a list of baseline entries:
{
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Generic Concrete Mix",
"declaredUnit": {
"qty": 1,
"unit": "m3"
},
"description": "Standard concrete baseline for structural applications",
"jurisdictions": ["US", "CA"],
"version": "2025",
"categoryIds": ["cat-masterformat-030000"]
}
],
"pagination": {
"offset": 0,
"limit": 100,
"totalResults": 150,
"nextUrl": "https://developer.api.autodesk.com/sustainability/v3/datasets/{datasetId}/baselines/list:filter?offset=100&limit=100"
},
"appliedFilters": {},
"ignoredFilters": {}
}
Key Response Fields:
results: Array of baseline itemsid: Unique identifier for the baseline recordname: Name of the baseline or generic estimatedeclaredUnit: Declared unit for measurements (qty and unit)description: Brief description of the baselinejurisdictions: Geographic coverage for which the baseline appliesversion: Refers to the period for which the baseline is validcategoryIds: Category identifiers for the baseline (required field)pagination: Pagination information for large result setsappliedFilters: Map of filter keys to the requested vs. applied filter values (with optional warnings when a value was dropped)appliedFilters.*.requested: The filter value the client asked for (object withopandvalue)appliedFilters.*.applied: The filter value the connector actually applied (object withopandvalue)appliedFilters.*.warnings: Optional human-readable notes about values that could not be appliedignoredFilters: Map of unrecognised filter keys to the reason they were ignoredignoredFilters.*.reason: Human-readable explanation of why the filter key was not used
Step 3: Working with Baselines
Practical Uses:
- Early Design Benchmarking: Use baselines when product-specific EPDs are not yet selected
- Comparisons: Compare baseline values to understand typical environmental impacts
- Regional Context: Consider
jurisdictionsto ensure regionally relevant analysis
Pagination Handling:
When dealing with many baselines, use pagination. Check pagination.nextUrl to fetch additional pages until it is absent.
Notes on Filtering:
Filtering is provided via the request body and may expand in future releases. For now, sending an empty filters object will return the available baselines for the dataset.
Troubleshooting:
If you encounter any errors while making this request, please refer to the Error Handling section of this guide for detailed information about common error codes and their solutions.