Create Grant
Create a least-privilege grant for a principal. Reuse the same Idempotency-Key only with the identical request body.
Create a least-privilege grant for a principal. Reuse the same Idempotency-Key only with the identical request body.
Authorization
bearerAuth In: header
Header Parameters
Unique key for this mutation and request body.
8 <= length <= 200Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/grants" \ -H "Idempotency-Key: operation-20260816-001" \ -H "Content-Type: application/json" \ -d '{ "accountId": "00000000-0000-4000-8000-000000000001", "principalId": "00000000-0000-4000-8000-000000000004", "sourceId": "00000000-0000-4000-8000-000000000002", "permission": "query", "datasetIds": [ "00000000-0000-4000-8000-000000000003" ], "expiresAt": null, "maxRows": 1000, "maxBytes": 268435456, "maxQueriesPerMinute": 60 }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "principalId": "0a52818d-1e0c-4e64-848e-4d04f9e914e5", "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2", "permission": "query", "datasetIds": [ "ef1d0ac6-a99b-4710-9052-39f6f9fb8ca7" ], "expiresAt": "2019-08-24T14:15:22Z", "maxRows": 1, "maxBytes": 1, "maxQueriesPerMinute": 1, "createdAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z" }, "correlationId": "string"}