All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blazebit.query.connector.kandji.api.CustomProfilesApi Maven / Gradle / Ivy

The newest version!
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.CreateCustomProfile201Response;
import java.io.File;
import com.blazebit.query.connector.kandji.model.GetCustomProfile200Response;
import com.blazebit.query.connector.kandji.model.ListCustomProfiles200Response;
import com.blazebit.query.connector.kandji.model.UpdateCustomProfile200Response;

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 CustomProfilesApi {
  private ApiClient apiClient;

  public CustomProfilesApi() {
    this(Configuration.getDefaultApiClient());
  }

  public CustomProfilesApi(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;
  }

  /**
   * Create Custom Profile
   * This request allows you to create a custom profile in the Kandji library.
   * @param active (Optional, default=true) Whether this library item is active (optional)
   * @param _file (Required) The profile's .mobileconfig file (optional)
   * @param name (Required) The profile name (optional)
   * @return CreateCustomProfile201Response
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Response Details
Status Code Description Response Headers
201 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public CreateCustomProfile201Response createCustomProfile(String active, File _file, String name) throws ApiException { return createCustomProfileWithHttpInfo(active, _file, name).getData(); } /** * Create Custom Profile * This request allows you to create a custom profile in the Kandji library. * @param active (Optional, default=true) Whether this library item is active (optional) * @param _file (Required) The profile's .mobileconfig file (optional) * @param name (Required) The profile name (optional) * @return ApiResponse<CreateCustomProfile201Response> * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
201 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public ApiResponse createCustomProfileWithHttpInfo(String active, File _file, String name) throws ApiException { // Form parameters Map localVarFormParams = new LinkedHashMap<>(); if (active != null) { localVarFormParams.put("active", active); } if (_file != null) { localVarFormParams.put("file", _file); } if (name != null) { localVarFormParams.put("name", name); } String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data"); String[] localVarAuthNames = new String[] {"bearerAuth"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CustomProfilesApi.createCustomProfile", "/api/v1/library/custom-profiles", "POST", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Delete Custom Profile * NOTICE: This is permanent so be careful. This endpoint sends a request to delete a specific custom profile from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
204 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
404 requested library item not found * Accept-Ranges -
* Access-Control-Allow-Origin -
* Connection -
* Content-Encoding -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Ratelimit-Limit -
* Ratelimit-Remaining -
* Ratelimit-Reset -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* Via -
* X-Cache -
* X-Cache-Hits -
* X-Content-Type-Options -
* X-Frame-Options -
* X-Kong-Proxy-Latency -
* X-Kong-Upstream-Latency -
* X-Ratelimit-Limit-Hour -
* X-Ratelimit-Limit-Second -
* X-Ratelimit-Remaining-Hour -
* X-Ratelimit-Remaining-Second -
* X-Served-By -
* X-Timer -
* transfer-encoding -
*/ public void deleteCustomProfile(String libraryItemId) throws ApiException { deleteCustomProfileWithHttpInfo(libraryItemId); } /** * Delete Custom Profile * NOTICE: This is permanent so be careful. This endpoint sends a request to delete a specific custom profile from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
204 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
404 requested library item not found * Accept-Ranges -
* Access-Control-Allow-Origin -
* Connection -
* Content-Encoding -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Ratelimit-Limit -
* Ratelimit-Remaining -
* Ratelimit-Reset -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* Via -
* X-Cache -
* X-Cache-Hits -
* X-Content-Type-Options -
* X-Frame-Options -
* X-Kong-Proxy-Latency -
* X-Kong-Upstream-Latency -
* X-Ratelimit-Limit-Hour -
* X-Ratelimit-Limit-Second -
* X-Ratelimit-Remaining-Hour -
* X-Ratelimit-Remaining-Second -
* X-Served-By -
* X-Timer -
* transfer-encoding -
*/ public ApiResponse deleteCustomProfileWithHttpInfo(String libraryItemId) throws ApiException { // Check required parameters if (libraryItemId == null) { throw new ApiException(400, "Missing the required parameter 'libraryItemId' when calling deleteCustomProfile"); } // Path parameters String localVarPath = "/api/v1/library/custom-profiles/{library_item_id}" .replaceAll("\\{library_item_id}", apiClient.escapeString(libraryItemId.toString())); String localVarAccept = apiClient.selectHeaderAccept("text/plain"); String localVarContentType = apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"bearerAuth"}; return apiClient.invokeAPI("CustomProfilesApi.deleteCustomProfile", localVarPath, "DELETE", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, localVarAuthNames, null, false); } /** * Get Custom Profile * This endpoint retrieves details about a specific custom app from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @return GetCustomProfile200Response * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public GetCustomProfile200Response getCustomProfile(String libraryItemId) throws ApiException { return getCustomProfileWithHttpInfo(libraryItemId).getData(); } /** * Get Custom Profile * This endpoint retrieves details about a specific custom app from the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @return ApiResponse<GetCustomProfile200Response> * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public ApiResponse getCustomProfileWithHttpInfo(String libraryItemId) throws ApiException { // Check required parameters if (libraryItemId == null) { throw new ApiException(400, "Missing the required parameter 'libraryItemId' when calling getCustomProfile"); } // Path parameters String localVarPath = "/api/v1/library/custom-profiles/{library_item_id}" .replaceAll("\\{library_item_id}", apiClient.escapeString(libraryItemId.toString())); String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"bearerAuth"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CustomProfilesApi.getCustomProfile", localVarPath, "GET", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * List Custom Profiles * This endpoint makes a request to retrieve a list of custom profiles from the Kandji library. * @param page Optional page number (when results exceed pagination threshold) (optional) * @return ListCustomProfiles200Response * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public ListCustomProfiles200Response listCustomProfiles(String page) throws ApiException { return listCustomProfilesWithHttpInfo(page).getData(); } /** * List Custom Profiles * This endpoint makes a request to retrieve a list of custom profiles from the Kandji library. * @param page Optional page number (when results exceed pagination threshold) (optional) * @return ApiResponse<ListCustomProfiles200Response> * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public ApiResponse listCustomProfilesWithHttpInfo(String page) throws ApiException { // Query parameters List localVarQueryParams = new ArrayList<>( apiClient.parameterToPairs("", "page", page) ); String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"bearerAuth"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CustomProfilesApi.listCustomProfiles", "/api/v1/library/custom-profiles", "GET", localVarQueryParams, null, new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Update Custom Profile * This request allows you to update a custom profile in the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @param name Renaming a custom profile (optional) * @return UpdateCustomProfile200Response * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public UpdateCustomProfile200Response updateCustomProfile(String libraryItemId, String name) throws ApiException { return updateCustomProfileWithHttpInfo(libraryItemId, name).getData(); } /** * Update Custom Profile * This request allows you to update a custom profile in the Kandji library. ### Request Parameters `library_item_id` (path parameter): The unique identifier of the library item. * @param libraryItemId (required) * @param name Renaming a custom profile (optional) * @return ApiResponse<UpdateCustomProfile200Response> * @throws ApiException if fails to make API call * @http.response.details
Response Details
Status Code Description Response Headers
200 success * Allow -
* Content-Length -
* Content-Security-Policy -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
*/ public ApiResponse updateCustomProfileWithHttpInfo(String libraryItemId, String name) throws ApiException { // Check required parameters if (libraryItemId == null) { throw new ApiException(400, "Missing the required parameter 'libraryItemId' when calling updateCustomProfile"); } // Path parameters String localVarPath = "/api/v1/library/custom-profiles/{library_item_id}" .replaceAll("\\{library_item_id}", apiClient.escapeString(libraryItemId.toString())); // Form parameters Map localVarFormParams = new LinkedHashMap<>(); if (name != null) { localVarFormParams.put("name", name); } String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data"); String[] localVarAuthNames = new String[] {"bearerAuth"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("CustomProfilesApi.updateCustomProfile", localVarPath, "PATCH", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy