Request

Response

    Creates new parameters.
    POST

    v1/accounts/{accountId}/groups/{groupId}/collections/{collectionId}/parameters

    Creates new parameters definitions. Definition data is immutable, and it includes id, name, dataTypeId and readOnly. The maximum number per request is 50. For setting description and metadata, use the update parameters API to set them. Parameters should be created in your default collection and shared to other collections as needed, in order to match the behavior of the Parameters Service.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/parameters/v1/accounts/{accountId}/groups/{groupId}/collections/{collectionId}/parameters
    Authentication Context
    user context required
    Required OAuth Scopes
    data:create
    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 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

    accountId
    string: UUID or string: b.UUID
    The Autodesk Forma hub ID.
    groupId
    string
    The group ID. Currently, only one group is supported, and group id is equal to hub id. (Supporting multiple groups is considered for future enhancement).
    collectionId
    string
    The collection ID.

    Request

    Body Structure

    Object:Array

    id
    string
    (optional) The parameter ID. If specified, it must be a UUID without hyphens. If omitted, the system will automatically generate a new UUID without hyphens.
    name*
    string
    The parameter name. The length of the parameter name is limited to 255 characters. A parameter name can’t be a restricted word: mm cm m km log sqrt sin cos tan asin acos atan exp abs pi round roundup rounddn A parameter name can’t contain any of these prohibited symbol(s): \ : { } [ ]`
    dataTypeId*
    string
    The parameter data type ID. It could be either a parameter spec ID or a category ID. When used as a “data type” identifier, a category ID indicates the “Family Type” spec with that category. Lookup the spec ID in the response of the GET /specs Endpoint. Lookup the category ID in the response of the GET /classifications/categories Endpoint. For more information about spec and category, pleas refer to the Field Guide.
    readOnly*
    boolean
    Indicates if the parameter is to be treated as read-only or not by a UI client. Immutable once set.
    * Required

    Response

    HTTP Status Code Summary

    201
    Created
    Successfully created the parameters.
    207
    Partial Success
    Successfully created some of the parameters, with errors for some parameters in the batch.
    400
    Bad Request
    The request could not be understood by the server due to malformed syntax. This may occur when parameter validation fails, such as when the parameter 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
    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

    Body Structure (201)

    Expand all
    results
    array: object
    The parameter creation results.
    id
    string
    The parameter ID.
    name
    string
    The parameter name.
    specId
    string
    The parameter spec ID.
    readOnly
    boolean
    Indicates if the parameter is to be treated as read-only or not by a UI client. Immutable once set.
    createdBy
    string
    User that created the parameter.
    createdAt
    string
    A Time ISO 8601 Timestamp in UTC Timezone indicating when the parameter was created.

    Body Structure (207)

    Expand all
    results
    array: object
    The parameter creation results.
    id
    string
    The parameter ID.
    name
    string
    The parameter name.
    specId
    string
    The parameter spec ID.
    readOnly
    boolean
    Indicates if the parameter is to be treated as read-only or not by a UI client. Immutable once set.
    createdBy
    string
    User that created the parameter.
    createdAt
    string
    A Time ISO 8601 Timestamp in UTC Timezone indicating when the parameter was created.
    errors
    array: object
    The errors.
    id
    string
    The resource ID.
    title
    string
    The error title.
    detail
    string
    The error detail.
    code
    string
    The error code.

    Example

    Successfully Created Parameter(s) (201)

    Request

    curl -v 'https://developer.api.autodesk.com/parameters/v1/accounts/009777bb-e1e5-4577-9800-0789677e4616/groups/009777bb-e1e5-4577-9800-0789677e4616/collections/a9974bd0-546d-4cba-a434-cdea5fb70bf8/parameters' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '[
            {
              "name": "window width",
              "dataTypeId": "autodesk.spec.aec:length-2.0.0",
              "readOnly": true
            },
            {
              "name": "window length",
              "dataTypeId": "autodesk.spec.aec:length-2.0.0",
              "readOnly": true
            }
          ]'
    
    Show More

    Response

    {
      "results": [
        {
          "id": "parameters.009777bbe1e5457798000789677e4616:9fa3644ac1984fca987fe1d5dc701120-1.0.0",
          "name": "window width",
          "specId": "autodesk.spec.aec:length-2.0.0",
          "readOnly": true,
          "createdBy": "200809200167579",
          "createdAt": "2023-10-03T22:29:43+0000"
        },
        {
          "id": "parameters.009777bbe1e5457798000789677e4616:885621e67e7f4e49b9754b657ea476dc-1.0.0",
          "name": "window length",
          "specId": "autodesk.spec.aec:length-2.0.0",
          "readOnly": true,
          "createdBy": "200809200167579",
          "createdAt": "2023-10-03T22:29:43+0000"
        }
      ]
    }
    
    Show More

    Partial Success Creating Parameters (207)

    Request

    curl -v 'https://developer.api.autodesk.com/parameters/v1/accounts/009777bb-e1e5-4577-9800-0789677e4616/groups/009777bb-e1e5-4577-9800-0789677e4616/collections/a9974bd0-546d-4cba-a434-cdea5fb70bf8/parameters' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '[
            {
              "name": "window width",
              "dataTypeId": "autodesk.spec.aec:length-2.0.0",
              "readOnly": true
            },
            {
              "id": "00016da1684048688663e3cbf876bfea",
              "name": "window length",
              "dataTypeId": "autodesk.spec.aec:length-2.0.0",
              "readOnly": true
            }
          ]'
    
    Show More

    Response

    {
        "results": [
            {
                "id": "parameters.3141915a7869420d80958d16d4756946:5abbf49c15bc450ea65a97d34a31fe49-1.0.0",
                "name": "one param",
                "specId": "autodesk.spec:spec.int64-2.0.0",
                "readOnly": false,
                "createdBy": "YZVYJQWWAJ89",
                "createdAt": "2023-11-08T22:03:18+0000"
            }
        ],
        "errors": [
            {
                "id": "parameters.3141915a7869420d80958d16d4756946:00016da1684048688663e3cbf876bfea-1.0.0",
                "code": "PARAMETER-DUPLICATED-PARAMETER",
                "title": "Duplicated parameter",
                "detail": "The parameter with the given ID already exists"
            }
        ]
    }
    
    Show More