Aggregate Extensions
Extensions act as classifiers for aggregates: the extensions carried by an aggregate describe what it represents. For example, an aggregate that carries a construction.modelCoordination:view-1.0.0 extension is a Model Coordination view, and an aggregate that carries a construction.navisworks:file-1.0.0 extension is backed by a Navisworks file.
Extensions are typed, schema-validated JSON payloads attached to an aggregate or to a project. Each extension is a pair of fields:
typeId- the unique, versioned identifier of an extension type, for exampleconstruction.modelCoordination:view-1.0.0extension- the extension value, a JSON object that must conform to the JSON Schema defined by the type
The Extension Type Catalog
Extension types are defined by the service, not by clients. Each type is identified by a namespaced, versioned ID of the form <namespace>:<name>-<version>, and every extension value is validated against the JSON Schema (draft-07) published by its type.
The extension types documented in this section are:
- Model Coordination View (
construction.modelCoordination:view-1.0.0, core) - classifies the aggregate as a Model Coordination view. - Model Coordination Clash Check (
construction.modelCoordination:clashCheck-1.0.0, core) - stores the configuration of a clash check. - Model Coordination Clash Filter (
construction.modelCoordination:clashFilter-1.0.0, core) - stores named clash filter definitions. - Search Set (
construction.modelCoordination:searchSet-1.0.0, core) - classifies the aggregate as a saved search set. - Build Schedule Activity Link (
construction.build:scheduleActivityLink-1.0.0, core) - links the aggregate to a Build schedule activity. - Design Collaboration Change (
construction.designCollaboration:change-1.0.0, core) - classifies the aggregate as a change, in any way your application needs. - Model Property Attributes (
construction.modelProperty:attributes-1.0.0) - describes the model properties referenced by the aggregate. - Navisworks File (
construction.navisworks:file-1.0.0) - associates the aggregate with a Navisworks (NWF) source file.
Core Extensions
Some extension types are marked as core in their schema. A core extension is the primary classifier of an aggregate - it defines what the aggregate is, for example a Model Coordination view or a search set. Two additional rules apply to core extensions:
- An aggregate can carry at most one core extension.
- Once attached, a core extension cannot be removed from the aggregate.
All other extension types supplement an aggregate with additional data, and can be attached and removed freely.
Placement
Every extension type declares which folderUrn values it supports: a document folder URN, project-level, or both. See Aggregate Folders for what the two kinds of value mean.
Supported folderUrn | Types |
|---|---|
project-level only |
construction.modelCoordination:searchSet-1.0.0 |
Document folder URN and project-level |
construction.modelProperty:attributes-1.0.0, construction.build:scheduleActivityLink-1.0.0 |
| Document folder URN only | All other types, including construction.modelCoordination:view-1.0.0, construction.modelCoordination:clashCheck-1.0.0, construction.modelCoordination:clashFilter-1.0.0 and construction.navisworks:file-1.0.0. |
Validation Rules
Whenever extensions are written - when an aggregate is created, updated, or when the extension endpoints are used - the service validates that:
- The extension type exists in the catalog.
- No more than one extension of the same type is attached to the same aggregate.
- The extension value conforms to the JSON Schema of its type.
- The core extension rules are respected (see Core Extensions).
- The extension type is valid for the placement level of the aggregate (see Placement).
Requests that violate any of these rules are rejected with a 400 Bad Request response.
Working With Extensions
Extensions are part of the extensions array of an aggregate and are returned whenever the aggregate is read:
{
"extensions": [
{
"typeId": "construction.modelCoordination:view-1.0.0",
"extension": {
"modelSetId": "a27748eb-d3d4-48ac-b4c2-1d17f7461ec2"
}
}
]
}
To create or update extensions on an existing aggregate, use PATCH folders/:folderUrn/aggregates/:aggregateId/extensions, the dedicated extensions endpoint. Extensions can also be written with the general PATCH folders/:folderUrn/aggregates/:aggregateId, whose request body takes an extensions array alongside the other updatable attributes.
Both endpoints require the aggregate’s current checksum - pass the value from your last read. The update is rejected with 409 Conflict if the aggregate has changed since then. See Checksum.
For example, to attach a model property attributes extension to an aggregate:
curl -v 'https://developer.api.autodesk.com/construction/aggregate/v1/projects/:projectId/folders/:folderUrn/aggregates/:aggregateId' \
-X PATCH \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"extensions": [
{
"typeId": "construction.modelProperty:attributes-1.0.0",
"extension": {
"propertyAttributes": [
{
"source": "BIM_PROPERTY",
"category": "__category__",
"type": "STRING",
"name": "Category"
}
]
}
}
],
"checksum": "7215ee9c7d9dc229d2921a40e899ec5f"
}'