Request

Response

    Projects
    POST

    projects/ndas

    Creates an NDA attachment that can be set on a project.

    This endpoint returns a temporary URL and form data with which you must upload an attachment. The upload URL will expire at the time indicated by the expiresAt value in the response.

    Take the ID from the response and set it as ndaId in POST and PATCH /projects to require the attached NDA on a given project.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/construction/buildingconnected/v2/projects/ndas
    Authentication Context
    User context required
    Required OAuth Scopes
    data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow.
    Content-Type*
    string
    Must be application/json
    * Required

    Request

    Body Structure

    name*
    string
    The attachment’s file name.

    The name is required and must not be empty.

    size*
    number
    The attachment’s size in bytes.

    If this value doesn’t match the detected size of the file upon upload, it will be automatically corrected to the actual size.

    The request will fail with an error when the size exceeds the limit on the underlying storage.

    * Required

    Response

    HTTP Status Code Summary

    201
    Created
    Created
    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.
    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 (201)

    Expand all
    id
    string
    The unique ID of the attachment.

    Max length: 24

    name
    string
    The name of the attachment.
    size
    number
    The size of the attachment in bytes.
    method
    enum:string
    The HTTP method to use for the upload. Possible values: POST, PUT
    url
    string
    The URL to use for uploading the attachment to cloud storage. This URL will expire after 2 minutes (at the time indicated by the value of expiresAt).

    Note that you must begin the upload before the URL expires, but the subsequent data transfer can take much longer.

    headers
    object
    The HTTP headers to add to the upload request.
    *
    string
    formData
    object
    If this object is present in the response, the upload must be encoded as multipart/form-data with key-value pairs in this object as form-data and the file data as file in the form.

    If this object is absent from the response, the upload must be sent as binary data.

    expiresAt
    datetime: ISO 8601
    The time at which the upload URL expires.

    Example

    Created

    Request

    curl -v 'https://developer.api.autodesk.com/construction/buildingconnected/v2/projects/ndas' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": "attachment.pdf",
            "size": 1253011
          }'
    
    Show More

    Response

    {
      "id": "5d1ca35b3935dc00a8b18d79",
      "name": "attachment.pdf",
      "size": 524288,
      "method": "POST",
      "url": "https://s3.amazonaws.com/files.buildingconnected.com/",
      "headers": {},
      "formData": {
        "policy": "ABCDEFGHIJKLMNOP=",
        "signature": "cdefghijklmnop=,",
        "key": "/attachments/1234567/xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "Content-Type": "application/pdf",
        "AWSAccessKeyId": "ACCESS_KEY_ID",
        "acl": "private",
        "Content-Disposition": "attachment;filename*=UTF-8''doc.pdf;filename=\"doc.pdf\"",
        "success_action_status": 201
      },
      "expiresAt": "2021-08-19T23:09:16.083Z"
    }
    
    Show More