---
title: "Resources behind a condition"
method: POST
path: "/api/v2/{org_id}/downtimes/resources"
tags: ["Downtimes"]
---

# Resources behind a condition

`POST /api/v2/{org_id}/downtimes/resources`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/v2/{org_id}/downtimes/resources`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/v2/:org_id/downtimes/resources/post.ts> (a function with typed inputs; its response is checked against the schema)

The values of a finer dimension, such as host, that co-occur with the condition, for refining a downtime to some resources.

## Path parameters

- `org_id` string, required

## Request body

- ResourcesRequest
  - `condition` union, required: A tree of dimension tests (D17); one AND group of `=` pairs is an on-call `OwnershipRule`.
    - object
      - `items` object[], required
      - `op` 'and' | 'or', required
      - `type` 'group', required
    - object: `value` may end in `*`, a prefix, as in ownership rules.
      - `key` string, required
      - `operator` '=' | '!=', required
      - `type` 'pair', required
      - `value` string, required
  - `refine_by` string, required

## Response `200`

Success

- ResourcesResponse
  - `dimension` string, required
  - `source` string, required
  - `total` integer, required
  - `values` ResourceValue[], required
    - `last_seen` integer, required
    - `streams` string[], required: Flattened from `ServiceStreams` as `<type>/<name>`.
    - `value` string, required

## Other responses

- `400`: Invalid request
- `403`: Forbidden or not enabled

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
