Class SecretsApi

java.lang.Object
com.cyberark.conjur.sdk.endpoint.SecretsApi

public class SecretsApi extends Object
  • Constructor Details

    • SecretsApi

      public SecretsApi()
    • SecretsApi

      public SecretsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createSecretCall

      public okhttp3.Call createSecretCall(String account, String kind, String identifier, String expirations, String xRequestId, String body, ApiCallback _callback) throws ApiException
      Build call for createSecret
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      expirations - Tells the server to reset the variables expiration date (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      body - Secret data (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • createSecret

      public void createSecret(String account, String kind, String identifier, String expirations, String xRequestId, String body) throws ApiException
      Creates a secret value within the specified variable. Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      expirations - Tells the server to reset the variables expiration date (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      body - Secret data (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
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • createSecret

      public void createSecret(String account, String kind, String identifier) throws ApiException
      Creates a secret value within the specified variable. Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name
      kind - Type of resource - in almost all cases this should be `variable`
      identifier - URL-encoded variable ID
      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
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • createSecretWithHttpInfo

      public ApiResponse<Void> createSecretWithHttpInfo(String account, String kind, String identifier, String expirations, String xRequestId, String body) throws ApiException
      Creates a secret value within the specified variable. Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      expirations - Tells the server to reset the variables expiration date (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      body - Secret data (optional)
      Returns:
      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
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • createSecretWithHttpInfo

      public ApiResponse<Void> createSecretWithHttpInfo(String account, String kind, String identifier) throws ApiException
      Creates a secret value within the specified variable. Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name
      kind - Type of resource - in almost all cases this should be `variable`
      identifier - URL-encoded variable ID
      Returns:
      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
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • createSecretAsync

      public okhttp3.Call createSecretAsync(String account, String kind, String identifier, String expirations, String xRequestId, String body, ApiCallback<Void> _callback) throws ApiException
      Creates a secret value within the specified variable. (asynchronously) Creates a secret value within the specified Secret. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      expirations - Tells the server to reset the variables expiration date (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      body - Secret data (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      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
      201 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      422 A request parameter was either missing or invalid. -
    • getSecretCall

      public okhttp3.Call getSecretCall(String account, String kind, String identifier, Integer version, String xRequestId, ApiCallback _callback) throws ApiException
      Build call for getSecret
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      version - (**Optional**) Version you want to retrieve (Conjur keeps the last 20 versions of a secret) (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 The secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecret

      public String getSecret(String account, String kind, String identifier, Integer version, String xRequestId) throws ApiException
      Fetches the value of a secret from the specified Secret. Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      version - (**Optional**) Version you want to retrieve (Conjur keeps the last 20 versions of a secret) (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      Returns:
      String
      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 secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecret

      public String getSecret(String account, String kind, String identifier) throws ApiException
      Fetches the value of a secret from the specified Secret. Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name
      kind - Type of resource - in almost all cases this should be `variable`
      identifier - URL-encoded variable ID
      Returns:
      String
      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 secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecretWithHttpInfo

      public ApiResponse<String> getSecretWithHttpInfo(String account, String kind, String identifier, Integer version, String xRequestId) throws ApiException
      Fetches the value of a secret from the specified Secret. Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      version - (**Optional**) Version you want to retrieve (Conjur keeps the last 20 versions of a secret) (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      Returns:
      ApiResponse<String>
      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 secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecretWithHttpInfo

      public ApiResponse<String> getSecretWithHttpInfo(String account, String kind, String identifier) throws ApiException
      Fetches the value of a secret from the specified Secret. Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name
      kind - Type of resource - in almost all cases this should be `variable`
      identifier - URL-encoded variable ID
      Returns:
      ApiResponse<String>
      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 secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecretAsync

      public okhttp3.Call getSecretAsync(String account, String kind, String identifier, Integer version, String xRequestId, ApiCallback<String> _callback) throws ApiException
      Fetches the value of a secret from the specified Secret. (asynchronously) Fetches the value of a secret from the specified Secret. The latest version will be retrieved unless the version parameter is specified. The twenty most recent secret versions are retained. The secret data is returned in the response body. Note: Conjur will allow you to add a secret to any resource, but the best practice is to store and retrieve secret data only using Secret resources.
      Parameters:
      account - Organization account name (required)
      kind - Type of resource - in almost all cases this should be `variable` (required)
      identifier - URL-encoded variable ID (required)
      version - (**Optional**) Version you want to retrieve (Conjur keeps the last 20 versions of a secret) (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      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 secret value was added successfully -
      400 The server cannot process the request due to malformed request syntax -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set -
      422 A request parameter was either missing or invalid. -
    • getSecretsCall

      public okhttp3.Call getSecretsCall(String variableIds, String acceptEncoding, String xRequestId, ApiCallback _callback) throws ApiException
      Build call for getSecrets
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables. (required)
      acceptEncoding - Set the encoding of the response object (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Status Code Description Response Headers
      200 The batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -
    • getSecrets

      public Object getSecrets(String variableIds, String acceptEncoding, String xRequestId) throws ApiException
      Fetch multiple secrets Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables. (required)
      acceptEncoding - Set the encoding of the response object (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      Returns:
      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 batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -
    • getSecrets

      public Object getSecrets(String variableIds) throws ApiException
      Fetch multiple secrets Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables.
      Returns:
      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 batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -
    • getSecretsWithHttpInfo

      public ApiResponse<Object> getSecretsWithHttpInfo(String variableIds, String acceptEncoding, String xRequestId) throws ApiException
      Fetch multiple secrets Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables. (required)
      acceptEncoding - Set the encoding of the response object (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      Returns:
      ApiResponse<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 batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -
    • getSecretsWithHttpInfo

      public ApiResponse<Object> getSecretsWithHttpInfo(String variableIds) throws ApiException
      Fetch multiple secrets Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables.
      Returns:
      ApiResponse<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 batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -
    • getSecretsAsync

      public okhttp3.Call getSecretsAsync(String variableIds, String acceptEncoding, String xRequestId, ApiCallback<Object> _callback) throws ApiException
      Fetch multiple secrets (asynchronously) Fetches multiple secret values in one invocation. It’s faster to fetch secrets in batches than to fetch them one at a time.
      Parameters:
      variableIds - Comma-delimited, URL-encoded resource IDs of the variables. (required)
      acceptEncoding - Set the encoding of the response object (optional)
      xRequestId - Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      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 batch secret values -
      401 Authentication information is missing or invalid -
      403 The authenticated user lacks the necessary privileges -
      404 At least one resource was unable to be found -
      406 Issue encoding secret into JSON format -
      422 A request parameter was either missing or invalid. -