git-lab-preflight

Validate a GitLab PAT before workspace creation

post/workspaces/gitlab/preflight

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /workspaces/gitlab/preflight
  • Auth: HTTP bearer

Request body

groupFullPathstring

GitLab group full path, used to validate the token against the group when /api/v4/user refuses it

personalAccessTokenstring required

GitLab Personal Access Token to validate

serverUrlstring

The default GitLab instance this server reads from, which is also used when omitted; any other instance is refused.

Example request

{
  "groupFullPath": "my-org/my-team",
  "personalAccessToken": "your-gitlab-token",
  "serverUrl": "https://gitlab.example.com"
}

Response

Validation result

errorstring

Error message if validation failed

userIdinteger

GitLab user ID or group ID

usernamestring

Username of the token owner (personal tokens) or group name (group tokens)

validboolean required

Whether the token is valid

Changes

No recorded changes to this operation across all 50 revisions of this API.