Skip to main content
Monitoring & Collection/Monitoring Misc
POSTMonitoringSince 1.0SynchronousAuth Required

InjectTenantFilter

Inject the tenant label filter into a PromQL query to enforce data isolation

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • tenantIdStringRequired

    Tenant ID whose label will be injected

    Example: tenant-001-xyz

  • queryStringRequired

    PromQL query to inject the tenant filter into

    Example: cpu_usage_percent{job="node"}

Responses

200 OK

On success, this API returns the following response structure.

  • filteredQueryString

    The query with the tenant label filter injected

    Example: cpu_usage_percent{job="node",tenant_id="tenant-001"}

Endpoint

POST/api/v1/monitoring/isolation/inject

/api/v1/monitoring/isolation/inject

Operation ID

InjectTenantFilter

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/isolation/inject' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"tenantId":"tenant-001-xyz","query":"cpu_usage_percent{job=\"node\"}"}'

Response Example

200
{
  "filteredQuery": "cpu_usage_percent{job=\"node\",tenant_id=\"tenant-001\"}"
}

Change History

This API has no change history records yet.

View all change history