Skip to content
gist.link ↗

projectFile

Query Deploy API — POST https://deploy.api.gist.link/graphql

Read one file from the project’s sandbox working copy. Any org member.

deploy:query:projectFile

The calling IAM key must hold this permission (or a wildcard that covers it: deploy:query:* or deploy:*) and the access token must have been minted with audience=deploy. See Permissions.

type Query {
projectFile(projectId: Int!, path: String!): WorkspaceFileContent!
}
Argument Type Required Description
projectId Int! Yes —
path String! Yes —

WorkspaceFileContent! — see the Deploy types reference.

Terminal window
curl https://deploy.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query ProjectFile($projectId: Int!, $path: String!) { projectFile(projectId: $projectId, path: $path) { path content } }",
"variables": {
"projectId": 10,
"path": "example"
}
}
JSON