POST
/
v1
/
protect
/
invoke
curl --request POST \
  --url https://api.acme.rungalileo.io/v1/protect/invoke \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '{
  "prioritized_rulesets": [
    {
      "rules": [
        {
          "metric": "<string>",
          "operator": "gt",
          "target_value": "<string>"
        }
      ],
      "action": {
        "type": "OVERRIDE",
        "subscriptions": [
          {
            "statuses": [
              "triggered"
            ],
            "url": "<string>"
          }
        ],
        "choices": [
          "<string>"
        ]
      },
      "description": "<string>"
    }
  ],
  "payload": {
    "input": "<string>",
    "output": "<string>"
  },
  "project_name": "<string>",
  "project_id": "<string>",
  "stage_name": "<string>",
  "stage_id": "<string>",
  "stage_version": 123,
  "timeout": 300,
  "metadata": {},
  "headers": {}
}'
{
  "status": "<string>",
  "text": "<string>",
  "trace_metadata": {
    "id": "<string>",
    "received_at": 123,
    "response_at": 123,
    "execution_time": 123
  }
}

Authorizations

Galileo-API-Key
string
header
required

Body

application/json
payload
object
required

Payload to be processed.

prioritized_rulesets
object[]

Rulesets to be applied to the payload.

project_name
string | null

Project name.

project_id
string | null

Project ID.

stage_name
string | null

Stage name.

stage_id
string | null

Stage ID.

stage_version
integer | null

Stage version to use for the request, if it's a central stage with a previously registered version.

timeout
number
default:
300

Optional timeout for the guardrail execution in seconds. This is not the timeout for the request. If not set, a default timeout of 5 minutes will be used.

metadata
object | null

Optional additional metadata. This will be echoed back in the response.

headers
object | null

Optional additional HTTP headers that should be included in the response.

Response

200
application/json
Successful Response
text
string
required

Text from the request after processing the rules.

trace_metadata
object
required
status
string

Status of the request after processing the rules.