Request

Response

    Updates an enumeration.
    PATCH

    v1/enumerations/{enumerationId}

    Updates an enumeration with the given properties, including content.

    Resource Information

    Method and URI
    PATCH
    https://developer.api.autodesk.com/parameters/v1/enumerations/{enumerationId}
    Authentication Context
    user context required
    Required OAuth Scopes
    data:create or data:write
    Data Format
    JSON

    Note: Data will be updated according to the JSON Merge Patch protocol.

    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 the hub’s data is provisioned in. Currently supports US, EMEA, AUS, IND, DEU, JPN, CAN, and GBR. Default is US.
    * Required

    Request

    URI Parameters

    enumerationId
    string
    The ID of the enumeration you are updating.

    Request

    Query String Parameters

    accountId*
    string: UUID or string: b.UUID
    The Autodesk Forma hub ID.
    * Required

    Request

    Body Structure

    Object

    name*
    string
    The enumeration name.
    content*
    object
    The enumeration content. Must be non empty map with keys of type string and values of type number.
    * Required

    Response

    HTTP Status Code Summary

    200
    OK
    Successfully updated the given enumerations.
    400
    Bad Request
    The request could not be understood by the server due to malformed syntax. This may occur when enumerations validation fails, such as when the enumerations name is too long or contains prohibited symbols. The response should include what validation rule was violated.
    401
    Unauthorized
    Request has not been applied because it lacks valid authentication credentials for the target resource.
    403
    Forbidden
    The server understood the request but refuses to authorize it.
    404
    Not Found
    The resource cannot be found.
    406
    Not Acceptable
    The server cannot produce a response matching the list of acceptable values defined in the request.
    410
    Gone
    Access to the target resource is no longer available.
    429
    Too Many Requests
    User has sent too many requests in a given amount of time.
    500
    Internal Server Error
    An unexpected error occurred on the server.
    503
    Service Unavailable
    Server is not ready to handle the request.

    Response

    Successfully Updated Enumeration (200)

    Body Structure (200)

    Expand all
    results
    array: object
    id
    string
    The enumeration ID with new version number.
    previousRevisionId
    string
    The previous ID of the enumeration before it was updated.
    name
    string
    The enumeration name.
    content
    array: object
    The enumeration content. Must be non empty map with keys of type string and values of type number.
    createdBy
    string
    User that created the enumeration.
    createdAt
    string
    A Time ISO 8601 Timestamp in UTC Timezone indicating when the enumeration was created.

    Example

    Successfully Updated Enumeration (200).

    Request

    curl -v 'https://developer.api.autodesk.com/parameters/v1/enumerations/parameters.b3aef626f5354c7aa032c1048416f5ea:61712b031b1e49e897e3cf1643dea73e-1.0.0?accountId=b3aef626-f535-4c7a-a032-c1048416f5ea' \
      -X 'PATCH' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": "Project Phase",
            "content": [
                {
                  "id": "Pre-Design",
                  "value": 0
                },
                {
                  "id": "Schematic Design",
                  "value": 1
                },
                {
                  "id": "Design Development",
                  "value": 2
                },
                {
                  "id": "Bidding",
                  "value": 3
                },
                {
                  "id": "Permitting",
                  "value": 4
                },
                {
                  "id": "Construction",
                  "value": 5
                }
            ]
          }'
    
    Show More

    Response

    {
      "results": [
          {
              "id": "parameters.b3aef626f5354c7aa032c1048416f5ea:61712b031b1e49e897e3cf1643dea73e-2.0.0",
              "name": "Project Phase",
              "content": [
                {
                  "id": "Pre-Design",
                  "value": 0
                },
                {
                  "id": "Schematic Design",
                  "value": 1
                },
                {
                  "id": "Design Development",
                  "value": 2
                },
                {
                  "id": "Bidding",
                  "value": 3
                },
                {
                  "id": "Permitting",
                  "value": 4
                },
                {
                  "id": "Construction",
                  "value": 5
                }
              ],
              "createdBy": "FXA2K4JGR5BECGSF",
              "createdAt": "2024-11-11T16:22:29+0000"
          }
      ]
    }
    
    Show More