Overview
The policies sub-client lets you create declarative authorization policies that control when and how agents can use their grants. Policies support scope-based rules, time-of-day restrictions, and priority-based evaluation.
policies.create()
Create a new authorization policy.
Parameters
Human-readable name for the policy.
Whether this policy allows or denies matching requests.
Evaluation priority. Higher-priority policies are evaluated first. Defaults to server-assigned value.
Restrict the policy to a specific agent.
Restrict the policy to a specific user.
The scopes this policy applies to. If omitted, the policy applies to all scopes.
Start time for a time-of-day restriction (24h format, e.g. '09:00').
End time for a time-of-day restriction (24h format, e.g. '18:00').
Response: Policy
Unique policy identifier.
Restricted agent ID, or null for all agents.
Restricted user ID, or null for all users.
Restricted scopes, or null for all scopes.
Time-of-day restriction start (24h format).
Time-of-day restriction end (24h format).
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
policies.list()
List all policies for your organization.
Response: ListPoliciesResponse
Total number of policies.
policies.get()
Retrieve a single policy by its ID.
Parameters
The policy ID to retrieve.
Response
Returns a Policy object.
policies.update()
Update an existing policy. Only the provided fields are modified.
Parameters
New agent restriction. Pass null to clear.
New user restriction. Pass null to clear.
New scope restriction. Pass null to clear.
New time-of-day start. Pass null to clear.
New time-of-day end. Pass null to clear.
Response
Returns the updated Policy object.
policies.delete()
Delete a policy.
Parameters
Response
Returns void.
Ownership
Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: sanjeev@orchestrum.in or mishra.sanjeev@gmail.com.