Get file version

fileVersion(input: FileVersionInput!): FileVersionContent!

Requires project.files.read.

Arguments

ArgumentTypeRequired
inputFileVersionInput!Yes

Input fields

input

FileVersionInput

FieldTypeRequiredDescription
filePathString!Yes
versionIdString!YesVersion UUID or index 0..99; zero is the newest committed version.
refStringNoMain or branch:<name-or-id>. Release/environment history is unsupported.
branchStringNo
branchIdStringNo

Response

Returns FileVersionContent!. Open the type for its fields and nested types.

FieldTypeDescription
binaryBinaryCompanionDescriptor
idString!
pathString!
contentString!
sizeInt!Size of the version content in UTF-8 bytes.
sizeBytesInt!Size of the version content in UTF-8 bytes. Same value as size.
typeString!
updatedAtString!

All fields of FileVersionContent.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query FileVersion($input: FileVersionInput!) {
  fileVersion(input: $input) {
    id
    createdAt
    updatedAt
    content
    createdBy
  }
}
json
{
  "input": {
    "filePath": "example",
    "versionId": "00000000-0000-4000-8000-000000000001"
  }
}