Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.blazebit.query.connector.kandji.api;
import com.blazebit.query.connector.kandji.invoker.ApiException;
import com.blazebit.query.connector.kandji.invoker.ApiClient;
import com.blazebit.query.connector.kandji.invoker.ApiResponse;
import com.blazebit.query.connector.kandji.invoker.Configuration;
import com.blazebit.query.connector.kandji.invoker.Pair;
import jakarta.ws.rs.core.GenericType;
import com.blazebit.query.connector.kandji.model.CreateBlueprint201Response;
import com.blazebit.query.connector.kandji.model.GetBlueprintTemplates200Response;
import com.blazebit.query.connector.kandji.model.ListBlueprints200Response;
import com.blazebit.query.connector.kandji.model.ListLibraryItems200Response;
import com.blazebit.query.connector.kandji.model.UpdateBlueprint200Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-30T07:19:31.168100307Z[Etc/UTC]", comments = "Generator version: 7.10.0")
public class BlueprintsApi {
private ApiClient apiClient;
public BlueprintsApi() {
this(Configuration.getDefaultApiClient());
}
public BlueprintsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Assign Library Item
* This endpoint allows assigning a library item to a specific blueprint (classic and maps). The response will include a list of library item IDs assigned to the blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Request Body - `library_item_id` (string, required) - `assignment_node_id` (string, required for maps) - Note: To find the assignment_node_id, view the map in a browser. Then, on your keyboard, press and hold the Option ⌥ key. Each node ID remains fixed for the lifespan of the node on the map. ### Error responses | **Code** | **Body** | | --- | --- | | 400 - Bad Request | Bad Request | | | \"Library Item already exists on Blueprint\" | | | \"Library Item already exists in Assignment Node\" | | | \"assignment_node_id cannot be provided for Classic Blueprint\" | | | \"Must provide assignment_node_id for Assignment Map Blueprint\" |
* @param blueprintId (required)
* @return List<String>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public List assignLibraryItem(String blueprintId) throws ApiException {
return assignLibraryItemWithHttpInfo(blueprintId).getData();
}
/**
* Assign Library Item
* This endpoint allows assigning a library item to a specific blueprint (classic and maps). The response will include a list of library item IDs assigned to the blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Request Body - `library_item_id` (string, required) - `assignment_node_id` (string, required for maps) - Note: To find the assignment_node_id, view the map in a browser. Then, on your keyboard, press and hold the Option ⌥ key. Each node ID remains fixed for the lifespan of the node on the map. ### Error responses | **Code** | **Body** | | --- | --- | | 400 - Bad Request | Bad Request | | | \"Library Item already exists on Blueprint\" | | | \"Library Item already exists in Assignment Node\" | | | \"assignment_node_id cannot be provided for Classic Blueprint\" | | | \"Must provide assignment_node_id for Assignment Map Blueprint\" |
* @param blueprintId (required)
* @return ApiResponse<List<String>>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse> assignLibraryItemWithHttpInfo(String blueprintId) throws ApiException {
// Check required parameters
if (blueprintId == null) {
throw new ApiException(400, "Missing the required parameter 'blueprintId' when calling assignLibraryItem");
}
// Path parameters
String localVarPath = "/api/v1/blueprints/{blueprint_id}/assign-library-item"
.replaceAll("\\{blueprint_id}", apiClient.escapeString(blueprintId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI("BlueprintsApi.assignLibraryItem", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Create Blueprint
* This request creates a new empty Blueprint or a new Blueprint from a template. The keys `name` and `enrollment_code` `is_active` are required, and the blueprint name key must be unique from the existing blueprint names in the Kandji tenant. optionally, `type: map` can be used when creating a new Assignment Map blueprint. Note: If cloning an existing blueprint,\\`type\\` value and the type of sourced (\\`source.id\\`) blueprint must match and \\`source.type\\` value must be set to \\`blueprint\\`.
* @param color (optional)
* @param description (optional)
* @param enrollmentCodeCode (optional)
* @param enrollmentCodeIsActive (optional)
* @param icon (optional)
* @param name (optional)
* @param sourceId (optional)
* @param sourceType (optional)
* @param type (optional)
* @return CreateBlueprint201Response
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
201
success
-
400
400 - type does not match source.id blueprint type
-
*/
public CreateBlueprint201Response createBlueprint(String color, String description, String enrollmentCodeCode, String enrollmentCodeIsActive, String icon, String name, String sourceId, String sourceType, String type) throws ApiException {
return createBlueprintWithHttpInfo(color, description, enrollmentCodeCode, enrollmentCodeIsActive, icon, name, sourceId, sourceType, type).getData();
}
/**
* Create Blueprint
* This request creates a new empty Blueprint or a new Blueprint from a template. The keys `name` and `enrollment_code` `is_active` are required, and the blueprint name key must be unique from the existing blueprint names in the Kandji tenant. optionally, `type: map` can be used when creating a new Assignment Map blueprint. Note: If cloning an existing blueprint,\\`type\\` value and the type of sourced (\\`source.id\\`) blueprint must match and \\`source.type\\` value must be set to \\`blueprint\\`.
* @param color (optional)
* @param description (optional)
* @param enrollmentCodeCode (optional)
* @param enrollmentCodeIsActive (optional)
* @param icon (optional)
* @param name (optional)
* @param sourceId (optional)
* @param sourceType (optional)
* @param type (optional)
* @return ApiResponse<CreateBlueprint201Response>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
201
success
-
400
400 - type does not match source.id blueprint type
-
*/
public ApiResponse createBlueprintWithHttpInfo(String color, String description, String enrollmentCodeCode, String enrollmentCodeIsActive, String icon, String name, String sourceId, String sourceType, String type) throws ApiException {
// Form parameters
Map localVarFormParams = new LinkedHashMap<>();
if (color != null) {
localVarFormParams.put("color", color);
}
if (description != null) {
localVarFormParams.put("description", description);
}
if (enrollmentCodeCode != null) {
localVarFormParams.put("enrollment_code.code", enrollmentCodeCode);
}
if (enrollmentCodeIsActive != null) {
localVarFormParams.put("enrollment_code.is_active", enrollmentCodeIsActive);
}
if (icon != null) {
localVarFormParams.put("icon", icon);
}
if (name != null) {
localVarFormParams.put("name", name);
}
if (sourceId != null) {
localVarFormParams.put("source.id", sourceId);
}
if (sourceType != null) {
localVarFormParams.put("source.type", sourceType);
}
if (type != null) {
localVarFormParams.put("type", type);
}
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("BlueprintsApi.createBlueprint", "/api/v1/blueprints", "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Delete Blueprint
* # **WARNING!** This is a HIGHLY destructive action. Deleting a Blueprint will un-manage ALL devices assigned to the Blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint.
* @param blueprintId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
-
*/
public void deleteBlueprint(String blueprintId) throws ApiException {
deleteBlueprintWithHttpInfo(blueprintId);
}
/**
* Delete Blueprint
* # **WARNING!** This is a HIGHLY destructive action. Deleting a Blueprint will un-manage ALL devices assigned to the Blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint.
* @param blueprintId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
-
*/
public ApiResponse deleteBlueprintWithHttpInfo(String blueprintId) throws ApiException {
// Check required parameters
if (blueprintId == null) {
throw new ApiException(400, "Missing the required parameter 'blueprintId' when calling deleteBlueprint");
}
// Path parameters
String localVarPath = "/api/v1/blueprints/{blueprint_id}"
.replaceAll("\\{blueprint_id}", apiClient.escapeString(blueprintId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("BlueprintsApi.deleteBlueprint", localVarPath, "DELETE", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Get Blueprint
* This request returns information about a specific blueprint based on blueprint ID. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint.
* @param blueprintId (required)
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void getBlueprint(String blueprintId) throws ApiException {
getBlueprintWithHttpInfo(blueprintId);
}
/**
* Get Blueprint
* This request returns information about a specific blueprint based on blueprint ID. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint.
* @param blueprintId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse getBlueprintWithHttpInfo(String blueprintId) throws ApiException {
// Check required parameters
if (blueprintId == null) {
throw new ApiException(400, "Missing the required parameter 'blueprintId' when calling getBlueprint");
}
// Path parameters
String localVarPath = "/api/v1/blueprints/{blueprint_id}"
.replaceAll("\\{blueprint_id}", apiClient.escapeString(blueprintId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("BlueprintsApi.getBlueprint", localVarPath, "GET", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Get Blueprint Templates
* Get Blueprint Templates
* @param limit Number of results to return per page. (optional)
* @param offset The initial index from which to return the results. (optional)
* @return GetBlueprintTemplates200Response
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
success
-
*/
public GetBlueprintTemplates200Response getBlueprintTemplates(String limit, String offset) throws ApiException {
return getBlueprintTemplatesWithHttpInfo(limit, offset).getData();
}
/**
* Get Blueprint Templates
* Get Blueprint Templates
* @param limit Number of results to return per page. (optional)
* @param offset The initial index from which to return the results. (optional)
* @return ApiResponse<GetBlueprintTemplates200Response>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
success
-
*/
public ApiResponse getBlueprintTemplatesWithHttpInfo(String limit, String offset) throws ApiException {
// Query parameters
List localVarQueryParams = new ArrayList<>(
apiClient.parameterToPairs("", "limit", limit)
);
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("BlueprintsApi.getBlueprintTemplates", "/api/v1/blueprints/templates/", "GET", localVarQueryParams, null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* List Blueprints
* This request returns a list of a blueprint records in the Kandji tenant. Optional query parameters can be specified to filter the results.
* @param id Look up a specific Blueprint by its ID (optional)
* @param idIn Specify a list of Blueprint IDs to limit the results to. Multiple values may be separated by commas. There is a double underscore (`__`) between id and in (optional)
* @param name Return Blueprint names \"containing\" the specified search string. (optional)
* @param limit Number of results to return per page. (optional)
* @param offset The initial index from which to return the results. (optional)
* @return ListBlueprints200Response
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ListBlueprints200Response listBlueprints(String id, String idIn, String name, String limit, String offset) throws ApiException {
return listBlueprintsWithHttpInfo(id, idIn, name, limit, offset).getData();
}
/**
* List Blueprints
* This request returns a list of a blueprint records in the Kandji tenant. Optional query parameters can be specified to filter the results.
* @param id Look up a specific Blueprint by its ID (optional)
* @param idIn Specify a list of Blueprint IDs to limit the results to. Multiple values may be separated by commas. There is a double underscore (`__`) between id and in (optional)
* @param name Return Blueprint names \"containing\" the specified search string. (optional)
* @param limit Number of results to return per page. (optional)
* @param offset The initial index from which to return the results. (optional)
* @return ApiResponse<ListBlueprints200Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse listBlueprintsWithHttpInfo(String id, String idIn, String name, String limit, String offset) throws ApiException {
// Query parameters
List localVarQueryParams = new ArrayList<>(
apiClient.parameterToPairs("", "id", id)
);
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id__in", idIn));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("BlueprintsApi.listBlueprints", "/api/v1/blueprints", "GET", localVarQueryParams, null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* List Library Items
* This API endpoint retrieves a list of library items associated with a specific blueprint. (classic and maps). Requires that the blueprint ID is passed as a path parameter in the URL. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Response fields - `count` (int): The total count of library items. - `next` (str): The URL for the next page of results, if available. If not available will value will be `null`. - `previous` (str): The URL for the previous page of results, if available. If not available will value will be `null`. - `results` (object): An array containing objects with the following fields: - `id` (str): The ID of the library item. - `name` (str): The name of the library item.
* @param blueprintId (required)
* @return ListLibraryItems200Response
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ListLibraryItems200Response listLibraryItems(String blueprintId) throws ApiException {
return listLibraryItemsWithHttpInfo(blueprintId).getData();
}
/**
* List Library Items
* This API endpoint retrieves a list of library items associated with a specific blueprint. (classic and maps). Requires that the blueprint ID is passed as a path parameter in the URL. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Response fields - `count` (int): The total count of library items. - `next` (str): The URL for the next page of results, if available. If not available will value will be `null`. - `previous` (str): The URL for the previous page of results, if available. If not available will value will be `null`. - `results` (object): An array containing objects with the following fields: - `id` (str): The ID of the library item. - `name` (str): The name of the library item.
* @param blueprintId (required)
* @return ApiResponse<ListLibraryItems200Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse listLibraryItemsWithHttpInfo(String blueprintId) throws ApiException {
// Check required parameters
if (blueprintId == null) {
throw new ApiException(400, "Missing the required parameter 'blueprintId' when calling listLibraryItems");
}
// Path parameters
String localVarPath = "/api/v1/blueprints/{blueprint_id}/list-library-items"
.replaceAll("\\{blueprint_id}", apiClient.escapeString(blueprintId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("application/json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("BlueprintsApi.listLibraryItems", localVarPath, "GET", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Remove Library Item
* This endpoint allows removing a library item from a specific blueprint (classic and maps). The response will include a list of library item IDs assigned to the blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Request Body - `library_item_id` (string, required) - `assignment_node_id` (string, required for maps) ### Error responses | **Code** | **Body** | | --- | --- | | 400 - Bad Request | Bad Request | | | \"assignment_node_id cannot be provided for Classic Blueprint\" | | | \"Must provide assignment_node_id for Assignment Map Blueprint\" | | | \"Library Item does not exist on Blueprint\" | | | \"Library Item does not exist in Assignment Node\" |
* @param blueprintId (required)
* @return List<String>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public List removeLibraryItem(String blueprintId) throws ApiException {
return removeLibraryItemWithHttpInfo(blueprintId).getData();
}
/**
* Remove Library Item
* This endpoint allows removing a library item from a specific blueprint (classic and maps). The response will include a list of library item IDs assigned to the blueprint. ### Request Parameters `blueprint_id` (path parameter): The unique identifier of the blueprint. ### Request Body - `library_item_id` (string, required) - `assignment_node_id` (string, required for maps) ### Error responses | **Code** | **Body** | | --- | --- | | 400 - Bad Request | Bad Request | | | \"assignment_node_id cannot be provided for Classic Blueprint\" | | | \"Must provide assignment_node_id for Assignment Map Blueprint\" | | | \"Library Item does not exist on Blueprint\" | | | \"Library Item does not exist in Assignment Node\" |
* @param blueprintId (required)
* @return ApiResponse<List<String>>
* @throws ApiException if fails to make API call
* @http.response.details