DashboardApiV2Gitlab
Get GitLab installation token
Get the GitLab OAuth access token for authenticated API calls. The token is automatically refreshed if near expiration. Returns null if no GitLab is connected for the organization.
Access
| API Key | Access Level | Description |
|---|---|---|
| User | Full | Users have full access to gitlabs |
| Station | Unauthorized | Stations cannot read gitlabs |
Endpoint
GET
/v2/gitlab/installation-tokenAuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Response Body
from tofupilot.v2 import TofuPilot
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.gitlab.get_installation_token()
# Handle response
print(result){
"token": "glpat-xxxxxxxxxxxxxxxxxxxx",
"expires_at": "2099-12-31T23:59:59Z",
"instance_url": "https://gitlab.com"
}{
"message": "Forbidden",
"code": "FORBIDDEN",
"issues": []
}{
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"issues": []
}How is this guide?