Request

Response

    Create a new upload
    POST

    spaces/{spaceId}/uploads

    Create a new upload for a single resource. Optionally, presigned URLs for upload can be retrieved. See the getUploadUrlsForResource operation for details and limits.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/flow/storage/v1/spaces/{spaceId}/uploads
    Authentication Context
    user context optional
    Required OAuth Scopes
    data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via either a two-legged or three-legged OAuth flow.
    region
    string
    The region targeted by the request. The usage of this header is recommended for faster processing. The region specified must match the region in which the targeted storage space was created or else the request will fail.
    Content-Type*
    string
    Must be application/json
    * Required

    Request

    URI Parameters

    spaceId
    string
    The ID of the storage space.

    Request

    Query String Parameters

    expirationInMinutes
    int
    Specify the desired expiry time in minutes.

    Request

    Body Structure

    Expand all
    cacheControl
    string
    Specifies caching directives to control caching in browsers and shared caches for a resource.
    contentDisposition
    string
    Specifies the content disposition for a resource.
    contentEncoding
    string
    Specifies the content encoding for a resource.
    contentType
    string
    Specifies the content type for a resource.
    resourceId*
    string
    A unique ID for a specific resource
    uploadUrls
    object
    Optionally generate upload URLs for the created upload. Storage providers may impose further limits on the number of URLs that can be generated in one request.
    partId
    int
    ID for an individual upload part
    numParts
    int
    A number of parts, with imposed limits.
    * Required

    Response

    HTTP Status Code Summary

    201
    Created
    Created
    400
    Bad Request
    Bad request - indicates an incorrectly structured or otherwise incorrect request.
    401
    Unauthorized
    Unauthorized - credentials are invalid or not provided in the request
    403
    Forbidden
    Forbidden - the user/entity does not have the required privileges to access this resource
    404
    Not Found
    The specified resource was not found
    429
    Too Many Requests
    Too Many Requests

    Response

    Header (429)

    Retry-After
    integer
    Specifies how many seconds to wait before making a new request.

    Response

    Body Structure (201)

    Expand all
    expiresAt
    datetime: ISO 8601
    The time at which the upload must be completed. If the upload is not completed by this date, the upload expires.
    id
    string
    An ID for a specific upload operation
    resourceId
    string
    A unique ID for a specific resource
    uploadUrls
    object
    Contains an ordered list of upload URLs for a single resource.
    expiresAt
    datetime: ISO 8601
    Time of expiration for the URLs. This expiration time is approximate and may not exactly match the real expiration time.
    urls
    array: object
    An array
    partId
    int
    ID for an individual upload part
    url
    string
    Upload URL for the part.

    Example

    This example creates a single upload for a resource named inputFile.

    Request

    curl -v 'https://developer.api.autodesk.com/flow/storage/v1/spaces/scratch:@default/uploads' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI...' \
      -H 'Content-Type: application/json'\
      -d '{
              "resourceId": "inputFile"
          }'
    

    Response

    {
      "expiresAt": "2024-04-28T00:00:00Z",
      "id": "AQICAHjdZwoyNEgA8bmp66wGy6Ir3...",
      "resourceId": "inputFile"
    }