Request

Response

    Get download URLs for multiple resources
    POST

    spaces/{spaceId}/resources:batch-get-download-urls

    Get presigned download URLs for multiple resources. Different storage providers may impose different limits on the number of URLs to retrieve in one request. OSS limits this to 25.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/flow/storage/v1/spaces/{spaceId}/resources:batch-get-download-urls
    Authentication Context
    user context optional
    Required OAuth Scopes
    data:read
    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
    resources*
    array: object
    resourceId*
    string
    A unique ID for a specific resource
    ifNoneMatch
    string
    An ETag or list of ETags used to check against when comparing whether a resource has been modified.
    ifModifiedSince
    string
    A timestamp used to check against when comparing whether a resource has been modified.

    Max length: 29

    responseContentType
    string
    Specifies the content type for a resource.
    responseContentDisposition
    string
    Specifies the content disposition for a resource.
    responseCacheControl
    string
    Specifies caching directives to control caching in browsers and shared caches for a resource.
    * Required

    Response

    HTTP Status Code Summary

    200
    OK
    OK
    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
    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 (200)

    Expand all
    errors
    array: object
    Contains information about the individual items from the request that failed.
    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
    status
    enum:string
    Indicates the type of failure encountered when trying to retrieve a URL. Possible values: ERROR, SKIPPED
    results
    array: object
    An array of the successfully retrieved items from the request.
    url
    string
    A URL that can be accessed to retrieve the actual data for a resource. The URL expires after a certain amount of time depending on the storage provider and the parameters to the request to generate the URL.
    sha1
    string
    Base64-encoded SHA1 checksum of the resource.

    Max length: 40

    size
    int
    The size of the object in bytes.
    resourceId
    string
    A unique ID for a specific resource

    Response

    Body Structure (207)

    Expand all
    errors
    array: object
    Contains information about the individual items from the request that failed.
    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
    status
    enum:string
    Indicates the type of failure encountered when trying to retrieve a URL. Possible values: ERROR, SKIPPED
    results
    array: object
    An array of the successfully retrieved items from the request.
    url
    string
    A URL that can be accessed to retrieve the actual data for a resource. The URL expires after a certain amount of time depending on the storage provider and the parameters to the request to generate the URL.
    sha1
    string
    Base64-encoded SHA1 checksum of the resource.

    Max length: 40

    size
    int
    The size of the object in bytes.
    resourceId
    string
    A unique ID for a specific resource

    Example

    This example gets a download url for the 3027a826-37d2-42fa-8175-588fe6afd97e and 4027a826-22d2-43ff-822d-588fe6afd99e resouces on the outputs:dd8fd1f9-33de-42fb-9888-93bf28c4a51a storage space.

    Request

    curl -v 'https://developer.api.autodesk.com/flow/storage/v1/spaces/outputs:dd8fd1f9-33de-42fb-9888-93bf28c4a51a/resources:batch-get-download-urls' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciO...' \
      -H 'Content-Type: application/json'\
      -d '{
            "resources": [
                {
                    "resourceId": "3027a826-37d2-42fa-8175-588fe6afd97e"
                }
            ]
          }'
    
    Show More

    Response

    {
        "results":[
            {
                "resourceId":"3027a826-37d2-42fa-8175-588fe6afd97e",
                "sha1":"5244766cfc2dfdaabf2cf83baf03344fd147ef3c",
                "size":25366004,
                "url":"https://s3.amazonaws.com/com.autodesk.oss-temporary/52..."
            },
            {
                "resourceId":"4027a826-22d2-43ff-822d-588fe6afd99e",
                "sha1":"5122766cfc2dfdaabffff83bad23344fs147ef3c",
                "size":12365004,
                "url":"https://s3.amazonaws.com/com.autodesk.oss-temporary/52..."
            }
        ],
        "errors":[]
    }
    
    Show More