Skip to main content

Guardrails

SDK methods for the Guardrails module, accessed via soat.guardrails. See the Guardrails module docs for permissions and data model, and each method's REST page for the full request/response schema.

soat.guardrails.createGuardrail()

Create a guardrail

  • Method: POST
  • Path: /api/v1/guardrails
await soat.guardrails.createGuardrail({
body: { name, document, /* + optional */ },
});

Request & response schema

soat.guardrails.listGuardrails()

List guardrails

  • Method: GET
  • Path: /api/v1/guardrails
await soat.guardrails.listGuardrails({
query: { /* + optional */ },
});

Request & response schema

soat.guardrails.getGuardrail()

Get a guardrail

  • Method: GET
  • Path: /api/v1/guardrails/{guardrail_id}
await soat.guardrails.getGuardrail({
path: { guardrail_id },
});

Request & response schema

soat.guardrails.updateGuardrail()

Update a guardrail

  • Method: PATCH
  • Path: /api/v1/guardrails/{guardrail_id}
await soat.guardrails.updateGuardrail({
path: { guardrail_id },
body: { /* + optional */ },
});

Request & response schema

soat.guardrails.deleteGuardrail()

Delete a guardrail

  • Method: DELETE
  • Path: /api/v1/guardrails/{guardrail_id}
await soat.guardrails.deleteGuardrail({
path: { guardrail_id },
});

Request & response schema

soat.guardrails.getGuardrailVersion()

Fetch an archived guardrail version

  • Method: GET
  • Path: /api/v1/guardrails/{guardrail_id}/versions/{version}
await soat.guardrails.getGuardrailVersion({
path: { guardrail_id, version },
});

Request & response schema

soat.guardrails.evaluateGuardrail()

Dry-run evaluate a guardrail

  • Method: POST
  • Path: /api/v1/guardrails/{guardrail_id}/evaluate
await soat.guardrails.evaluateGuardrail({
path: { guardrail_id },
body: { /* + optional */ },
});

Request & response schema