GrantKitsService
A list of all methods in the GrantKitsService service. Click on the method name to view detailed information about that method.
| Methods | Description |
|---|---|
| list_grant_kits | Returns a list of the latest versions of each grant kit in the organization. Grant Kits are sorted by creation date, descending. |
| create_grant_kit | Creates a new Grant Kit |
| get_grant_kit_by_id | Returns the details of a Grant Kit. |
| update_grant_kit | Updates the specified grant kit. |
| delete_grant_kit | Deletes the specified grant kit. |
| list_grant_kit_versions_by_id | Returns all versions of a grant kit. Grant Kits are sorted by creation date, descending. |
list_grant_kits
Returns a list of the latest versions of each grant kit in the organization. Grant Kits are sorted by creation date, descending.
- HTTP Method:
GET - Endpoint:
/grant-kits
Return Type
List[GrantKit]
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grant_kits.list_grant_kits()
print(result)
create_grant_kit
Creates a new Grant Kit
- HTTP Method:
POST - Endpoint:
/grant-kits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request_body | GrantKitCreateParams | ✅ | The request body. |
Return Type
GrantKit
Example Usage Code Snippet
from test_sdk import TestSdk
from test_sdk.models import GrantKitCreateParams
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
request_body = GrantKitCreateParams(
name="name",
description="description",
workflow={
"steps": [
{
"reviewers": {
"one_of": [
"one_of"
],
"all_of": [
"all_of"
]
},
"skip_if": [
{
"bundle": "bundle",
"query": "query"
}
]
}
]
},
policies=[
{
"bundle": "bundle",
"query": "query"
}
],
output={
"location": "location",
"append": "append",
"overwrite": "overwrite"
}
)
result = sdk.grant_kits.create_grant_kit(request_body=request_body)
print(result)
get_grant_kit_by_id
Returns the details of a Grant Kit.
- HTTP Method:
GET - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id_ | str | ✅ | The ID of the grant kit or resource to retrieve. |
Return Type
GrantKit
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grant_kits.get_grant_kit_by_id(id_="id")
print(result)
update_grant_kit
Updates the specified grant kit.
- HTTP Method:
PUT - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request_body | GrantKitUpdateParams | ✅ | The request body. |
| id_ | str | ✅ | The ID of the grant kit or resource to update |
Return Type
GrantKit
Example Usage Code Snippet
from test_sdk import TestSdk
from test_sdk.models import GrantKitUpdateParams
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
request_body = GrantKitUpdateParams(
name="name",
description="description",
workflow={
"steps": [
{
"reviewers": {
"one_of": [
"one_of"
],
"all_of": [
"all_of"
]
},
"skip_if": [
{
"bundle": "bundle",
"query": "query"
}
]
}
]
},
output={
"location": "location",
"append": "append",
"overwrite": "overwrite"
},
policies=[
{
"bundle": "bundle",
"query": "query"
}
]
)
result = sdk.grant_kits.update_grant_kit(
request_body=request_body,
id_="id"
)
print(result)
delete_grant_kit
Deletes the specified grant kit.
- HTTP Method:
DELETE - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id_ | str | ✅ | The ID of the grant kit or resource to delete |
Return Type
GrantKit
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grant_kits.delete_grant_kit(id_="id")
print(result)
list_grant_kit_versions_by_id
Returns all versions of a grant kit. Grant Kits are sorted by creation date, descending.
- HTTP Method:
GET - Endpoint:
/grant-kits/{grant_kit_id_or_name}/versions
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_kit_id_or_name | str | ✅ | The ID of the grant kit or resource to retrieve. |
Return Type
List[GrantKitVersion]
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.grant_kits.list_grant_kit_versions_by_id(grant_kit_id_or_name="grant_kit_id_or_name")
print(result)