GrantsService
A list of all methods in the GrantsService service. Click on the method name to view detailed information about that method.
| Methods | Description |
|---|---|
| list_grants | Returns a list of all the grants belonging to a user. Grants are sorted by creation date, descending. Creation date effectively means when the grant was approved. |
| get_grant_by_id | Returns the details of a grant. |
| revoke_grant | Revokes the specified grant. |
list_grants
Returns a list of all the grants belonging to a user. Grants are sorted by creation date, descending. Creation date effectively means when the grant was approved.
- HTTP Method:
GET - Endpoint:
/grants
Return Type
List[Grant]
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grants.list_grants()
print(result)
get_grant_by_id
Returns the details of a grant.
- HTTP Method:
GET - Endpoint:
/grants/{grant_id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_id | str | ✅ | The ID of the grant to retrieve |
Return Type
Grant
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grants.get_grant_by_id(grant_id="grant_id")
print(result)
revoke_grant
Revokes the specified grant.
- HTTP Method:
DELETE - Endpoint:
/grants/{grant_id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_id | str | ✅ | The ID of the grant to revoke |
Return Type
Grant
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grants.revoke_grant(grant_id="grant_id")
print(result)