cURL
curl --request POST \ --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app/v1/policies \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "effect": "allow", "priority": 0, "agentId": "<string>", "principalId": "<string>", "scopes": [ "<string>" ], "timeOfDayStart": "<string>", "timeOfDayEnd": "<string>" } '
{ "id": "<string>", "name": "<string>", "effect": "allow", "priority": 123, "agentId": "<string>", "principalId": "<string>", "scopes": [ "<string>" ], "timeOfDayStart": "<string>", "timeOfDayEnd": "<string>", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z" }
Policies automate grant approval or denial based on agent, principal, scopes, and time-of-day.
Developer API key
allow
deny
Higher priority policies are evaluated first
HH:mm format
Policy created