FastGPTFastGPT

Create Collection Download Ticket

Validate access permissions and issue a short-lived single-use ticket for batch downloading dataset collection files.

Endpoint Overview

  • Method : POST
  • Path : /api/core/dataset/collection/getDownloadTicket
  • Module : Datasets / Collections
  • Authentication : Authorization: Bearer <apiKey>—Personal API Key (access scoped by team member permissions) (see API Getting Started )
  • Interactive Try-It-Out : Open in Scalar API Explorer (self-hosted instances: replace the origin with <instance>/apidoc/systemopenapi#tag/%E9%9B%86%E5%90%88%E7%AE%A1%E7%90%86/POST/core/dataset/collection/getDownloadTicket )

Description & Notes

Validate access permissions and issue a short-lived single-use ticket for batch downloading dataset collections.

Request Parameters

Request Body ( application/json )

FieldTypeRequiredDefaultConstraints & Description
datasetIdstringYes-Dataset ID. pattern: ^[0-9a-fA-F]{24}$
collectionIdsstring[]Yes-List of collection IDs to download. minItems: 1

Request Examples

Replace YOUR_API_KEY and placeholder IDs before running. Self-hosted users should replace the base URL with <instance>/api .

cURL Example

curl --fail-with-body -X POST "https://cloud.fastgpt.io/api/core/dataset/collection/getDownloadTicket" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "datasetId": "68ad85a7463006c963799a05",
  "collectionIds": [
    "68ad85a7463006c963799a06"
  ]
}'

Minimal Valid JSON Body

{
  "datasetId": "68ad85a7463006c963799a05",
  "collectionIds": ["68ad85a7463006c963799a06"]
}

Response Schema & Examples

Successful /api/* calls return the standard FastGPT envelope { "code": 200, "statusText": "", "message": "", "data": ... } , where data matches the 200 schema below (when a payload schema is declared; otherwise refer to the status description for runtime data semantics).

HTTP 200

Successfully returned short-lived single-use download ticket

Content-Type : application/json

FieldTypeRequiredDefaultConstraints & Description
ticketstringYes-Short-lived single-use download ticket. minLength: 1
expiresAtstringYes-Ticket expiration timestamp. pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.