Grafana Cloud

Authorization REST API

Note

The documentation for this API is also available as an OpenAPI description.

Validate a Grafana Cloud k6 API token and access to the stack

GET /cloud/v6/auth

Validate a Grafana Cloud k6 Personal API token or Stack API token and access to the stack.

Request parameters

NameDescriptionInRequiredType
X-Stack-UrlThe URL of the Grafana stack to authenticate to.headertruestring

200 response

OK.

Content types: application/json

AuthenticationResponse properties:

NameDescriptionRequiredType
default_project_idThe ID of the default project in the stack.trueinteger
stack_idThe ID of the Grafana stack matching the provided URL.trueinteger
OK example
{
  "default_project_id": 67890,
  "stack_id": 12345
}

401 response

Invalid token or authentication scheme.

Content types: application/json

ErrorResponseApiModel properties:

NameDescriptionRequiredType
errortrueErrorApiModel

Details of the error.

ErrorApiModel properties:

NameDescriptionRequiredType
codeService-defined error code.truestring
detailsArray of objects with more specific error information when applicable.falsearray | null
messageHuman-readable string describing the error.truestring
targetA string indicating the target of the error. For example, the name of the property in error.falsestring | null

403 response

The user does not have permission to perform this action.

Content types: application/json

ErrorResponseApiModel properties:

NameDescriptionRequiredType
errortrueErrorApiModel

Details of the error.

ErrorApiModel properties:

NameDescriptionRequiredType
codeService-defined error code.truestring
detailsArray of objects with more specific error information when applicable.falsearray | null
messageHuman-readable string describing the error.truestring
targetA string indicating the target of the error. For example, the name of the property in error.falsestring | null

500 response

Unexpected error.

Content types: application/json

ErrorResponseApiModel properties:

NameDescriptionRequiredType
errortrueErrorApiModel

Details of the error.

ErrorApiModel properties:

NameDescriptionRequiredType
codeService-defined error code.truestring
detailsArray of objects with more specific error information when applicable.falsearray | null
messageHuman-readable string describing the error.truestring
targetA string indicating the target of the error. For example, the name of the property in error.falsestring | null