Get Baseline Details
This task shows you how to retrieve detailed information for a specific baseline, including impact values and applicability details. Use baseline details to understand the underlying values behind generic estimates.
By the end of this task, you will know how to:
- Call the baseline details endpoint for a dataset
- Understand key fields in a baseline (impact values, declared unit, validity)
- Use a baseline ID from prior results to fetch details
You use the following operation for this task:
| Operation | HTTP Request |
|---|---|
| Get Baseline Details | GET /v3/datasets/{datasetId}/baselines/details/{baselineId} |
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
- Completed Filter Baselines and obtained a baseline ID from the baseline list
Step 1: Call the Baseline Details Endpoint
Use the access token from Obtain an Access Token, a dataset ID from Get the List of Supported Datasets, and a baseline ID from Filter Baselines to retrieve details about a specific baseline.
Replace <YOUR_ACCESS_TOKEN>, <DATASET_ID>, and <BASELINE_ID> with your values.
curl -v 'https://developer.api.autodesk.com/sustainability/v3/datasets/<DATASET_ID>/baselines/details/<BASELINE_ID>' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
-H 'Accept: application/json'
const accessToken = "<YOUR_ACCESS_TOKEN>";
const datasetId = "<DATASET_ID>";
const baselineId = "<BASELINE_ID>";
const url = `https://developer.api.autodesk.com/sustainability/v3/datasets/${datasetId}/baselines/details/${baselineId}`;
fetch(url, {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Accept': 'application/json'
}
})
.then(response => response.json())
.then(data => {
const baseline = data.data;
console.log('Baseline Details:', baseline);
console.log(`ID: ${baseline.id}`);
console.log(`Name: ${baseline.name}`);
console.log(`Category IDs: ${(baseline.categoryIds || []).join(', ')}`);
console.log(`Declared Unit: ${baseline.declaredUnit}`);
})
.catch(error => console.error('Error:', error));
import requests
access_token = "<YOUR_ACCESS_TOKEN>"
dataset_id = "<DATASET_ID>"
baseline_id = "<BASELINE_ID>"
url = f"https://developer.api.autodesk.com/sustainability/v3/datasets/{dataset_id}/baselines/details/{baseline_id}"
headers = {
'Authorization': f'Bearer {access_token}',
'Accept': 'application/json'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
baseline = data['data']
print(f"ID: {baseline['id']}")
print(f"Name: {baseline.get('name', 'N/A')}")
print(f"Category IDs: {', '.join(baseline.get('categoryIds', []))}")
print(f"Declared Unit: {baseline.get('declaredUnit', 'N/A')}")
else:
print(f"Error: {response.status_code} - {response.text}")
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
public class BaselineDetailsService
{
private readonly HttpClient _httpClient;
public BaselineDetailsService()
{
_httpClient = new HttpClient();
}
public async Task GetBaselineDetailsAsync(string accessToken, string datasetId, string baselineId)
{
string url = $"https://developer.api.autodesk.com/sustainability/v3/datasets/{datasetId}/baselines/details/{baselineId}";
_httpClient.DefaultRequestHeaders.Clear();
_httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
_httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
try
{
HttpResponseMessage response = await _httpClient.GetAsync(url);
response.EnsureSuccessStatusCode();
string jsonContent = await response.Content.ReadAsStringAsync();
dynamic data = JsonConvert.DeserializeObject(jsonContent);
var baseline = data.data;
Console.WriteLine($"ID: {baseline.id}");
Console.WriteLine($"Name: {baseline.name ?? "N/A"}");
Console.WriteLine($"Category IDs: {string.Join(", ", baseline.categoryIds ?? new string[]{})}");
Console.WriteLine($"Declared Unit: {baseline.declaredUnit ?? "N/A"}");
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
Step 2: Understanding the Response
The response returns a data object with key fields like name, declaredUnit, categoryIds, and validity information.
Example Response
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Generic Concrete Mix",
"categoryIds": [
"cat-masterformat-030000"
],
"declaredUnit": {
"qty": 1,
"unit": "m3"
},
"description": "Standard concrete baseline for structural applications",
"jurisdictions": ["US", "CA"],
"version": "2025",
"language": "en",
"link": "https://example.com/baseline"
},
"cacheRefreshTimestamp": "2021-06-01T00:00:00Z"
}
Key Response Fields:
data.id: Unique identifier for the baselinedata.name: Display name of the baselinedata.categoryIds: Array of category identifiers (empty array if none specified)data.declaredUnit: Functional unit for all impact values (object with qty and unit)data.description: Additional baseline detailsdata.jurisdictions: Geographic regions where the baseline appliesdata.version: Validity perioddata.language: Language code (ISO 639-1)data.link: URL to the original baseline resourcecacheRefreshTimestamp: When data was last cached
Practical Uses:
- Validate baseline selection for preliminary analysis
- Check validity periods and links for documentation
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.
Step 3: Working with Baseline Details
- For environmental impact data, use Baseline Impact Indicators to get detailed LCA metrics.
- Regional applicability: Ensure
data.jurisdictionsmatches your project region. - Validity window: Check
data.versionfor your reporting period. - Linking: Use
data.linkfor audit trails and documentation. - Caching: Use
cacheRefreshTimestampto assess data freshness.