# Get a service

`GET https://evohub.io/api/v1/catalog/components/{ref}`

Part of the [Catalog API](https://docs.evohub.io/catalog.md) reference · operationId `getComponent`.

One service with its `sla` (its tier, its own overrides and the
targets that result) and its `responsibilities`. For a key that also
holds `catalog:resource:read`, `observations` adds its resource
counts by status, the first page of its resources and the edges with
it at either end.

Requires the `catalog:component:read` scope.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Path parameters

- `ref` (string, required, example `payments-api`): The service's ID (`cmp_…`) or its slug.

## Responses

### 200 — The service.

Content type: `application/json`

Type: `object`

- `data` (ComponentDetail)
  - `id` (string, example `cmp_7a1d3f5b9c2e4a6b8d0f1e3c5a7b9d2f`)
  - `org_id` (string)
  - `slug` (string, example `payments-api`)
  - `display_name` (string, example `Payments API`)
  - `description` (string)
  - `kind` (ComponentKind, one of `service`, `library`, `database`, `website`, `job`, `other`)
  - `owner_team_id` (string | null)
  - `tier_id` (string | null)
  - `tier` (integer | null): The tier's place in the order, 1 the most critical.
  - `sla_overrides` (SLATargets)
    - `availability` (number, example `99.9`): A percentage above 0 and at most 100, up to 3 decimals.
    - `response` (object): Minutes to acknowledge, per On-Call severity (`critical`, `high`, `medium`, `low`, `info`), 1 to 525600.
      - Other keys: integer
    - `resolution` (object): Minutes to resolve, per severity.
      - Other keys: integer
    - `support_hours` (object)
      - `kind` (string, required, one of `24x7`, `business`)
      - `timezone` (string, example `Europe/Istanbul`)
      - `days` (array of integer): ISO weekdays, 1 is Monday.
      - `from` (string, example `09:00`)
      - `to` (string, example `18:00`)
    - `max_unowned_days` (integer, min 0, max 3650)
  - `lifecycle` (Lifecycle, one of `experimental`, `production`, `deprecated`, `retired`)
  - `repo_url` (string)
  - `docs_url` (string)
  - `runbook_url` (string)
  - `created_by` (string)
  - `created_at` (string (date-time))
  - `updated_at` (string (date-time))
  - `sla` (object)
    - `tier` (Tier | null)
      - One of:
        - Tier
          - `id` (string)
          - `name` (string, example `Tier 1`)
          - `description` (string)
          - `rank` (integer): Its place in the order, 1 the most critical.
          - `color` (string, example `#d97706`)
          - `targets` (SLATargets)
          - `version` (integer)
          - `archived_at` (string (date-time) | null)
          - `services` (integer): How many services are in it.
          - `created_at` (string (date-time))
          - `updated_at` (string (date-time))
        - null
    - `overrides` (SLATargets)
      - `availability` (number, example `99.9`): A percentage above 0 and at most 100, up to 3 decimals.
      - `response` (object): Minutes to acknowledge, per On-Call severity (`critical`, `high`, `medium`, `low`, `info`), 1 to 525600.
        - Other keys: integer
      - `resolution` (object): Minutes to resolve, per severity.
        - Other keys: integer
      - `support_hours` (object)
        - `kind` (string, required, one of `24x7`, `business`)
        - `timezone` (string, example `Europe/Istanbul`)
        - `days` (array of integer): ISO weekdays, 1 is Monday.
        - `from` (string, example `09:00`)
        - `to` (string, example `18:00`)
      - `max_unowned_days` (integer, min 0, max 3650)
    - `targets` (SLATargets)
      - `availability` (number, example `99.9`): A percentage above 0 and at most 100, up to 3 decimals.
      - `response` (object): Minutes to acknowledge, per On-Call severity (`critical`, `high`, `medium`, `low`, `info`), 1 to 525600.
        - Other keys: integer
      - `resolution` (object): Minutes to resolve, per severity.
        - Other keys: integer
      - `support_hours` (object)
        - `kind` (string, required, one of `24x7`, `business`)
        - `timezone` (string, example `Europe/Istanbul`)
        - `days` (array of integer): ISO weekdays, 1 is Monday.
        - `from` (string, example `09:00`)
        - `to` (string, example `18:00`)
      - `max_unowned_days` (integer, min 0, max 3650)
  - `responsibilities` (array of Responsibility)
    - `role` (string, required, one of `responsible`, `accountable`, `consulted`, `informed`)
    - `team_id` (string | null)
    - `user_id` (string | null)
  - `observations` (object): Only with `catalog:resource:read`.
    - `resource_counts` (object)
      - Other keys: integer
    - `resources` (array of Resource)
      - `id` (string, example `res_6b8d0f2a4c6e8a1c3e5b7d9f1a3c5e7b`)
      - `environment_id` (string)
      - `source_id` (string)
      - `external_id` (string, example `k8s://5f0c2a7e-…/apps/v1/Deployment/payments/payments-api`)
      - `provider` (string, example `k8s`)
      - `kind` (string, example `Deployment`)
      - `name` (string, example `payments-api`)
      - `namespace` (string, example `payments`)
      - `component_id` (string | null)
      - `component_bound_by` (string | null): What bound it to its service, when something did.
      - `status` (string, one of `live`, `missing`, `gone`, `stale`)
      - `missing_since` (string (date-time) | null)
      - `first_seen_at` (string (date-time))
      - `last_seen_at` (string (date-time))
      - `images` (array of string)
    - `resources_next_cursor` (string | null)
    - `edges` (array of Edge)
      - `id` (string)
      - `from_kind` (string)
      - `from_id` (string)
      - `to_kind` (string)
      - `to_id` (string)
      - `type` (string, example `runs_on`)
      - `source_id` (string)
      - `confidence` (number)
      - `observed_at` (string (date-time))
    - `edges_truncated` (boolean)

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 403 — The key lacks a scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 404 — Nothing with this ID (or slug) exists in the organization (`NOT_FOUND`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 500 — Something went wrong on EvoHub's side (`INTERNAL_ERROR`). Retry later.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

## Example request

```bash
curl -X GET 'https://evohub.io/api/v1/catalog/components/payments-api' \
  -H 'Authorization: Bearer <TOKEN>'
```
