Request

Response

    Add a new item to the library
    POST

    v1alpha/library-items

    This endpoint allows you to create and add a new item to the library

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/forma/library/v1alpha/library-items
    Authentication Context
    user context required
    Required OAuth Scopes
    data:read data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    X-Ads-Region
    string
    Specifies the geographical location (region) of the service. US or EMEA. Defaults to US.
    Content-Type*
    string
    Must be application/json
    * Required

    Request

    Query String Parameters

    authcontext*
    string
    * Required

    Request

    Body Structure

    Expand all
    elementUrn
    string
    status
    enum:string
    Possible values: pending, failed, success
    name
    string
    Max length: 100
    properties
    object
    *

    Response

    HTTP Status Code Summary

    201
    Created
    The item was successfully created and added to the library. The response contains the newly created item.
    400
    Bad Request
    Malformed request. The request body is not valid according to the schema. See response for details.
    401
    Unauthorized
    Bearer token is not valid
    403
    Forbidden
    Token does not have access to the specified project. Are you in the right region?
    500
    Internal Server Error
    Internal server error

    Response

    Body Structure (201)

    Expand all
    authcontext
    string
    id
    string
    elementUrn
    string
    name
    string
    createdAt
    datetime: ISO 8601
    Library items created before 2024-02-13 do not contain the created time
    updatedAt
    datetime: ISO 8601
    status
    enum:string
    Possible values: pending, failed, success
    failedReason
    string
    For a library item with status failed additional information might be available in this property
    properties
    object
    *

    Example

    The item was successfully created and added to the library. The response contains the newly created item.

    Request

    curl -v 'https://developer.api.autodesk.com/forma/library/v1alpha/library-items?authcontext=pro_123' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "elementUrn": "",
            "status": "pending",
            "name": "",
            "properties": {}
          }'
    
    Show More

    Response

    {
      "authcontext": "",
      "id": "",
      "elementUrn": "",
      "name": "",
      "createdAt": "",
      "updatedAt": "",
      "status": "pending",
      "failedReason": "",
      "properties": {}
    }
    
    Show More