# Fetch an guardrail

GET

/v1/guardrails/{guardrailId}

```sh
curl --request GET \
  --url https://example.com/v1/guardrails/example \
  --header 'Authorization: Bearer <token>'
```

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.8/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**guardrailId**

required

string

GuardrailId — unique identifier for the guardrail.

## Responses

### 200

Guardrail.

application/json

object

**id**

required

string

\>= 1 characters

**projectId**

The guardrail’s project. Absent when the runtime doesn’t record it: a pack `kindgi dev` serves from disk, or a runtime before Kindgi 0.1.6.

string format: uuid

**name**

string

**description**

string

**kind**

required

How the guardrail is checked. Open string: the built-in kinds are listed in `examples`; adapters register strategies for their own kinds.

string

\>= 1 characters

**check**

required

Reference to the concrete check implementation registered server-side.

string

\>= 1 characters

**config**

object

**_key_**

additional properties

any

**action**

required

object

**on-violation**

required

What happens when the guardrail fires. Open string: the built-in actions are listed in `examples`; any other name needs an action handler registered under it where the guardrail is evaluated.

string

\>= 1 characters

**retry**

object

**maxAttempts**

required

integer

\>= 1 <= 10

**escalateTo**

string

**compensateWith**

string

**severity**

string

Allowed values: info warn error critical

**scope**

object

**when**

string

Allowed values: always ci-only runtime-only

**agents**

Array\<string>

**flows**

Array\<string>

**tenants**

Array\<string>

**budget**

object

**maxCostUsd**

number

**maxLatencyMs**

integer

**judgeCapabilities**

object

**_key_**

additional properties

any

##### Example

```json
{
  "kind": "zero-llm",
  "action": {
    "on-violation": "halt"
  },
  "severity": "info",
  "scope": {
    "when": "always"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No guardrail with that id under this tenant.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/guardrails/{guardrailId}/outcomes`: What a guardrail's checks came to in a project](https://docs.kindgi.com/v0.1.8/reference/api/operations/guardrailsoutcomes.md)
- [`POST /v1/guardrails/{guardrailId}/unregister`: Unregister an guardrail](https://docs.kindgi.com/v0.1.8/reference/api/operations/guardrailsunregister.md)
- [Every error code](https://docs.kindgi.com/v0.1.8/reference/errors.md)
