Skip to content
gist.link ↗

renameProjectFile

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

Rename/move a file or folder within the workspace (fails if the destination exists). ROLE_ADMIN or ROLE_DEPLOY_MANAGER.

deploy:mutation:renameProjectFile

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 {
renameProjectFile(projectId: Int!, from: String!, to: String!): Boolean!
}
Argument Type Required Description
projectId Int! Yes —
from String! Yes —
to String! Yes —

Boolean!.

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