Request

Response

    Create one or more new uploads
    POST

    spaces/{spaceId}/uploads:batch-create

    Create uploads for multiple resources.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/flow/storage/v1/spaces/{spaceId}/uploads:batch-create
    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

    Body Structure

    Expand all
    requests*
    array: object
    Contains a list of individual uploads to be created.
    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
    207
    Multi-Status
    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
    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
    results
    array: object
    List of successful results
    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.
    errors
    array: object
    Contains a list of errors that were encountered when trying to complete the request, one item per failed request.
    title
    string
    The title for the error
    type
    string
    A URI indicating the type of the error that if present can be used to programmatically check for certain error types. The URI is purely an identifier and clients should not automatically dereference the URI.
    detail
    string
    Provides more detail about the error
    resourceId
    string
    A unique ID for a specific resource

    Response

    Body Structure (207)

    Expand all
    results
    array: object
    List of successful results
    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.
    errors
    array: object
    Contains a list of errors that were encountered when trying to complete the request, one item per failed request.
    title
    string
    The title for the error
    type
    string
    A URI indicating the type of the error that if present can be used to programmatically check for certain error types. The URI is purely an identifier and clients should not automatically dereference the URI.
    detail
    string
    Provides more detail about the error
    resourceId
    string
    A unique ID for a specific resource

    Example

    This example creates an upload for resource inputFile1 and inputFile2.

    Request

    curl -v 'https://developer.api.autodesk.com/flow/storage/v1/spaces/scratch:@default/uploads:batch-create' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciO...' \
      -H 'Content-Type: application/json'\
      -d '{
            "requests": [
                {
                    "resourceId": "inputFile1"
                },
                {
                    "resourceId": "inputFile2"
                }
            ]
          }'
    
    Show More

    Response

    {
        "results": [
            {
                "expiresAt": "2024-04-28T00:00:00Z",
                "id": "AQICAHjdZwoyN...",
                "resourceId": "inputFile1"
            },
            {
                "expiresAt": "2024-04-28T00:00:00Z",
                "id": "AQICAHjdZwoyN...",
                "resourceId": "inputFile2"
            }
        ],
        "errors": []
    }
    
    Show More