Reference · Gateway API
Authorization — Gateway API
2 operations of the GebSecure Gateway API (0.1.0), generated from docs/openapi/gateway.json.
Base URL: https://gateway.gebsecure.com · OpenAPI 3.1.0 · contract version 0.1.0 · generated from docs/openapi/gateway.json.
POST /v1/authorize#
Decide whether a principal may perform an action (ALLOW / DENY / APPROVAL_REQUIRED)
- Endpoint:
POST https://gateway.gebsecure.com/v1/authorize - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication - SDK: TypeScript
authorize· Pythonauthorize· GoAuthorize· Javaauthorize· .NETAuthorizeAsync
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
action |
string | yes | length 1–256; pattern ^[A-Za-z0-9][A-Za-z0-9_.:\/*@-]*$ |
resource |
string | yes | length 1–1024 |
resourceAttributes |
object | default {} |
|
context |
object | default {} |
|
environmentId |
string | ||
onBehalfOf |
object | ||
onBehalfOf.agentId |
string | yes | |
approvalId |
string | ||
dryRun |
boolean | default false |
|
execution |
object | null |
Responses
200— Default Response
Response body: AuthorizeResult
| Field | Type | Required | Notes |
|---|---|---|---|
decision |
Decision | yes | |
decisionId |
string | yes | |
reason |
string | yes | |
risk |
Risk | yes | |
approval |
ApprovalRef | nullable | |
explanation |
Explanation | ||
limits |
array<LimitState> | ||
snapshotHash |
string | ||
environment |
EnvironmentRef | ||
principal |
PrincipalRef | ||
dryRun |
boolean | ||
evaluatedAt |
string | ||
durationMs |
number |
Errors are application/problem+json (error model).
bash
curl -X POST "$GEBSECURE_GATEWAY_URL/v1/authorize" \
-H "Authorization: Bearer $GEBSECURE_TOKEN" \
-H 'content-type: application/json' \
-d '{"action":"<string>","resource":"<string>"}'POST /v1/authorize/batch#
Evaluate up to 100 requests in one call
- Endpoint:
POST https://gateway.gebsecure.com/v1/authorize/batch - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication - SDK: TypeScript
authorizeBatch· Pythonauthorize_batch· GoAuthorizeBatch· JavaauthorizeBatch· .NETAuthorizeBatchAsync
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
requests |
array | yes | items 1–100 |
requests[].action |
string | yes | length 1–256; pattern ^[A-Za-z0-9][A-Za-z0-9_.:\/*@-]*$ |
requests[].resource |
string | yes | length 1–1024 |
requests[].resourceAttributes |
object | default {} |
|
requests[].context |
object | default {} |
|
requests[].environmentId |
string | ||
requests[].onBehalfOf |
object | ||
requests[].onBehalfOf.agentId |
string | yes | |
requests[].approvalId |
string | ||
requests[].dryRun |
boolean | default false |
|
requests[].execution |
object | null |
Responses
200— Default Response
Response body: AuthorizeBatchResult
| Field | Type | Required | Notes |
|---|---|---|---|
results |
array<AuthorizeBatchEntry> | yes |
Errors are application/problem+json (error model).
bash
curl -X POST "$GEBSECURE_GATEWAY_URL/v1/authorize/batch" \
-H "Authorization: Bearer $GEBSECURE_TOKEN" \
-H 'content-type: application/json' \
-d '{"requests":[{"action":"<string>","resource":"<string>"}]}'