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

com.piiano.vault.client.openapi.ObjectsApi Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
/*
 * Piiano Vault REST API
 * --- sidebar_position: 1 sidebar_label: Overview description: The Piiano Vault REST API enables you to access and manage collections, objects, tokens, users, policies, and other resources within Piiano Vault. slug: / ---  # Introduction  The Piiano Vault REST API enables you to access and manage collections, objects, tokens, users, policies, and other resources within Piiano Vault in a simple, programmatic way using conventional HTTP requests and standard HTTP response codes.  The API follows RESTful conventions when possible, with most operations performed by `GET`, `POST`, `PUT`, `PATCH`, and `DELETE` requests. Request and response bodies are [JSON-encoded](https://www.json.org/json-en.html). However, for collection operations, an SQL-like [PVSchema](/guides/reference/pvschema) encoding is available.  This API reference provides details for each operation available in the API.  When you install a local copy of Vault, you can try each operation using **Send API request**.  An OpenAPI specification is available in [YAML](@site/static/assets/openapi.yaml) and [JSON](@site/static/assets/openapi.json) formats and can be used to generate client code for the API. 
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.piiano.vault.client.openapi;

import com.piiano.vault.client.openapi.ApiCallback;
import com.piiano.vault.client.openapi.ApiClient;
import com.piiano.vault.client.openapi.ApiException;
import com.piiano.vault.client.openapi.ApiResponse;
import com.piiano.vault.client.openapi.Configuration;
import com.piiano.vault.client.openapi.Pair;
import com.piiano.vault.client.openapi.ProgressRequestBody;
import com.piiano.vault.client.openapi.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.piiano.vault.client.openapi.model.BulkObjectResponse;
import com.piiano.vault.client.openapi.model.Count;
import com.piiano.vault.client.openapi.model.ObjectFieldsPage;
import com.piiano.vault.client.openapi.model.ObjectID;
import com.piiano.vault.client.openapi.model.Query;
import com.piiano.vault.client.openapi.model.RestHTTPError;
import java.util.Set;
import java.util.UUID;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;

public class ObjectsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public ObjectsApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for addObject
     * @param collection  (required)
     * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required)
     * @param requestBody The object details. (required)
     * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional)
     * @param reloadCache Reloads the cache before the action. (optional)
     * @param xTenantId List of tenant IDs to enforce on the request. (optional)
     * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the token will be marked to not expire. (optional)
     * @param _import Whether to write built-in property values. (optional, default to false)
     * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call addObjectCall(String collection, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = requestBody; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (expirationSecs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("expiration_secs", expirationSecs)); } if (_import != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("import", _import)); } if (exportKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("export_key", exportKey)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addObjectValidateBeforeCall(String collection, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling addObject(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling addObject(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling addObject(Async)"); } return addObjectCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, _callback); } /** * Add object * Adds an object to a collection. The request must include all the non-nullable properties, as defined by the [collection schema](/api/operations/list-collection-properties). When adding an object from an external system that uses UUID IDs, you can include the object ID in the request to set the ID in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the ID to lowercase. If the object to add is exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties provided in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object details. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the token will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @return ObjectID * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ObjectID addObject(String collection, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey) throws ApiException { ApiResponse localVarResp = addObjectWithHttpInfo(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey); return localVarResp.getData(); } /** * Add object * Adds an object to a collection. The request must include all the non-nullable properties, as defined by the [collection schema](/api/operations/list-collection-properties). When adding an object from an external system that uses UUID IDs, you can include the object ID in the request to set the ID in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the ID to lowercase. If the object to add is exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties provided in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object details. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the token will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @return ApiResponse<ObjectID> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse addObjectWithHttpInfo(String collection, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey) throws ApiException { okhttp3.Call localVarCall = addObjectValidateBeforeCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add object (asynchronously) * Adds an object to a collection. The request must include all the non-nullable properties, as defined by the [collection schema](/api/operations/list-collection-properties). When adding an object from an external system that uses UUID IDs, you can include the object ID in the request to set the ID in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the ID to lowercase. If the object to add is exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties provided in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object details. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the token will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call addObjectAsync(String collection, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addObjectValidateBeforeCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addObjects * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody List of objects to add. The order of the objects in this array is preserved in the response. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the objects will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call addObjectsCall(String collection, String reason, List> requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = requestBody; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/bulk/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (expirationSecs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("expiration_secs", expirationSecs)); } if (_import != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("import", _import)); } if (exportKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("export_key", exportKey)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addObjectsValidateBeforeCall(String collection, String reason, List> requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling addObjects(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling addObjects(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling addObjects(Async)"); } return addObjectsCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, _callback); } /** * Add objects (bulk) * Adds objects to a collection. The request must include all the non-nullable properties for each object, as defined by the collection schema. Use the [list collection properties](/api/operations/list-collection-properties) operation to check the collection schema. When adding objects from an external system that uses UUID IDs, you can include the object IDs in the request to set the IDs in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the IDs to lowercase. If the objects to add are exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. If any object add fails, the operation fails and no objects are added. The maximum number of objects that can be added in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). See the [add object](/api/operations/add-object) operation to add an object to a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each object property. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody List of objects to add. The order of the objects in this array is preserved in the response. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the objects will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @return BulkObjectResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public BulkObjectResponse addObjects(String collection, String reason, List> requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey) throws ApiException { ApiResponse localVarResp = addObjectsWithHttpInfo(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey); return localVarResp.getData(); } /** * Add objects (bulk) * Adds objects to a collection. The request must include all the non-nullable properties for each object, as defined by the collection schema. Use the [list collection properties](/api/operations/list-collection-properties) operation to check the collection schema. When adding objects from an external system that uses UUID IDs, you can include the object IDs in the request to set the IDs in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the IDs to lowercase. If the objects to add are exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. If any object add fails, the operation fails and no objects are added. The maximum number of objects that can be added in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). See the [add object](/api/operations/add-object) operation to add an object to a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each object property. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody List of objects to add. The order of the objects in this array is preserved in the response. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the objects will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @return ApiResponse<BulkObjectResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse addObjectsWithHttpInfo(String collection, String reason, List> requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey) throws ApiException { okhttp3.Call localVarCall = addObjectsValidateBeforeCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add objects (bulk) (asynchronously) * Adds objects to a collection. The request must include all the non-nullable properties for each object, as defined by the collection schema. Use the [list collection properties](/api/operations/list-collection-properties) operation to check the collection schema. When adding objects from an external system that uses UUID IDs, you can include the object IDs in the request to set the IDs in Vault. For example, `\"id\",\"463a83d0-a816-4902-abba-2486e0c0a0bb\"`. Vault normalizes the IDs to lowercase. If the objects to add are exported from an external system or Vault: - set `import` to `true` to import values for the built-in properties `_creation_time`, `_modification_time`, and `_expiration_time`. - if the data is encrypted, to decrypt the data provide the encryption key in `export_key`. If any object add fails, the operation fails and no objects are added. The maximum number of objects that can be added in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). See the [add object](/api/operations/add-object) operation to add an object to a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataCreator` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each object property. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody List of objects to add. The order of the objects in this array is preserved in the response. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds, cannot be set to 0. If not set, the default value is used. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the objects will be marked to not expire. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call addObjectsAsync(String collection, String reason, List> requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addObjectsValidateBeforeCall(collection, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, _import, exportKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteObjectById * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, delete only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call deleteObjectByIdCall(String collection, UUID id, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/objects/{id}" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteObjectByIdValidateBeforeCall(String collection, UUID id, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling deleteObjectById(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteObjectById(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling deleteObjectById(Async)"); } return deleteObjectByIdCall(collection, id, reason, options, adhocReason, reloadCache, xTenantId, _callback); } /** * Delete object * Deletes an object from a collection. This operation is irreversible. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, delete only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public void deleteObjectById(String collection, UUID id, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId) throws ApiException { deleteObjectByIdWithHttpInfo(collection, id, reason, options, adhocReason, reloadCache, xTenantId); } /** * Delete object * Deletes an object from a collection. This operation is irreversible. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, delete only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse deleteObjectByIdWithHttpInfo(String collection, UUID id, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId) throws ApiException { okhttp3.Call localVarCall = deleteObjectByIdValidateBeforeCall(collection, id, reason, options, adhocReason, reloadCache, xTenantId, null); return localVarApiClient.execute(localVarCall); } /** * Delete object (asynchronously) * Deletes an object from a collection. This operation is irreversible. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, delete only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call deleteObjectByIdAsync(String collection, UUID id, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteObjectByIdValidateBeforeCall(collection, id, reason, options, adhocReason, reloadCache, xTenantId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteObjects * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, deletes only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param objectID List of objects to delete. The order of the objects in the array is preserved in the response. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call deleteObjectsCall(String collection, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, List objectID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = objectID; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/bulk/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteObjectsValidateBeforeCall(String collection, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, List objectID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling deleteObjects(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling deleteObjects(Async)"); } return deleteObjectsCall(collection, reason, options, adhocReason, reloadCache, xTenantId, objectID, _callback); } /** * Delete objects (bulk) * Deletes objects from a collection. This operation is irreversible. If any object delete fails, the operation fails and no objects are deleted. The maximum number of objects that can be deleted in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, deletes only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param objectID List of objects to delete. The order of the objects in the array is preserved in the response. (optional) * @return BulkObjectResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public BulkObjectResponse deleteObjects(String collection, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, List objectID) throws ApiException { ApiResponse localVarResp = deleteObjectsWithHttpInfo(collection, reason, options, adhocReason, reloadCache, xTenantId, objectID); return localVarResp.getData(); } /** * Delete objects (bulk) * Deletes objects from a collection. This operation is irreversible. If any object delete fails, the operation fails and no objects are deleted. The maximum number of objects that can be deleted in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, deletes only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param objectID List of objects to delete. The order of the objects in the array is preserved in the response. (optional) * @return ApiResponse<BulkObjectResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse deleteObjectsWithHttpInfo(String collection, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, List objectID) throws ApiException { okhttp3.Call localVarCall = deleteObjectsValidateBeforeCall(collection, reason, options, adhocReason, reloadCache, xTenantId, objectID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete objects (bulk) (asynchronously) * Deletes objects from a collection. This operation is irreversible. If any object delete fails, the operation fails and no objects are deleted. The maximum number of objects that can be deleted in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataDeleter` capability. - At least one allowing policy and no denying policies for the `delete` operation for each of the properties defined for the collection specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param options Options for the operation. Options include: - `archived` – whether to delete only archived objects. If not specified, deletes only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param objectID List of objects to delete. The order of the objects in the array is preserved in the response. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call deleteObjectsAsync(String collection, String reason, Set options, String adhocReason, Boolean reloadCache, List xTenantId, List objectID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteObjectsValidateBeforeCall(collection, reason, options, adhocReason, reloadCache, xTenantId, objectID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getObjectById * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call getObjectByIdCall(String collection, UUID id, String reason, String adhocReason, Boolean reloadCache, String xTransParam, List xTenantId, Set options, List props, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/objects/{id}" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (props != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "props", props)); } if (xTransParam != null) { localVarHeaderParams.put("X-Trans-Param", localVarApiClient.parameterToString(xTransParam)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getObjectByIdValidateBeforeCall(String collection, UUID id, String reason, String adhocReason, Boolean reloadCache, String xTransParam, List xTenantId, Set options, List props, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling getObjectById(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getObjectById(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling getObjectById(Async)"); } return getObjectByIdCall(collection, id, reason, adhocReason, reloadCache, xTransParam, xTenantId, options, props, _callback); } /** * Get object * Returns an object from a collection with all or a subset of object property values. The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return Map<String, Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public Map getObjectById(String collection, UUID id, String reason, String adhocReason, Boolean reloadCache, String xTransParam, List xTenantId, Set options, List props) throws ApiException { ApiResponse> localVarResp = getObjectByIdWithHttpInfo(collection, id, reason, adhocReason, reloadCache, xTransParam, xTenantId, options, props); return localVarResp.getData(); } /** * Get object * Returns an object from a collection with all or a subset of object property values. The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return ApiResponse<Map<String, Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse> getObjectByIdWithHttpInfo(String collection, UUID id, String reason, String adhocReason, Boolean reloadCache, String xTransParam, List xTenantId, Set options, List props) throws ApiException { okhttp3.Call localVarCall = getObjectByIdValidateBeforeCall(collection, id, reason, adhocReason, reloadCache, xTransParam, xTenantId, options, props, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get object (asynchronously) * Returns an object from a collection with all or a subset of object property values. The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call getObjectByIdAsync(String collection, UUID id, String reason, String adhocReason, Boolean reloadCache, String xTransParam, List xTenantId, Set options, List props, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getObjectByIdValidateBeforeCall(collection, id, reason, adhocReason, reloadCache, xTransParam, xTenantId, options, props, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getObjectsCount * @param collection The name of the collection containing the objects. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The requested resource is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call getObjectsCountCall(String collection, String reason, String adhocReason, Boolean reloadCache, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/count/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getObjectsCountValidateBeforeCall(String collection, String reason, String adhocReason, Boolean reloadCache, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling getObjectsCount(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling getObjectsCount(Async)"); } return getObjectsCountCall(collection, reason, adhocReason, reloadCache, _callback); } /** * Get object count * Gets the number of objects in a collection. The role performing this operation must have at least one allowing policy and no denying policies for the `stats` operation. See [identity and access management](/data-security/identity-and-access-management) for more information about how Vault uses policies to control access to data. * @param collection The name of the collection containing the objects. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @return Count * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The requested resource is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public Count getObjectsCount(String collection, String reason, String adhocReason, Boolean reloadCache) throws ApiException { ApiResponse localVarResp = getObjectsCountWithHttpInfo(collection, reason, adhocReason, reloadCache); return localVarResp.getData(); } /** * Get object count * Gets the number of objects in a collection. The role performing this operation must have at least one allowing policy and no denying policies for the `stats` operation. See [identity and access management](/data-security/identity-and-access-management) for more information about how Vault uses policies to control access to data. * @param collection The name of the collection containing the objects. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @return ApiResponse<Count> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The requested resource is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse getObjectsCountWithHttpInfo(String collection, String reason, String adhocReason, Boolean reloadCache) throws ApiException { okhttp3.Call localVarCall = getObjectsCountValidateBeforeCall(collection, reason, adhocReason, reloadCache, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get object count (asynchronously) * Gets the number of objects in a collection. The role performing this operation must have at least one allowing policy and no denying policies for the `stats` operation. See [identity and access management](/data-security/identity-and-access-management) for more information about how Vault uses policies to control access to data. * @param collection The name of the collection containing the objects. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The requested resource is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call getObjectsCountAsync(String collection, String reason, String adhocReason, Boolean reloadCache, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getObjectsCountValidateBeforeCall(collection, reason, adhocReason, reloadCache, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listObjects * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param export Whether to encrypt the property values for export. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param ids A comma-separated list of object IDs (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call listObjectsCall(String collection, String reason, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, Boolean export, String xTransParam, List xTenantId, List ids, Set options, List props, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (export != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("export", export)); } if (ids != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "ids", ids)); } if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (props != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "props", props)); } if (xTransParam != null) { localVarHeaderParams.put("X-Trans-Param", localVarApiClient.parameterToString(xTransParam)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listObjectsValidateBeforeCall(String collection, String reason, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, Boolean export, String xTransParam, List xTenantId, List ids, Set options, List props, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling listObjects(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling listObjects(Async)"); } return listObjectsCall(collection, reason, adhocReason, reloadCache, pageSize, cursor, export, xTransParam, xTenantId, ids, options, props, _callback); } /** * List objects * Returns a [paginated list](/api/api-pagination) of objects from a collection with all or a subset of object property values. To encrypt object property values, set export to true. Values are encrypted using the key specified in the [PVAULT_KMS_EXPORT_URI or PVAULT_KMS_EXPORT_SEED environment variables](/guides/configure/environment-variables#key-management-service). The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param export Whether to encrypt the property values for export. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param ids A comma-separated list of object IDs (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return ObjectFieldsPage * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ObjectFieldsPage listObjects(String collection, String reason, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, Boolean export, String xTransParam, List xTenantId, List ids, Set options, List props) throws ApiException { ApiResponse localVarResp = listObjectsWithHttpInfo(collection, reason, adhocReason, reloadCache, pageSize, cursor, export, xTransParam, xTenantId, ids, options, props); return localVarResp.getData(); } /** * List objects * Returns a [paginated list](/api/api-pagination) of objects from a collection with all or a subset of object property values. To encrypt object property values, set export to true. Values are encrypted using the key specified in the [PVAULT_KMS_EXPORT_URI or PVAULT_KMS_EXPORT_SEED environment variables](/guides/configure/environment-variables#key-management-service). The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param export Whether to encrypt the property values for export. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param ids A comma-separated list of object IDs (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return ApiResponse<ObjectFieldsPage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse listObjectsWithHttpInfo(String collection, String reason, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, Boolean export, String xTransParam, List xTenantId, List ids, Set options, List props) throws ApiException { okhttp3.Call localVarCall = listObjectsValidateBeforeCall(collection, reason, adhocReason, reloadCache, pageSize, cursor, export, xTransParam, xTenantId, ids, options, props, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List objects (asynchronously) * Returns a [paginated list](/api/api-pagination) of objects from a collection with all or a subset of object property values. To encrypt object property values, set export to true. Values are encrypted using the key specified in the [PVAULT_KMS_EXPORT_URI or PVAULT_KMS_EXPORT_SEED environment variables](/guides/configure/environment-variables#key-management-service). The role performing this operation must have both of the following: - The `CapDataReader` capability. - At least one allowing policy and no denying policies for the `read` operation for each of the properties and the collection requested in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param export Whether to encrypt the property values for export. (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param ids A comma-separated list of object IDs (optional) * @param options Options for the operation. Options include: - `archived` – whether to list only archived objects. If not specified, list only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call listObjectsAsync(String collection, String reason, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, Boolean export, String xTransParam, List xTenantId, List ids, Set options, List props, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listObjectsValidateBeforeCall(collection, reason, adhocReason, reloadCache, pageSize, cursor, export, xTransParam, xTenantId, ids, options, props, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchObjects * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param query The query. This is a JSON object consisting of two maps in which the keys are property names. The `in` map maps a property name to an array of possible values for that property. The `match` map maps a property name to the required value for that property. An object matches the query if the object meets the requirements of both maps. For example: ```json { \"in\": { \"email\": [\"[email protected]\", \"[email protected]\"], }, \"match\": { \"first_name\": \"John\", \"last_name\": \"Doe\" } } ``` is equivalent to: ```sql WHERE first_name = 'John' AND last_name='Doe' AND email IN ('[email protected]', '[email protected]') ``` (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to search only archived objects. If not specified, search only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call searchObjectsCall(String collection, String reason, Query query, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, String xTransParam, List xTenantId, Set options, List props, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = query; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/query/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (props != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "props", props)); } if (xTransParam != null) { localVarHeaderParams.put("X-Trans-Param", localVarApiClient.parameterToString(xTransParam)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call searchObjectsValidateBeforeCall(String collection, String reason, Query query, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, String xTransParam, List xTenantId, Set options, List props, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling searchObjects(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling searchObjects(Async)"); } // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling searchObjects(Async)"); } return searchObjectsCall(collection, reason, query, adhocReason, reloadCache, pageSize, cursor, xTransParam, xTenantId, options, props, _callback); } /** * Search objects * Returns a [paginated list](/api/api-pagination) of objects, with property values, from a collection that satisfies a query. The role performing this operation must have all the following: - The `CapDataSearcher` capability. - Policies: + At least one allowing policy and no denying policies for the `read` operation for each of the collection properties specified in the `props` query parameter. + At least one allowing policy and no denying policies for the `search` operation for each of the collection properties specified in the `query` body parameter. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution.. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param query The query. This is a JSON object consisting of two maps in which the keys are property names. The `in` map maps a property name to an array of possible values for that property. The `match` map maps a property name to the required value for that property. An object matches the query if the object meets the requirements of both maps. For example: ```json { \"in\": { \"email\": [\"[email protected]\", \"[email protected]\"], }, \"match\": { \"first_name\": \"John\", \"last_name\": \"Doe\" } } ``` is equivalent to: ```sql WHERE first_name = 'John' AND last_name='Doe' AND email IN ('[email protected]', '[email protected]') ``` (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to search only archived objects. If not specified, search only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return ObjectFieldsPage * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ObjectFieldsPage searchObjects(String collection, String reason, Query query, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, String xTransParam, List xTenantId, Set options, List props) throws ApiException { ApiResponse localVarResp = searchObjectsWithHttpInfo(collection, reason, query, adhocReason, reloadCache, pageSize, cursor, xTransParam, xTenantId, options, props); return localVarResp.getData(); } /** * Search objects * Returns a [paginated list](/api/api-pagination) of objects, with property values, from a collection that satisfies a query. The role performing this operation must have all the following: - The `CapDataSearcher` capability. - Policies: + At least one allowing policy and no denying policies for the `read` operation for each of the collection properties specified in the `props` query parameter. + At least one allowing policy and no denying policies for the `search` operation for each of the collection properties specified in the `query` body parameter. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution.. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param query The query. This is a JSON object consisting of two maps in which the keys are property names. The `in` map maps a property name to an array of possible values for that property. The `match` map maps a property name to the required value for that property. An object matches the query if the object meets the requirements of both maps. For example: ```json { \"in\": { \"email\": [\"[email protected]\", \"[email protected]\"], }, \"match\": { \"first_name\": \"John\", \"last_name\": \"Doe\" } } ``` is equivalent to: ```sql WHERE first_name = 'John' AND last_name='Doe' AND email IN ('[email protected]', '[email protected]') ``` (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to search only archived objects. If not specified, search only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @return ApiResponse<ObjectFieldsPage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse searchObjectsWithHttpInfo(String collection, String reason, Query query, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, String xTransParam, List xTenantId, Set options, List props) throws ApiException { okhttp3.Call localVarCall = searchObjectsValidateBeforeCall(collection, reason, query, adhocReason, reloadCache, pageSize, cursor, xTransParam, xTenantId, options, props, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Search objects (asynchronously) * Returns a [paginated list](/api/api-pagination) of objects, with property values, from a collection that satisfies a query. The role performing this operation must have all the following: - The `CapDataSearcher` capability. - Policies: + At least one allowing policy and no denying policies for the `read` operation for each of the collection properties specified in the `props` query parameter. + At least one allowing policy and no denying policies for the `search` operation for each of the collection properties specified in the `query` body parameter. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. **Warning**: Use of the `unsafe` option, to include all object property values, may expose more private information than is required, use with caution.. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param query The query. This is a JSON object consisting of two maps in which the keys are property names. The `in` map maps a property name to an array of possible values for that property. The `match` map maps a property name to the required value for that property. An object matches the query if the object meets the requirements of both maps. For example: ```json { \"in\": { \"email\": [\"[email protected]\", \"[email protected]\"], }, \"match\": { \"first_name\": \"John\", \"last_name\": \"Doe\" } } ``` is equivalent to: ```sql WHERE first_name = 'John' AND last_name='Doe' AND email IN ('[email protected]', '[email protected]') ``` (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param pageSize The maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the [`PVAULT_SERVICE_DEFAULT_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). Must not exceed the value specified in the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#service-and-features). (optional) * @param cursor The cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the `id` is specified, paging is not supported. In this case, if the number of `id` values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST). (optional) * @param xTransParam Extra parameter to pass on to the transformers. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param options Options for the operation. Options include: - `archived` – whether to search only archived objects. If not specified, search only active objects. - `show_builtins` – show built-in properties, can only be specified with `unsafe`. - `unsafe` – fetch all the properties, cannot be specified with `props`. (optional) * @param props The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, `props=first_name,last_name,email.mask`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection or properties is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call searchObjectsAsync(String collection, String reason, Query query, String adhocReason, Boolean reloadCache, Integer pageSize, String cursor, String xTransParam, List xTenantId, Set options, List props, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchObjectsValidateBeforeCall(collection, reason, query, adhocReason, reloadCache, pageSize, cursor, xTransParam, xTenantId, options, props, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateObjectById * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object properties to update. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds. If not set, the expiration will not be changed. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the object will be marked to not expire. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, update only active objects. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call updateObjectByIdCall(String collection, UUID id, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Set options, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = requestBody; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/objects/{id}" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (expirationSecs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("expiration_secs", expirationSecs)); } if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (_import != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("import", _import)); } if (exportKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("export_key", exportKey)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateObjectByIdValidateBeforeCall(String collection, UUID id, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Set options, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling updateObjectById(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateObjectById(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling updateObjectById(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling updateObjectById(Async)"); } return updateObjectByIdCall(collection, id, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, options, _import, exportKey, _callback); } /** * Update object * Updates properties of an object in a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object properties to update. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds. If not set, the expiration will not be changed. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the object will be marked to not expire. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, update only active objects. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public void updateObjectById(String collection, UUID id, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Set options, Boolean _import, String exportKey) throws ApiException { updateObjectByIdWithHttpInfo(collection, id, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, options, _import, exportKey); } /** * Update object * Updates properties of an object in a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object properties to update. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds. If not set, the expiration will not be changed. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the object will be marked to not expire. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, update only active objects. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse updateObjectByIdWithHttpInfo(String collection, UUID id, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Set options, Boolean _import, String exportKey) throws ApiException { okhttp3.Call localVarCall = updateObjectByIdValidateBeforeCall(collection, id, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, options, _import, exportKey, null); return localVarApiClient.execute(localVarCall); } /** * Update object (asynchronously) * Updates properties of an object in a collection. The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - At least one allowing policy and no denying policies for the `write` operation for each of the collection properties specified in the call. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param id The ID of the object. (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param requestBody The object properties to update. (required) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param expirationSecs Object expiration time in seconds. If not set, the expiration will not be changed. See the `PVAULT_EXPIRATION_ASSOCIATED_OBJECTS` and `PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS` environment variables. If set to an empty value, the object will be marked to not expire. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, update only active objects. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The request is successful. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection, properties, or object is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call updateObjectByIdAsync(String collection, UUID id, String reason, Map requestBody, String adhocReason, Boolean reloadCache, List xTenantId, String expirationSecs, Set options, Boolean _import, String exportKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateObjectByIdValidateBeforeCall(collection, id, reason, requestBody, adhocReason, reloadCache, xTenantId, expirationSecs, options, _import, exportKey, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for updateObjects * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param expirationSecs Expiration time in seconds for the tokens. If not set, the expiry dates of the tokens are not changed. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, updates only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param requestBody List of objects properties to update. The order of the objects in the array is preserved in the response. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call updateObjectsCall(String collection, String reason, String expirationSecs, Set options, String adhocReason, Boolean reloadCache, Boolean _import, String exportKey, List xTenantId, List> requestBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = requestBody; // create path and map variables String localVarPath = "/api/pvlt/1.0/data/collections/{collection}/bulk/objects" .replace("{" + "collection" + "}", localVarApiClient.escapeString(collection.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (expirationSecs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("expiration_secs", expirationSecs)); } if (options != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options)); } if (adhocReason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("adhoc_reason", adhocReason)); } if (reason != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reason", reason)); } if (reloadCache != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("reload_cache", reloadCache)); } if (_import != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("import", _import)); } if (exportKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("export_key", exportKey)); } if (xTenantId != null) { localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateObjectsValidateBeforeCall(String collection, String reason, String expirationSecs, Set options, String adhocReason, Boolean reloadCache, Boolean _import, String exportKey, List xTenantId, List> requestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collection' is set if (collection == null) { throw new ApiException("Missing the required parameter 'collection' when calling updateObjects(Async)"); } // verify the required parameter 'reason' is set if (reason == null) { throw new ApiException("Missing the required parameter 'reason' when calling updateObjects(Async)"); } return updateObjectsCall(collection, reason, expirationSecs, options, adhocReason, reloadCache, _import, exportKey, xTenantId, requestBody, _callback); } /** * Update objects (bulk) * Updates properties of objects in a collection. If any object update fails, the operation fails and no objects are updated. The maximum number of objects that can be updated in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each of the object's properties. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param expirationSecs Expiration time in seconds for the tokens. If not set, the expiry dates of the tokens are not changed. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, updates only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param requestBody List of objects properties to update. The order of the objects in the array is preserved in the response. (optional) * @return BulkObjectResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public BulkObjectResponse updateObjects(String collection, String reason, String expirationSecs, Set options, String adhocReason, Boolean reloadCache, Boolean _import, String exportKey, List xTenantId, List> requestBody) throws ApiException { ApiResponse localVarResp = updateObjectsWithHttpInfo(collection, reason, expirationSecs, options, adhocReason, reloadCache, _import, exportKey, xTenantId, requestBody); return localVarResp.getData(); } /** * Update objects (bulk) * Updates properties of objects in a collection. If any object update fails, the operation fails and no objects are updated. The maximum number of objects that can be updated in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each of the object's properties. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param expirationSecs Expiration time in seconds for the tokens. If not set, the expiry dates of the tokens are not changed. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, updates only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param requestBody List of objects properties to update. The order of the objects in the array is preserved in the response. (optional) * @return ApiResponse<BulkObjectResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public ApiResponse updateObjectsWithHttpInfo(String collection, String reason, String expirationSecs, Set options, String adhocReason, Boolean reloadCache, Boolean _import, String exportKey, List xTenantId, List> requestBody) throws ApiException { okhttp3.Call localVarCall = updateObjectsValidateBeforeCall(collection, reason, expirationSecs, options, adhocReason, reloadCache, _import, exportKey, xTenantId, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update objects (bulk) (asynchronously) * Updates properties of objects in a collection. If any object update fails, the operation fails and no objects are updated. The maximum number of objects that can be updated in one operation is determined by the [`PVAULT_SERVICE_MAX_PAGE_SIZE` environment variable](/guides/configure/environment-variables#pvault_service_max_page_size). The role performing this operation must have both of the following: - The `CapDataWriter` or the `CapDataUpdater` capability. - For each object in the request, at least one allowing policy and no denying policies for the `write` operation for each of the object's properties. See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * @param collection (required) * @param reason Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. (required) * @param expirationSecs Expiration time in seconds for the tokens. If not set, the expiry dates of the tokens are not changed. (optional) * @param options Options for the operation. Options include: - `archived` – whether to update only archived objects. If not specified, updates only active objects. (optional) * @param adhocReason An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. (optional) * @param reloadCache Reloads the cache before the action. (optional) * @param _import Whether to write built-in property values. (optional, default to false) * @param exportKey The key to decrypt property values. Can be provided only when `import` is `true`. This parameter is not intended to be used manually, but through the CLI command `pvault import`. (optional) * @param xTenantId List of tenant IDs to enforce on the request. (optional) * @param requestBody List of objects properties to update. The order of the objects in the array is preserved in the response. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The bulk operation is successful. This status doesn't indicate that the operation is successful for all objects. Check the response body for details of the status of each object. -
400 The request is invalid. -
401 Authentication credentials are incorrect or missing. -
403 The caller doesn't have the required access rights. -
404 The collection is not found. -
405 The operation is not allowed. -
409 A conflict occurs. -
410 Access to a resource that is no longer available occurs. -
500 An error occurs on the server. -
503 The service is unavailable. -
*/ public okhttp3.Call updateObjectsAsync(String collection, String reason, String expirationSecs, Set options, String adhocReason, Boolean reloadCache, Boolean _import, String exportKey, List xTenantId, List> requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateObjectsValidateBeforeCall(collection, reason, expirationSecs, options, adhocReason, reloadCache, _import, exportKey, xTenantId, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy