GrantKitsService
A list of all methods in the GrantKitsService service. Click on the method name to view detailed information about that method.
| Methods | Description |
|---|---|
| listGrantKits | Returns a list of the latest versions of each grant kit in the organization. Grant Kits are sorted by creation date, descending. |
| createGrantKit | Creates a new Grant Kit |
| getGrantKitById | Returns the details of a Grant Kit. |
| updateGrantKit | Updates the specified grant kit. |
| deleteGrantKit | Deletes the specified grant kit. |
| listGrantKitVersionsById | Returns all versions of a grant kit. Grant Kits are sorted by creation date, descending. |
listGrantKits
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
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKit;
import java.util.List;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
List<GrantKit> response = testSdk.grantKits.listGrantKits();
System.out.println(response);
}
}
createGrantKit
Creates a new Grant Kit
- HTTP Method:
POST - Endpoint:
/grant-kits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grantKitCreateParams | GrantKitCreateParams | ✅ | Request Body |
Return Type
GrantKit
Example Usage Code Snippet
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKit;
import com.swagger.petstore.models.GrantKitCreateParams;
import com.swagger.petstore.models.GrantWorkflow;
import com.swagger.petstore.models.Output;
import com.swagger.petstore.models.Policy;
import com.swagger.petstore.models.Reviewers;
import com.swagger.petstore.models.Step;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
List<String> oneOf = Arrays.asList("one_of");
List<String> allOf = Arrays.asList("all_of");
Reviewers reviewers = Reviewers.builder()
.oneOf(oneOf)
.allOf(allOf)
.build();
Policy policy = Policy.builder()
.bundle("bundle")
.query("query")
.build();
List<Policy> skipIf = Arrays.asList(policy);
Step step = Step.builder()
.reviewers(reviewers)
.skipIf(skipIf)
.build();
List<Step> steps = Arrays.asList(step);
GrantWorkflow grantWorkflow = GrantWorkflow.builder()
.steps(steps)
.build();
List<Policy> policies = Arrays.asList(policy);
Output output = Output.builder()
.location("location")
.append("append")
.overwrite("overwrite")
.build();
GrantKitCreateParams grantKitCreateParams = GrantKitCreateParams.builder()
.name("name")
.description("description")
.workflow(grantWorkflow)
.policies(policies)
.output(output)
.build();
GrantKit response = testSdk.grantKits.createGrantKit(grantKitCreateParams);
System.out.println(response);
}
}
getGrantKitById
Returns the details of a Grant Kit.
- HTTP Method:
GET - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | String | ✅ | The ID of the grant kit or resource to retrieve. |
Return Type
GrantKit
Example Usage Code Snippet
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKit;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
GrantKit response = testSdk.grantKits.getGrantKitById("id");
System.out.println(response);
}
}
updateGrantKit
Updates the specified grant kit.
- HTTP Method:
PUT - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | String | ✅ | The ID of the grant kit or resource to update |
| grantKitUpdateParams | GrantKitUpdateParams | ✅ | Request Body |
Return Type
GrantKit
Example Usage Code Snippet
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKit;
import com.swagger.petstore.models.GrantKitUpdateParams;
import com.swagger.petstore.models.GrantWorkflow;
import com.swagger.petstore.models.Output;
import com.swagger.petstore.models.Policy;
import com.swagger.petstore.models.Reviewers;
import com.swagger.petstore.models.Step;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
List<String> oneOf = Arrays.asList("one_of");
List<String> allOf = Arrays.asList("all_of");
Reviewers reviewers = Reviewers.builder()
.oneOf(oneOf)
.allOf(allOf)
.build();
Policy policy = Policy.builder()
.bundle("bundle")
.query("query")
.build();
List<Policy> skipIf = Arrays.asList(policy);
Step step = Step.builder()
.reviewers(reviewers)
.skipIf(skipIf)
.build();
List<Step> steps = Arrays.asList(step);
GrantWorkflow grantWorkflow = GrantWorkflow.builder()
.steps(steps)
.build();
Output output = Output.builder()
.location("location")
.append("append")
.overwrite("overwrite")
.build();
List<Policy> policies = Arrays.asList(policy);
GrantKitUpdateParams grantKitUpdateParams = GrantKitUpdateParams.builder()
.name("name")
.description("description")
.workflow(grantWorkflow)
.output(output)
.policies(policies)
.build();
GrantKit response = testSdk.grantKits.updateGrantKit("id", grantKitUpdateParams);
System.out.println(response);
}
}
deleteGrantKit
Deletes the specified grant kit.
- HTTP Method:
DELETE - Endpoint:
/grant-kits/{id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | String | ✅ | The ID of the grant kit or resource to delete |
Return Type
GrantKit
Example Usage Code Snippet
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKit;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
GrantKit response = testSdk.grantKits.deleteGrantKit("id");
System.out.println(response);
}
}
listGrantKitVersionsById
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 |
|---|---|---|---|
| grantKitIdOrName | String | ✅ | The ID of the grant kit or resource to retrieve. |
Return Type
List<GrantKitVersion>
Example Usage Code Snippet
import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.models.GrantKitVersion;
import java.util.List;
public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
TestSdk testSdk = new TestSdk(config);
List<GrantKitVersion> response = testSdk.grantKits.listGrantKitVersionsById("grant_kit_id_or_name");
System.out.println(response);
}
}