---
title: "The hosts, bounds and retention a client builds against"
method: GET
path: "/v1/environment"
tags: ["Usage"]
---

# The hosts, bounds and retention a client builds against

`GET /v1/environment`

## Request

- Base URL: `https://api.ironfang.com/rig`
- URL: `https://api.ironfang.com/rig/v1/environment`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

The fixed facts of this deployment: the domain inbox addresses are minted under, the base URLs of callback and mock addresses, the gateway connectors dial, the ironfang-connect release to run when the API knows it, every per-organisation, per-suite and per-run bound, what is metered, and how long payload bytes and runs are kept. The bounds are capacity limits, the same whatever the account pays. Read-only. Needs rig.read.

## Response `200`

The environment

- Environment
  - `connect_url` string, uri, required
  - `hooks_base_url` string, uri, required
  - `inbox_domain` string, required
  - `limits` object, required: Every capacity bound, in the unit its name says. These are the same whatever the account pays; billing refusals are separate (see metering).
  - `metering` object, required: What is metered where unified billing runs. Each counted event is one rig.interaction, once per transport identity. An interaction the billing ledger refuses is not recorded: the sender gets the billing code (HTTP callbacks and mocks the problem's status, such as 429 free_allowance_exhausted, in the usual error body with product, meter and reset_at beside the code; mail a 452 4.2.2 reply naming the code, or 550 for a closed account) and the run's timeline gets refusal_event.
    - `counted_events` string[], required
    - `enabled` boolean, required: Whether this deployment meters interactions.
    - `meter` 'rig.interaction', required
    - `refusal_event` 'usage.refused', required
  - `mock_base_url` string, uri, required
  - `release` object, nullable: The ironfang-connect build to run, when the API knows it.
    - `checksums_url` string, uri, required
    - `version` string, required
  - `retention` object, required
    - `payload_days` integer, required: Days after a run ends that raw message and request bytes are kept.
    - `run_days` integer, required: Days after a run ends that the run and its timeline are kept.

## Other responses

- `401`: No credential, an invalid one, or a delegated token where none is accepted (`unauthorized`, `invalid_api_key`, `delegated_not_allowed`).
- `403`: The credential lacks the permission or scope, or names another organisation (`forbidden`, `insufficient_scope`).

---

[API](https://skmtc.dev/ironfang/apis/ironfang-rig-api.md) · [All operations](https://skmtc.dev/ironfang/apis/ironfang-rig-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ironfang/apis/ironfang-rig-api/revisions/3e86a312dad1?raw)
