Skip to main content
Monitoring & Collection/Grafana Integration
POSTGrafanaSince 1.0SynchronousAuth Required

RegisterGrafanaDatasource

Register a new Grafana datasource linked to a tenant's Grafana organization

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • tenantIdStringRequired

    UUID of the tenant registering the datasource

    Example: tenant-001-xyz

  • nameStringRequired

    Display name for the new datasource

    Example: Production Prometheus

  • grafanaUrlStringRequired

    URL of the Grafana instance to register against

    Example: http://grafana.example.com

  • orgIdIntegerRequired

    Grafana organization ID

    Example: 1

  • apiKeyStringRequired

    API key for authenticating with Grafana

    Example: glsa_xxxxxxxxxxxx

Responses

200 OK

On success, this API returns the following response structure.

  • idString

    Unique identifier of the Grafana datasource registration

    Example: ds-001-abc

  • nameString

    Display name of the datasource

    Example: Production Prometheus

  • grafanaUrlString

    URL of the Grafana instance managing this datasource

    Example: http://grafana.example.com

  • orgIdInteger

    Grafana organization ID this datasource belongs to

    Example: 1

  • apiKeyString

    API key for authenticating with the Grafana instance

    Example: glsa_xxxxxxxxxxxx

  • tenantIdString

    UUID of the tenant this datasource belongs to

    Example: tenant-001-xyz

  • createdAtString

    Created at

    Example: 2026-01-15T08:00:00Z

Endpoint

POST/api/v1/monitoring/grafana/datasources

/api/v1/monitoring/grafana/datasources

Operation ID

RegisterGrafanaDatasource

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/grafana/datasources' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"tenantId":"tenant-001-xyz","name":"Production Prometheus","grafanaUrl":"http://grafana.example.com","orgId":1,"apiKey":"glsa_xxxxxxxxxxxx"}'

Response Example

200
{
  "id": "ds-001-abc",
  "name": "Production Prometheus",
  "grafanaUrl": "http://grafana.example.com",
  "orgId": 1,
  "apiKey": "glsa_xxxxxxxxxxxx",
  "tenantId": "tenant-001-xyz",
  "createdAt": "example"
}

Change History

This API has no change history records yet.

View all change history