{
  "openapi": "3.1.0",
  "info": {
    "title": "multi-part-upload-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{OrangeLogicURL}/webapi/mediafile/import/upload/",
      "variables": {
        "OrangeLogicURL": {
          "default": "OrangeLogicURL"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/item/26_v1/{uploadItemId}": {
      "post": {
        "summary": "Step 4: Upload each asset chunk",
        "description": "Use one API call per asset chunk to upload all chunks to Orange Logic",
        "operationId": "upload-chunks-to-orange-logic",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The <code>multipart/form-data</code> header parameter is required for this call.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "multipart-formdata"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "uploadItemID"
                ],
                "properties": {
                  "uploadItemID": {
                    "type": "string",
                    "description": "<code>uploadItemId</code> or <code>UIRecordID</code> of the upload item created in the <a href= \"https://developer.orangelogic.com/reference/register-upload-assets\">Register upload assets</a> section. Use this ID to identify the file chunk uploaded with this call as part of its parent asset."
                  },
                  "start": {
                    "type": "integer",
                    "description": "Starting position (in bytes) of the chunk. Must be a <code>multiple of 131072</code> (for example, 131072, 262144, etc.).",
                    "format": "int32"
                  },
                  "end": {
                    "type": "integer",
                    "description": "Ending position (in bytes) of the chunk (inclusive). Must be: <code>(multiple of 131072) - 1</code> (for example, 131071, 262143...), except for the last chunk of the file. For the last chunk of the file, this value is the total asset length - 1.",
                    "format": "int32"
                  },
                  "totalLength": {
                    "type": "integer",
                    "description": "Size of the full asset in bytes.",
                    "format": "int32"
                  },
                  "md5": {
                    "type": "string",
                    "description": "Md5 hash of the chunk."
                  },
                  "partNumber": {
                    "type": "integer",
                    "description": "1-base part number for cloud upload, required if using cloud buffer bucket.",
                    "default": 1,
                    "format": "int32"
                  },
                  "data": {
                    "type": "string",
                    "description": "File chunk.",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
