Request

Response

    Budget Code Segment Values
    GET

    v1/containers/{containerId}/segment-values

    Retrieves the defined segment values for the specified budget code segment.

    Note that this endpoint is compatible with both BIM 360 and Autodesk Construction Cloud (ACC) projects.

    Resource Information

    Method and URI
    GET
    https://developer.api.autodesk.com/cost/v1/containers/:containerId/segment-values
    Authentication Context
    user context required
    Required OAuth Scopes
    data:read
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    region
    string
    The region where the project data resides, to which this request is routed.

    This header is optional because the request is automatically routed to a target region based on the project ID or container ID. Using the header, though, can save lookup time on each API call. For information about verifying the region the data resides in, see the Working with BIM 360 Services in Different Regions section on the API Basics page.

    Possible values: EMEA, US. For the full list of supported regions, see the Regions page.

    * Required

    Request

    URI Parameters

    containerId
    string: UUID
    The ID of the cost container for the project. Each project is assigned a container that stores all of the cost data for the project.

    To find the container ID, see the Retrieve a Cost Container ID tutorial.

    In ACC projects, the container ID is the same as the project ID. To obtain a project ID, use GET projects.

    Request

    Query String Parameters

    filter[segmentId]
    array: string: uuid
    The budget code segment ID. Separate multiple IDs with commas. For example, filter[segmentId]=id1,id2.
    filter[code]
    array: string
    Returns only items that are identified by the specified codes (separated by commas). For example, filter[code]="2703,2704".

    Note that even single codes in number format must be enclosed in double quotes:filter[code]="1" or filter[code]="122. 221".

    filter[originalCode]
    array: string
    Returns only the values of segments with the specified original codes, including delimiters. For example, filter[originalCode]=27-03,27-04.
    filter[id]
    array: string: uuid
    Returns only the items that are identified by the provided list of item IDs. Separate multiple IDs with commas. For example, filter[id]=id1,id2.
    filter[parentId]
    array: string: uuid
    Returns only the values of segments with the specified IDs of parent segments. Separate multiple parent IDs with commas. For example, filter[parentId]=parentId1,parentId2. You can also return the values of segments that have no parent by including filter[parentId]=blank.
    filter[lastModifiedSince]
    string
    Returns only items that were modified since the specified date and time, in ISO 8601 format. For example, filter[lastModifiedSince]=2020-03-01T13:00:00Z.
    limit
    int
    The maximum number of records that this endpoint returns per page. Default: 100.

    Note that a returned page may contain fewer items than the limit under either of these conditions:

    • There are fewer items found than the limit value.
    • The last page of a set is returned.
    sort
    string
    The sort order for items. Each attribute can be sorted in either asc (default) or desc order. For example, sort=name, updatedAt desc or sort=name + updatedAt desc sorts the results first by name in ascending order, then by date updated in descending order.
    cursorState
    string
    The cursor token to get the next page of results.

    Response

    HTTP Status Code Summary

    200
    OK
    Success
    400
    Bad Request
    The parameters are invalid.
    401
    Unauthorized
    The provided bearer token is invalid.
    403
    Forbidden
    Forbidden. The user or service represented by the bearer token does not have permission to perform this operation.
    404
    Not Found
    The resource or endpoint cannot be found.
    409
    Conflict
    The request could not be completed due to a conflict with the current state of the resource.
    429
    Too Many Requests
    Rate limit exceeded. Retry your request after a few minutes.
    500
    Internal Server Error
    An unexpected error occurred on the server.
    503
    Service Unavailable
    Service unavailable.

    Response

    Body Structure (200)

    Expand all
    pagination
    object
    Pagination information when data must be returned page by page.
    limit
    int
    Maximum number of items returned in this response.
    totalResults
    int
    Total number of items. Optional.
    nextUrl
    string
    URL for the next page of records.

    Max length: 2000

    results
    array: object
    The detailed segment definition values
    id
    string: UUID
    The ID of the code.
    segmentId
    string: UUID
    The ID of the segment this code belongs to.
    parentId
    string,null
    The parent ID of this code if it is the sub item of another code.
    code
    string
    The display code.

    Max length: 255

    originalCode
    string
    The original value of the code before the delimiters are removed.

    Max length: 255

    description
    string
    The description of the code.

    Max length: 2048

    createdAt
    datetime: ISO 8601
    The date and time that the item was created, in ISO 8601 format.
    updatedAt
    datetime: ISO 8601
    The date and time that the item was last updated, in ISO 8601 format.

    Example

    Success

    Request

    curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/segment-values?filter[lastModifiedSince]=2020-03-01T13:00:00Z&limit=100&sort=name,createdAt desc&cursorState=AMMAEACAtgALYWRzay53aXBkZXYNZnMuZmlsZS5hZGRlZAZmb2xk' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
    

    Response

    {
      "pagination": {
        "limit": 20,
        "totalResults": 1,
        "nextUrl": ""
      },
      "results": [
        {
          "id": "229d3420-9481-11e8-87fb-215990a8aeb3",
          "segmentId": "87256c07-5c03-42cd-b4dc-e9d06411c0cc",
          "parentId": "null",
          "code": 6656,
          "originalCode": "01 50 00",
          "description": "Temporary Facilities and Controls",
          "createdAt": "2019-01-06T01:24:22.678Z",
          "updatedAt": "2019-09-05T01:00:12.989Z"
        }
      ]
    }
    
    Show More