For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get a specific file from a space revision by its file ID

Returns the metadata for a single file (image or binary asset) within a specific revision of a space. Use this to retrieve download URL, MIME type, and dimensions for a known file ID. To list all files in a revision, use the revision files list endpoint.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
revisionIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
fileIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
idstringRequired
namestringRequired
contentTypestringRequired
downloadURLstringRequired
sizenumberRequired
get/spaces/{spaceId}/revisions/{revisionId}/files/{fileId}
GET /v1/spaces/{spaceId}/revisions/{revisionId}/files/{fileId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "id": "text",
  "name": "text",
  "contentType": "text",
  "downloadURL": "text",
  "size": 1,
  "dimensions": {
    "width": 1,
    "height": 1
  },
  "git": {
    "oid": "text",
    "path": "text"
  }
}

Last updated

Was this helpful?

Powered by GitBook