Box · Schema

Upload session

An upload session for chunk uploading a file.

Cloud StorageCollaborationContent ManagementDocumentsEnterpriseFile Sharing

Properties

Name Type Description
id string The unique identifier for this session
type string `upload_session`
session_expires_at string The date and time when this session expires.
part_size integer The size in bytes that must be used for all parts of of the upload. Only the last part is allowed to be of a smaller size.
total_parts integer The total number of parts expected in this upload session, as determined by the file size and part size.
num_parts_processed integer The number of parts that have been uploaded and processed by the server. This starts at `0`. When committing a file files, inspecting this property can provide insight if all parts have been uploaded
session_endpoints object
View JSON Schema on GitHub

JSON Schema

box-uploadsession-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UploadSession",
  "title": "Upload session",
  "type": "object",
  "x-box-resource-id": "upload_session",
  "description": "An upload session for chunk uploading a file.",
  "x-box-tag": "chunked_uploads",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for this session",
      "example": "F971964745A5CD0C001BBE4E58196BFD"
    },
    "type": {
      "type": "string",
      "description": "`upload_session`",
      "example": "upload_session",
      "enum": [
        "upload_session"
      ]
    },
    "session_expires_at": {
      "description": "The date and time when this session expires.",
      "type": "string",
      "format": "date-time",
      "example": "2012-12-12T10:53:43-08:00"
    },
    "part_size": {
      "type": "integer",
      "format": "int64",
      "example": 1024,
      "description": "The  size in bytes that must be used for all parts of of the\nupload.\n\nOnly the last part is allowed to be of a smaller size."
    },
    "total_parts": {
      "type": "integer",
      "format": "int32",
      "example": 1000,
      "description": "The total number of parts expected in this upload session,\nas determined by the file size and part size."
    },
    "num_parts_processed": {
      "type": "integer",
      "format": "int32",
      "example": 455,
      "description": "The number of parts that have been uploaded and processed\nby the server. This starts at `0`.\n\nWhen committing a file files, inspecting this property can\nprovide insight if all parts have been uploaded correctly."
    },
    "session_endpoints": {
      "allOf": [
        {
          "title": "Session endpoints",
          "description": "A list of endpoints for a chunked upload session.",
          "type": "object",
          "properties": {
            "upload_part": {
              "type": "string",
              "description": "The URL to upload parts to",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD"
            },
            "commit": {
              "type": "string",
              "description": "The URL used to commit the file",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/commit"
            },
            "abort": {
              "type": "string",
              "description": "The URL for used to abort the session.",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD"
            },
            "list_parts": {
              "type": "string",
              "description": "The URL users to list all parts.",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/parts"
            },
            "status": {
              "type": "string",
              "description": "The URL used to get the status of the upload.",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD"
            },
            "log_event": {
              "type": "string",
              "description": "The URL used to get the upload log from.",
              "example": "https://upload.box.com/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/log"
            }
          }
        },
        {
          "description": "A list of endpoints for this session."
        }
      ]
    }
  }
}