Request

Response

    Task 5 - Upload an Output

    You have successfully created a variant and generated outputs for the variant. Now you want to upload the generated outputs to a specific location.


    Key learnings

    By the end of this task, you will be able to:

    • Create an Upload
    • Retrieve the created Upload

    The operations used in this task are as follows:

    OperationHTTP RequestDescription
    Create an Upload POST /uploads Create an upload request to upload outputs to a specific location.
    Get an Upload Request GET / uploads/{uploadRequestId} Returns the details of an upload request.

    Step 1: Create an Upload

    To create an upload, you will need a Forma folder URN and Project ID.

    Request

    curl -L -X \
    POST 'https://developer.api.autodesk.com/industrialized-construction/informed-design/v1/uploads?accessType={{ACCESS_TYPE}}&accessId={{ACCESS_ID}}' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {{TOKEN}}' \
    -d '{
        "outputs": [
            {
                "id": "9a9b4b8f-9dbb-4513-a0e4-4344873269b0",
                "filename": "Rectangle Wall - [Primary]"
            },
            {
                "id": "df6210f3-6301-4a83-8f6e-0e05f23ca368",
                "filename": "Rectangle Wall - [Primary]"
            },
            {
                "id": "623d9ce6-6f23-473d-9985-91e4ba3f7a4d",
                "filename": "Rectangle Wall - [Primary]"
            }
        ],
        "uploadLocation": {
            "vendor": "ACC",
            "project": "{{UPLOAD_PROJECT_ID}}",
            "folder": "{{UPLOAD_FOLDER_URN}}"
        },
        "onProgress": {
            "verb": "POST",
            "url": "https://ind-api.free.beeceptor.com/onprogress-upload"
        },
        "onComplete": {
            "verb": "POST",
            "url": "https://ind-api.free.beeceptor.com/oncomplete-upload"
        }
    }'
    
    Show More

    Response

    Returns a JSON response with status 201

    If you have callbacks setup, you will receive notifications for the progress and completion of the upload of each output. The progress and completion notifications will be sent to the URLs specified in the onProgress and onComplete attributes of the request body.

    {
        "id": "{{UPLOAD_REQUEST_ID}}",
        "accessType": "{{ACCESS_TYPE}}",
        "accessId": "{{ACCESS_ID}}",
        "outputs": [
            {
                "id": "623d9ce6-6f23-473d-9985-91e4ba3f7a4d",
                "settings": {
                    "representation": "[Primary]"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "THUMBNAIL"
            },
            {
                "id": "9a9b4b8f-9dbb-4513-a0e4-4344873269b0",
                "settings": {
                    "representation": "[Primary]",
                    "version": "2025",
                    "category": "Generic Models",
                    "family": "Wall-100"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "RFA"
            },
            {
                "id": "df6210f3-6301-4a83-8f6e-0e05f23ca368",
                "settings": {
                    "representation": "[Primary]"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "BOM"
            }
        ],
        "uploadLocation": {
            "vendor": "ACC",
            "project": "{{UPLOAD_PROJECT_ID}}",
            "folder": "{{UPLOAD_FOLDER_URN}}"
        },
        "onComplete": {
            "verb": "POST",
            "url": "https://ind-api.free.beeceptor.com/oncomplete-upload"
        },
        "onProgress": {
            "verb": "POST",
            "url": "https://ind-api.free.beeceptor.com/onprogress-upload"
        },
        "logFile": "",
        "status": "PENDING",
        "createdAt": "2025-04-28T19:26:33.556Z",
        "updatedAt": "2025-04-28T19:26:33.556Z"
    }
    
    Show More

    Step 2: Get an Upload

    Request

    curl -L -X \
    GET 'https://developer.api.autodesk.com/industrialized-construction/informed-design/v1/uploads/{{UPLOAD_REQUEST_ID}}?accessType={{ACCESS_TYPE}}&accessId={{ACCESS_ID}}' \
    -H 'Authorization: Bearer {{TOKEN}}'
    

    Response

    Returns a JSON response with status 200 if found

    {
        "id": "{{UPLOAD_REQUEST_ID}}",
        "accessType": "ACC",
        "accessId": "{{ACCESS_ID}}",
        "outputs": [
            {
                "id": "623d9ce6-6f23-473d-9985-91e4ba3f7a4d",
                "settings": {
                    "representation": "[Primary]"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "THUMBNAIL"
            },
            {
                "id": "9a9b4b8f-9dbb-4513-a0e4-4344873269b0",
                "settings": {
                    "representation": "[Primary]",
                    "version": "2025",
                    "category": "Generic Models",
                    "family": "Wall-100"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "RFA"
            },
            {
                "id": "df6210f3-6301-4a83-8f6e-0e05f23ca368",
                "settings": {
                    "representation": "[Primary]"
                },
                "variantSnapshot": {
                    "accountId": "...",
                    "productId": "{{PRODUCT_ID}}",
                    "projectId": "{{PROJECT_ID}}",
                    "releaseId": "{{RELEASE_ID}}",
                    "id": "{{VARIANT_ID}}",
                    "productName": "IND Tutorial Product",
                    "name": "Rectangle Wall",
                    "releaseNumber": 1
                },
                "outputType": "BOM"
            }
        ],
        "uploadLocation": {
            "vendor": "ACC",
            "project": "{{UPLOAD_PROJECT_ID}}",
            "folder": "{{UPLOAD_FOLDER_URN}}"
        },
        "onComplete": {
            "url": "https://ind-api.free.beeceptor.com/oncomplete-upload",
            "verb": "POST"
        },
        "onProgress": {
            "url": "https://ind-api.free.beeceptor.com/onprogress-upload",
            "verb": "POST"
        },
        "logFile": "https://s3.amazonaws.com/com.autodesk.oss-persistent/e8/94/44/ea8ef065ccf72c08495fa50f70f2802031/ind-upload-logs?response-content-disposition=attachment%3B%20filename%3D%22%3D%3Futf-8%3FB%3FbG9nX2E3YzdiODliLTdhNTEtNGM5MS1iZTY4LWM4YzdkZTMzZjhlN18yMDI1LTA0LTI4VDE5OjI2OjQzLjk1NVoudHh0%3F%3D%22%3B%20size%3D21584&response-content-type=application%2Foctet-stream&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOj%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIHsnOn%2B7vGU%2BelIRUTIDvrUzp%2Byly2QiN%2BD0umcPG7zXAiEAmhdmN6TTQoc%2FUMWiMGrpE%2BkzyXB7eRKt%2BMuyWvWaJ0gqwQIIgf%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw2MDQ3MzMwMDk0MDMiDFdn1HJ%2FBhoEuNwx7SqVAkLN3CYGP%2BxlnwzlfCn47Vc2ggiXy06dDH8IJDyoqZjmO7vzTARFRrslh7sCVXo0V0oOXhiDOp3So5E1d1Lhv8k3uObmxFfQ7EnRZJG3XI2StuHkJ2hWvRVsiZAwYQf6LmKUd5KEbeOHXriNpJ6fWRA9lmL8XZxu5vvRzCbcS8CxvlxZqLGSpO4LX88ZK6VMZ2bZDHQ6w3cgP9RXsEpjQ49tJ2j374UF3%2B2Vt44nCADhxGO5zvtFAePNzDwMh7pki5G8JqxrLOKIRc1XMzY96vfSj1Rd1hWkjbG%2F29VWqq9Bw0y%2Bl17MVW8Xyf1ak1jN6zWt68rvmkJ686V2FetxhA3mQP19qj291vDBySSyJx7ozD2Qsf4wiZ3AwAY6nQGne1JWZrw5ulJnK28x2lZWIKOpDYHo8vk%2FxxFVh4FMjEXwnr03RtrNX1oCAmh4jU5tKKfLDuRByz%2FGQCg8UFe8O7mLxChmzuRd1KF%2Fv57zcLLsVip8HAGzhoFttRAlpm9ct%2BFevC1RAae35owqMa%2FsjlymFGxUSmaSsiW5pwJ0HDn322c79rGMA0cR6osuq0F%2B1TeWM1gqqUxx0T6C&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250428T232828Z&X-Amz-SignedHeaders=host&X-Amz-Credential=ASIAYZTHFNX5WB5MLDT4%2F20250428%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Expires=119&X-Amz-Signature=1048449f0591953c05e5c4676e82e0f230851f686b5362c4a56869a07c27a88c",
        "status": "SUCCESS",
        "createdAt": "2025-04-28T19:26:33.556Z",
        "updatedAt": "2025-04-28T19:26:46.027Z"
    }
    
    Show More