Skip to content

Get upload session ​

Interface Description ​

Read upload progress and the next page of entries needed to resume a session.

Endpoint ​

FieldValue
MethodGET
Path/openapi/v2/knowledge-bases/{knowledgeBaseId}/upload-sessions/{uploadSessionId}
Operation IDgetUploadSession
AuthenticationBearer OpenAPI key

Parameters ​

NameLocationRequiredTypeExampleDescription
knowledgeBaseIdpathYesstringknowledge-base-11111111-1111-4111-8111-111111111111Knowledge-base identifier returned by knowledge-base APIs.
uploadSessionIdpathYesstringupload-11111111-1111-4111-8111-111111111111Upload session identifier returned by createUploadSession.
limitqueryNointeger50Maximum number of records to return. The deployment can enforce a lower limit.
cursorqueryNostringcursor_123Pagination token returned by the same endpoint for reading the next page.
transferStatequeryNomissing | uploadedmissingOptional filter for the upload progress of each file record.

Request Body ​

This operation has no request body.

Request Example ​

bash
curl -X GET "https://openapi.example.com/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111/upload-sessions/upload-11111111-1111-4111-8111-111111111111?limit=50" \
  -H "Authorization: Bearer <openapi-key>"

Successful Responses ​

200 ​

Current upload session and the requested page of file records.

FieldRequiredTypeDescription
sessionYesobjectUpload session returned by the request.
entriesYesallOf(Page)Requested page of upload file records and the token for reading the next page.

Success Response Example ​

json
{
  "session": {
    "id": "upload-11111111-1111-4111-8111-111111111111",
    "operationId": "upload-operation-11111111-1111-4111-8111-111111111111",
    "knowledgeBaseId": "knowledge-base-11111111-1111-4111-8111-111111111111",
    "state": "completed",
    "declaredFileCount": 1,
    "declaredByteCount": 37,
    "counts": {
      "selected": 1,
      "uploadRequired": 1,
      "skippedExisting": 0,
      "waitingReservation": 0,
      "rejectedDeleting": 0,
      "uploaded": 1,
      "finalized": 1
    },
    "errorCode": null,
    "expiresAt": "2026-06-18T00:00:00.000Z",
    "completedAt": "2026-06-17T00:00:00.000Z",
    "createdAt": "2026-06-17T00:00:00.000Z",
    "updatedAt": "2026-06-17T00:00:00.000Z",
    "actions": {
      "operation": "/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111/operations/upload-operation-11111111-1111-4111-8111-111111111111"
    }
  },
  "entries": {
    "items": [
      {
        "id": "upload-entry-11111111-1111-4111-8111-111111111111",
        "relativePath": "handbook/onboarding/guide.md",
        "directoryPath": "handbook/onboarding",
        "name": "guide.md",
        "declaredSize": 37,
        "receivedSize": 37,
        "disposition": "upload_required",
        "transferState": "uploaded",
        "sourceFileId": "source-file-11111111-1111-4111-8111-111111111111",
        "existingResourceRevision": null
      }
    ],
    "nextCursor": null
  }
}

Error Codes ​

The table below lists every error response documented for this operation.

HTTP StatusError CodeExplanation
401UNAUTHORIZEDThe Bearer API key is missing, malformed, unknown, revoked, or deleted.
404NOT_FOUNDThe requested resource was not found.
422VALIDATION_ERRORThe request failed validation.
429RATE_LIMITEDThe request exceeded the configured rate limits.
500INTERNAL_ERRORThe API encountered an internal error.
503DATABASE_REPOSITORY_UNAVAILABLEThe data required by this operation is temporarily unavailable.

Next Steps ​