Skip to main content

GrantKitsService

A list of all methods in the GrantKitsService service. Click on the method name to view detailed information about that method.

MethodsDescription
listGrantKitsReturns a list of the latest versions of each grant kit in the organization. Grant Kits are sorted by creation date, descending.
createGrantKitCreates a new Grant Kit
getGrantKitByIdReturns the details of a Grant Kit.
updateGrantKitUpdates the specified grant kit.
deleteGrantKitDeletes the specified grant kit.
listGrantKitVersionsByIdReturns 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val response: List<GrantKit> = testSdk.grantKits.listGrantKits();

println(response);
}

createGrantKit

Creates a new Grant Kit

  • HTTP Method: POST
  • Endpoint: /grant-kits

Parameters

NameTypeRequiredDescription
grantKitCreateParamsGrantKitCreateParamsRequest 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val oneOf: List<String> = Arrays.asList("one_of");

val allOf: List<String> = Arrays.asList("all_of");

val reviewers: Reviewers = Reviewers.builder()
.oneOf(oneOf)
.allOf(allOf)
.build();

val policy: Policy = Policy.builder()
.bundle("bundle")
.query("query")
.build();

val skipIf: List<Policy> = Arrays.asList(policy);

val step: Step = Step.builder()
.reviewers(reviewers)
.skipIf(skipIf)
.build();

val steps: List<Step> = Arrays.asList(step);

val grantWorkflow: GrantWorkflow = GrantWorkflow.builder()
.steps(steps)
.build();

val policies: List<Policy> = Arrays.asList(policy);

val output: Output = Output.builder()
.location("location")
.append("append")
.overwrite("overwrite")
.build();

val grantKitCreateParams: GrantKitCreateParams = GrantKitCreateParams.builder()
.name("name")
.description("description")
.workflow(grantWorkflow)
.policies(policies)
.output(output)
.build();

val response: GrantKit = testSdk.grantKits.createGrantKit(grantKitCreateParams);

println(response);
}

getGrantKitById

Returns the details of a Grant Kit.

  • HTTP Method: GET
  • Endpoint: /grant-kits/{id}

Parameters

NameTypeRequiredDescription
idStringThe 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val response: GrantKit = testSdk.grantKits.getGrantKitById("id");

println(response);
}

updateGrantKit

Updates the specified grant kit.

  • HTTP Method: PUT
  • Endpoint: /grant-kits/{id}

Parameters

NameTypeRequiredDescription
idStringThe ID of the grant kit or resource to update
grantKitUpdateParamsGrantKitUpdateParamsRequest 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val oneOf: List<String> = Arrays.asList("one_of");

val allOf: List<String> = Arrays.asList("all_of");

val reviewers: Reviewers = Reviewers.builder()
.oneOf(oneOf)
.allOf(allOf)
.build();

val policy: Policy = Policy.builder()
.bundle("bundle")
.query("query")
.build();

val skipIf: List<Policy> = Arrays.asList(policy);

val step: Step = Step.builder()
.reviewers(reviewers)
.skipIf(skipIf)
.build();

val steps: List<Step> = Arrays.asList(step);

val grantWorkflow: GrantWorkflow = GrantWorkflow.builder()
.steps(steps)
.build();

val output: Output = Output.builder()
.location("location")
.append("append")
.overwrite("overwrite")
.build();

val policies: List<Policy> = Arrays.asList(policy);

val grantKitUpdateParams: GrantKitUpdateParams = GrantKitUpdateParams.builder()
.name("name")
.description("description")
.workflow(grantWorkflow)
.output(output)
.policies(policies)
.build();

val response: GrantKit = testSdk.grantKits.updateGrantKit("id", grantKitUpdateParams);

println(response);
}

deleteGrantKit

Deletes the specified grant kit.

  • HTTP Method: DELETE
  • Endpoint: /grant-kits/{id}

Parameters

NameTypeRequiredDescription
idStringThe 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val response: GrantKit = testSdk.grantKits.deleteGrantKit("id");

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

NameTypeRequiredDescription
grantKitIdOrNameStringThe 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;

fun main() {
val config: TestSdkConfig = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

val testSdk: TestSdk = TestSdk(config);

val response: List<GrantKitVersion> = testSdk.grantKits.listGrantKitVersionsById("grant_kit_id_or_name");

println(response);
}