Request

Response

    POST

    projects/:projectId/folders/:folderUrn/aggregates/:aggregateId/versions/:version/snapshots

    Creates a snapshot by compiling the filter of the aggregate version specified by {version} against the source file versions in the request body. The {version} does not have to be the latest aggregate version.

    sourceVersions must contain 1 to 1,000 version URNs, each identifying a successful translation of a document in the project that the caller has permission to read. Duplicates are removed.

    Processing starts automatically: the new snapshot is returned with the status Pending. Poll Get Aggregate Snapshot until the status is Successful or Failed.

    Snapshots are retained for 30 days from creation, after which they are automatically deleted.

    The response contains information about the created aggregate snapshot.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/construction/aggregate/v1/projects/:projectId/folders/:folderUrn/aggregates/:aggregateId/versions/:version/snapshots
    Authentication Context
    user context required
    Required OAuth Scopes
    data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    Content-Type*
    string
    Must be application/json
    region
    string
    The region to which your request should be routed. If not set, the request is routed automatically but may incur a small latency increase.

    For the full list of supported regions, see the Regions page.

    The API continues to support x-ads-region for backward compatibility.

    * Required

    Request

    URI Parameters

    projectId
    string: UUID
    The GUID that uniquely identifies the project.
    folderUrn
    string
    The folder URN of the aggregate folder. See Aggregate Folders.
    aggregateId
    string: UUID
    The aggregate ID.
    version
    int
    The version number.

    Request

    Query Parameters

    disableInstancing
    boolean
    If true, the snapshot is created as a record only: it is not instanced, no aggregate instance content is compiled for it, and its status is set to NotInstanced rather than Pending.

    Request

    Body Structure

    Expand all
    sourceVersions*
    array: string
    The array of source file versions used to compile the aggregate version.

    Min items: 1. Max items: 1000.

    id
    string: UUID
    The ID of the new aggregate snapshot.
    name*
    string
    The display name for this snapshot.

    Min length: 1. Max length: 128.

    description
    string
    The description for this snapshot.

    Min length: 1. Max length: 256.

    compositeContext
    object
    Optional context to pass to a composite if one is created from the snapshot.
    customProperties
    object
    Options pertaining to Custom Properties to be passed to the Aggregate Composite.
    timestamp
    datetime: ISO 8601
    Timestamp when the user initiated creation of the aggregate instance.
    active
    boolean
    Determines if custom properties are included in the snapshot.
    * Required

    Response

    HTTP Status Code Summary

    200
    OK
    Success
    400
    Bad Request
    The parameters of the requested operation are invalid.
    401
    Unauthorized
    The provided bearer token is not valid.
    403
    Forbidden
    The user or service represented by the bearer token does not have permission to perform this operation.
    404
    Not Found
    The requested resource could not be found.
    415
    Unsupported Media Type
    The Content-Type header must be application/json.
    429
    Too Many Requests
    Rate limit exceeded. Wait some time before retrying. The Retry-After header might provide the amount of the time to wait.
    500
    Internal Server Error
    An unknown error occurred on the server.

    Response

    Body Structure (200)

    Expand all
    sourceVersions
    array: string
    The array of source file versions used to compile the aggregate version.

    Min items: 1. Max items: 1000.

    aggregateId
    string: UUID
    The aggregate ID.
    version
    int
    The aggregate version.
    status
    enum: string
    The creation status of the aggregate snapshot.

    Possible values: Pending, Processing, Successful, Failed, NotInstanced.

    includeIndex
    int
    The zero-based include section index used when instancing, if any. Omitted when all non-disabled include sections were instanced together. Maximum is 49 because aggregate versions allow at most 50 include sections (same maxItems limit as include on newAggregateVersion) and this index is zero-based.
    content
    object
    The location of the compiled content. Present only when status is Successful; null otherwise. Fetch content.url directly, with the headers in content.headers, to download the compiled content. The URL expires at content.validUntil.
    url
    string
    The signed URL to send an HTTP GET to, to download the compiled content.
    headers
    object
    The HTTP headers that must accompany the GET request to url.
    validUntil
    datetime: ISO 8601
    The time in UTC that the URL and headers will stop working.
    error
    object
    An optional error if the status is Failed.
    type
    string
    The error code.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    errors
    array: object
    A set of specific validation errors that need to be fixed.
    field
    string
    The field that failed validation.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    type
    string
    The error code.
    id
    string: UUID
    The ID for this snapshot.
    createdBy
    string
    The identity associated with the creator of this snapshot.
    createdAt
    datetime: ISO 8601
    The date and time this snapshot was created.
    updatedBy
    string
    The identity associated with the last modification to this snapshot.
    updatedAt
    datetime: ISO 8601
    The date and time this snapshot was last updated.
    checksum
    string
    An opaque string describing the current state of the object, used to prevent update collisions.
    name
    string
    The display name for this snapshot.

    Min length: 1. Max length: 128.

    description
    string
    The description for this snapshot.

    Min length: 1. Max length: 256.

    Response

    Body Structure (400)

    Expand all
    type
    string
    The error code.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    errors
    array: object
    A set of specific validation errors that need to be fixed.
    field
    string
    The field that failed validation.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    type
    string
    The error code.

    Example #1 (no query parameters)

    Request

    curl -v 'https://developer.api.autodesk.com/construction/aggregate/v1/projects/84e30b95-f6d2-3553-391f-f2747a3017e0/folders/urn%3aadsk.wipprod%3afs.folder%3aco.WI8roO18TU2Cl3P9y64z4w/aggregates/fe5509ba-05c9-2445-b95a-7a3d8b547265/versions/42/snapshots' \
         -X POST \
         -H 'Authorization: Bearer <token>' \
         -H 'Content-Type: application/json' \
         -d '{
               "sourceVersions": [
                 "urn:adsk.wipprod:fs.file:vf.b909RzMKR4mhc3O7UBY_8g?version=2"
               ],
               "name": "Aggregate snapshot name",
               "description": "Aggregate snapshot description",
               "compositeContext": {}
             }'
    
    Show More

    Example #2 (with all query parameters)

    Request

    curl -v 'https://developer.api.autodesk.com/construction/aggregate/v1/projects/84e30b95-f6d2-3553-391f-f2747a3017e0/folders/urn%3aadsk.wipprod%3afs.folder%3aco.WI8roO18TU2Cl3P9y64z4w/aggregates/fe5509ba-05c9-2445-b95a-7a3d8b547265/versions/42/snapshots?disableInstancing=False' \
         -X POST \
         -H 'Authorization: Bearer <token>' \
         -H 'Content-Type: application/json' \
         -d '{
               "sourceVersions": [
                 "urn:adsk.wipprod:fs.file:vf.b909RzMKR4mhc3O7UBY_8g?version=2"
               ],
               "name": "Aggregate snapshot name",
               "description": "Aggregate snapshot description",
               "compositeContext": {}
             }'
    
    Show More

    Response (200)

    {
      "sourceVersions": [
        "urn:adsk.wipprod:fs.file:vf.b909RzMKR4mhc3O7UBY_8g?version=2"
      ],
      "aggregateId": "fe5509ba-05c9-2445-b95a-7a3d8b547265",
      "version": 42,
      "status": "Successful",
      "includeIndex": "0",
      "content": {
        "url": "https://example.com/6f760056-db07-4239-ba4c-d9739ac50142/instance.json.gz?token=da39a3ee5e6b4b0d3255bfef95601890afd80709",
        "headers": {},
        "validUntil": "2015-10-21T16:29:19.000Z"
      },
      "error": {
        "type": "BadInput",
        "title": "One or more input values in the request were bad",
        "detail": "The following parameters are invalid: containerId",
        "errors": [
          {
            "field": "containerId",
            "title": "Invalid parameter",
            "detail": "The value 'testing' is not valid.",
            "type": "BadInput"
          }
        ]
      },
      "id": "74b70bb8-8802-a1fd-f201-890375a60c8f",
      "createdBy": "PD23PXGV8V3V",
      "createdAt": "2015-10-21T16:31:31.000Z",
      "updatedBy": "PD23PXGV8V3V",
      "checksum": "7215ee9c7d9dc229d2921a40e899ec5f",
      "name": "Aggregate snapshot name",
      "description": "Aggregate snapshot description"
    }
    
    Show More

    Response (400)

    {
      "type": "BadInput",
      "title": "One or more input values in the request were bad",
      "detail": "The following parameters are invalid: containerId",
      "errors": [
        {
          "field": "containerId",
          "title": "Invalid parameter",
          "detail": "The value 'testing' is not valid.",
          "type": "BadInput"
        }
      ]
    }
    
    Show More