Get SSO token
POST/api/v1/auth/grafana/sso
This API endpoint generates a Single Sign-On (SSO) token for Grafana login. Additionally, provides the appropriate explore URL based on the specified data source, enabling direct access to Grafana's exploration features.
Request
- application/json
Body
required
The request body containing the required details to get SSO token and explore URL
dataSource string
machineIdOrAlias string
startTime int64
Timestamp in epoch milliseconds
endTime int64
Timestamp in epoch milliseconds
timeInterval string
logStream string
logLimit int32
logSearch string
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Get SSO token example
Schema
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
Schema for get grafana SSO token response
url string
token string
exploreUrl string
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"url": "string",
"token": "string",
"exploreUrl": "string"
}
}
Get SSO token response example
{
"success": true,
"message": "JWT token generated successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"url": "https://grafana.sandbox.mecha.build",
"token": "eyJhbGciOiJSUzI1NiJ9.eyJuYW1lIjoibmV3dXNlcjEiLCJlbWFpbCI6InRlc3RhdXRvQG1lY2hhc3lzdGVtcy5jb20iLCJzdWIiOiI4MT....",
"exploreUrl": "/d/xxi43y9itdxxxx/machine-metrics"
}
}
Loading...