Skip to content
gist.link ↗

runProjectCommand

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

Run one shell command in the project’s isolated sandbox (the integrated terminal); output is buffered. ROLE_ADMIN or ROLE_DEPLOY_MANAGER.

deploy:mutation:runProjectCommand

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

type Mutation {
runProjectCommand(projectId: Int!, command: String!): CommandResult!
}
Argument Type Required Description
projectId Int! Yes —
command String! Yes —

CommandResult! — 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": "mutation RunProjectCommand($projectId: Int!, $command: String!) { runProjectCommand(projectId: $projectId, command: $command) { stdout stderr exit_code } }",
"variables": {
"projectId": 10,
"command": "example"
}
}
JSON