The getFileContent() GraphQL query is used to get content of a file.

For information on loading and using files, see the Lookup Files documentation page.

Syntax

Below is the syntax for the getFileContent() query field:

getFileContent(
   name: string!
   fileName: string!
   offset: integer
   limit: integer
   filterString: string
): UploadedFileSnapshot!

Returned Datatypes

The returned datatype UploadedFileSnapshot has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: UploadedFileSnapshot

ParameterTypeRequired[a]DefaultDescription
nameAndPathFileNameAndPathyes The name and path of the uploaded snapshot file (see FileNameAndPath Table).
headers[string]yes List of headers for the uploaded snapshot file.
lines[string]yes The contents of the file in the form of a list of lines, with each line being itself a list of column values.
totalLinesCountlongyes The total number of lines in the uploaded snapshot file.
limitintegeryes The file upload limit.
offsetintegeryes For the

getFileContents

query, this is the offset supplied to that query. For the

newFile

and

updateFile

mutations, this is always 0.
filterStringstring  Any string on which to filter the data.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.