Skip to main content
Files

Get a File

Forward API reference.

Description

Retrieves metadata for a single File by its ID.

Path

GET /api/v1/forward/files/{file_id}

Request headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>

Path parameters

ParameterTypeRequiredDescription
file_idstringYesFile ID to retrieve.

Query parameters

ParameterTypeRequiredDescription
identity_idstringNoUse only when operating on Identity-owned resources. A PAT can explicitly supply this query parameter; omitting it uses administrator scope. SAT ownership is determined by the credential. Explicitly supplying this parameter with any SAT (including an empty value) returns HTTP 400. See Identity ownership.

Example request

curl -X GET "https://api.qoder.com.cn/api/v1/forward/files/file_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "id": "file_xxx",
  "type": "file",
  "filename": "report.pdf",
  "size_bytes": 1024,
  "mime_type": "application/pdf",
  "created_at": "2026-07-23T10:00:00Z",
  "updated_at": "2026-07-23T10:00:00Z",
  "downloadable": true,
  "scope": null,
  "metadata": {"source": "console"},
  "identity_id": null
}

Response fields

The response is a File object.

Errors

HTTPTypeTrigger
400invalid_request_errorThe request body, path parameters, or query parameters are invalid; this includes explicitly supplying the query parameter identity_id with any SAT, even with an empty value.
401authentication_errorThe authentication token is missing or invalid.
403permission_errorAn Owner mismatch occurs in administrator scope, or a downstream service denies access.
404not_found_errorThe File does not exist or is not visible in the current Identity scope; the Identity specified by the PAT is invalid, disabled, deleted, or outside the caller's authorized scope.
500/502/503api_errorForward or a dependent service failed.
Best Practices
API reference