Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* ConfigCat Public Management API
* The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: [email protected]
*
* 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.configcat.publicapi.java.client.api;
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.ApiResponse;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.Pair;
import com.configcat.publicapi.java.client.model.CreateIntegrationModel;
import com.configcat.publicapi.java.client.model.IntegrationModel;
import com.configcat.publicapi.java.client.model.IntegrationsModel;
import com.configcat.publicapi.java.client.model.ModifyIntegrationRequest;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public class IntegrationsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IntegrationsApi() {
this(Configuration.getDefaultApiClient());
}
public IntegrationsApi(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 createIntegration
*
* @param productId The identifier of the Product. (required)
* @param createIntegrationModel (required)
* @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
*
201
When the creation was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call createIntegrationCall(
UUID productId,
CreateIntegrationModel createIntegrationModel,
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 = createIntegrationModel;
// create path and map variables
String localVarPath =
"/v1/products/{productId}/integrations"
.replace(
"{" + "productId" + "}",
localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/*+json"
};
final String localVarContentType =
localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] {"Basic"};
return localVarApiClient.buildCall(
basePath,
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames,
_callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createIntegrationValidateBeforeCall(
UUID productId,
CreateIntegrationModel createIntegrationModel,
final ApiCallback _callback)
throws ApiException {
// verify the required parameter 'productId' is set
if (productId == null) {
throw new ApiException(
"Missing the required parameter 'productId' when calling"
+ " createIntegration(Async)");
}
// verify the required parameter 'createIntegrationModel' is set
if (createIntegrationModel == null) {
throw new ApiException(
"Missing the required parameter 'createIntegrationModel' when calling"
+ " createIntegration(Async)");
}
return createIntegrationCall(productId, createIntegrationModel, _callback);
}
/**
* Create Integration This endpoint creates a new Integration in a specified Product identified
* by the `productId` parameter, which can be obtained from the [List
* Products](#operation/get-products) endpoint. The Parameters dictionary differs for each
* IntegrationType: - Datadog - `apikey`: Required. Datadog API key. -
* `site`: Datadog site. Available values: `Us`, `Eu`,
* `Us1Fed`, `Us3`, `Us5`. Default: `Us`. - Slack
* Connecting the Slack integration through the Public Management API will not post messages
* with the ConfigCat Feature Flags Slack app but with an incoming webhook. -
* `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param productId The identifier of the Product. (required)
* @param createIntegrationModel (required)
* @return IntegrationModel
* @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
When the creation was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public IntegrationModel createIntegration(
UUID productId, CreateIntegrationModel createIntegrationModel) throws ApiException {
ApiResponse localVarResp =
createIntegrationWithHttpInfo(productId, createIntegrationModel);
return localVarResp.getData();
}
/**
* Create Integration This endpoint creates a new Integration in a specified Product identified
* by the `productId` parameter, which can be obtained from the [List
* Products](#operation/get-products) endpoint. The Parameters dictionary differs for each
* IntegrationType: - Datadog - `apikey`: Required. Datadog API key. -
* `site`: Datadog site. Available values: `Us`, `Eu`,
* `Us1Fed`, `Us3`, `Us5`. Default: `Us`. - Slack
* Connecting the Slack integration through the Public Management API will not post messages
* with the ConfigCat Feature Flags Slack app but with an incoming webhook. -
* `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param productId The identifier of the Product. (required)
* @param createIntegrationModel (required)
* @return ApiResponse<IntegrationModel>
* @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
When the creation was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public ApiResponse createIntegrationWithHttpInfo(
UUID productId, CreateIntegrationModel createIntegrationModel) throws ApiException {
okhttp3.Call localVarCall =
createIntegrationValidateBeforeCall(productId, createIntegrationModel, null);
Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create Integration (asynchronously) This endpoint creates a new Integration in a specified
* Product identified by the `productId` parameter, which can be obtained from the
* [List Products](#operation/get-products) endpoint. The Parameters dictionary differs for each
* IntegrationType: - Datadog - `apikey`: Required. Datadog API key. -
* `site`: Datadog site. Available values: `Us`, `Eu`,
* `Us1Fed`, `Us3`, `Us5`. Default: `Us`. - Slack
* Connecting the Slack integration through the Public Management API will not post messages
* with the ConfigCat Feature Flags Slack app but with an incoming webhook. -
* `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param productId The identifier of the Product. (required)
* @param createIntegrationModel (required)
* @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
*
201
When the creation was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call createIntegrationAsync(
UUID productId,
CreateIntegrationModel createIntegrationModel,
final ApiCallback _callback)
throws ApiException {
okhttp3.Call localVarCall =
createIntegrationValidateBeforeCall(productId, createIntegrationModel, _callback);
Type localVarReturnType = new TypeToken() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteIntegration
*
* @param integrationId The identifier of the Integration. (required)
* @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
*
204
When the delete was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call deleteIntegrationCall(UUID integrationId, 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 =
"/v1/integrations/{integrationId}"
.replace(
"{" + "integrationId" + "}",
localVarApiClient.escapeString(integrationId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {};
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[] {"Basic"};
return localVarApiClient.buildCall(
basePath,
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames,
_callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteIntegrationValidateBeforeCall(
UUID integrationId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'integrationId' is set
if (integrationId == null) {
throw new ApiException(
"Missing the required parameter 'integrationId' when calling"
+ " deleteIntegration(Async)");
}
return deleteIntegrationCall(integrationId, _callback);
}
/**
* Delete Integration This endpoint removes a Integration identified by the
* `integrationId` parameter.
*
* @param integrationId The identifier of the Integration. (required)
* @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
*
204
When the delete was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public void deleteIntegration(UUID integrationId) throws ApiException {
deleteIntegrationWithHttpInfo(integrationId);
}
/**
* Delete Integration This endpoint removes a Integration identified by the
* `integrationId` parameter.
*
* @param integrationId The identifier of the Integration. (required)
* @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
*
204
When the delete was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public ApiResponse deleteIntegrationWithHttpInfo(UUID integrationId) throws ApiException {
okhttp3.Call localVarCall = deleteIntegrationValidateBeforeCall(integrationId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete Integration (asynchronously) This endpoint removes a Integration identified by the
* `integrationId` parameter.
*
* @param integrationId The identifier of the Integration. (required)
* @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
*
204
When the delete was successful.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call deleteIntegrationAsync(
UUID integrationId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteIntegrationValidateBeforeCall(integrationId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getIntegration
*
* @param integrationId The identifier of the Integration. (required)
* @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
When everything is ok, the integration data returned.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call getIntegrationCall(UUID integrationId, 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 =
"/v1/integrations/{integrationId}"
.replace(
"{" + "integrationId" + "}",
localVarApiClient.escapeString(integrationId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
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[] {"Basic"};
return localVarApiClient.buildCall(
basePath,
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames,
_callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIntegrationValidateBeforeCall(
UUID integrationId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'integrationId' is set
if (integrationId == null) {
throw new ApiException(
"Missing the required parameter 'integrationId' when calling"
+ " getIntegration(Async)");
}
return getIntegrationCall(integrationId, _callback);
}
/**
* Get Integration This endpoint returns the metadata of an Integration identified by the
* `integrationId`.
*
* @param integrationId The identifier of the Integration. (required)
* @return IntegrationModel
* @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
When everything is ok, the integration data returned.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public IntegrationModel getIntegration(UUID integrationId) throws ApiException {
ApiResponse localVarResp = getIntegrationWithHttpInfo(integrationId);
return localVarResp.getData();
}
/**
* Get Integration This endpoint returns the metadata of an Integration identified by the
* `integrationId`.
*
* @param integrationId The identifier of the Integration. (required)
* @return ApiResponse<IntegrationModel>
* @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
When everything is ok, the integration data returned.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public ApiResponse getIntegrationWithHttpInfo(UUID integrationId)
throws ApiException {
okhttp3.Call localVarCall = getIntegrationValidateBeforeCall(integrationId, null);
Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Integration (asynchronously) This endpoint returns the metadata of an Integration
* identified by the `integrationId`.
*
* @param integrationId The identifier of the Integration. (required)
* @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
When everything is ok, the integration data returned.
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call getIntegrationAsync(
UUID integrationId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIntegrationValidateBeforeCall(integrationId, _callback);
Type localVarReturnType = new TypeToken() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIntegrations
*
* @param productId The identifier of the Product. (required)
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call getIntegrationsCall(UUID productId, 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 =
"/v1/products/{productId}/integrations"
.replace(
"{" + "productId" + "}",
localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
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[] {"Basic"};
return localVarApiClient.buildCall(
basePath,
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames,
_callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIntegrationsValidateBeforeCall(
UUID productId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'productId' is set
if (productId == null) {
throw new ApiException(
"Missing the required parameter 'productId' when calling"
+ " getIntegrations(Async)");
}
return getIntegrationsCall(productId, _callback);
}
/**
* List Integrations This endpoint returns the list of the Integrations that belongs to the
* given Product identified by the `productId` parameter, which can be obtained from
* the [List Products](#operation/get-products) endpoint.
*
* @param productId The identifier of the Product. (required)
* @return IntegrationsModel
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public IntegrationsModel getIntegrations(UUID productId) throws ApiException {
ApiResponse localVarResp = getIntegrationsWithHttpInfo(productId);
return localVarResp.getData();
}
/**
* List Integrations This endpoint returns the list of the Integrations that belongs to the
* given Product identified by the `productId` parameter, which can be obtained from
* the [List Products](#operation/get-products) endpoint.
*
* @param productId The identifier of the Product. (required)
* @return ApiResponse<IntegrationsModel>
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public ApiResponse getIntegrationsWithHttpInfo(UUID productId)
throws ApiException {
okhttp3.Call localVarCall = getIntegrationsValidateBeforeCall(productId, null);
Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* List Integrations (asynchronously) This endpoint returns the list of the Integrations that
* belongs to the given Product identified by the `productId` parameter, which can be
* obtained from the [List Products](#operation/get-products) endpoint.
*
* @param productId The identifier of the Product. (required)
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call getIntegrationsAsync(
UUID productId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIntegrationsValidateBeforeCall(productId, _callback);
Type localVarReturnType = new TypeToken() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateIntegration
*
* @param integrationId The identifier of the Integration. (required)
* @param modifyIntegrationRequest (required)
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call updateIntegrationCall(
UUID integrationId,
ModifyIntegrationRequest modifyIntegrationRequest,
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 = modifyIntegrationRequest;
// create path and map variables
String localVarPath =
"/v1/integrations/{integrationId}"
.replace(
"{" + "integrationId" + "}",
localVarApiClient.escapeString(integrationId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {"application/json"};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/*+json"
};
final String localVarContentType =
localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] {"Basic"};
return localVarApiClient.buildCall(
basePath,
localVarPath,
"PUT",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames,
_callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateIntegrationValidateBeforeCall(
UUID integrationId,
ModifyIntegrationRequest modifyIntegrationRequest,
final ApiCallback _callback)
throws ApiException {
// verify the required parameter 'integrationId' is set
if (integrationId == null) {
throw new ApiException(
"Missing the required parameter 'integrationId' when calling"
+ " updateIntegration(Async)");
}
// verify the required parameter 'modifyIntegrationRequest' is set
if (modifyIntegrationRequest == null) {
throw new ApiException(
"Missing the required parameter 'modifyIntegrationRequest' when calling"
+ " updateIntegration(Async)");
}
return updateIntegrationCall(integrationId, modifyIntegrationRequest, _callback);
}
/**
* Update Integration This endpoint updates a Config identified by the `integrationId`
* parameter. The Parameters dictionary differs for each IntegrationType: - Datadog -
* `apikey`: Required. Datadog API key. - `site`: Datadog site. Available
* values: `Us`, `Eu`, `Us1Fed`, `Us3`, `Us5`.
* Default: `Us`. - Slack Connecting the Slack integration through the Public
* Management API will not post messages with the ConfigCat Feature Flags Slack app but with an
* incoming webhook. - `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param integrationId The identifier of the Integration. (required)
* @param modifyIntegrationRequest (required)
* @return IntegrationModel
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public IntegrationModel updateIntegration(
UUID integrationId, ModifyIntegrationRequest modifyIntegrationRequest)
throws ApiException {
ApiResponse localVarResp =
updateIntegrationWithHttpInfo(integrationId, modifyIntegrationRequest);
return localVarResp.getData();
}
/**
* Update Integration This endpoint updates a Config identified by the `integrationId`
* parameter. The Parameters dictionary differs for each IntegrationType: - Datadog -
* `apikey`: Required. Datadog API key. - `site`: Datadog site. Available
* values: `Us`, `Eu`, `Us1Fed`, `Us3`, `Us5`.
* Default: `Us`. - Slack Connecting the Slack integration through the Public
* Management API will not post messages with the ConfigCat Feature Flags Slack app but with an
* incoming webhook. - `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param integrationId The identifier of the Integration. (required)
* @param modifyIntegrationRequest (required)
* @return ApiResponse<IntegrationModel>
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public ApiResponse updateIntegrationWithHttpInfo(
UUID integrationId, ModifyIntegrationRequest modifyIntegrationRequest)
throws ApiException {
okhttp3.Call localVarCall =
updateIntegrationValidateBeforeCall(integrationId, modifyIntegrationRequest, null);
Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update Integration (asynchronously) This endpoint updates a Config identified by the
* `integrationId` parameter. The Parameters dictionary differs for each
* IntegrationType: - Datadog - `apikey`: Required. Datadog API key. -
* `site`: Datadog site. Available values: `Us`, `Eu`,
* `Us1Fed`, `Us3`, `Us5`. Default: `Us`. - Slack
* Connecting the Slack integration through the Public Management API will not post messages
* with the ConfigCat Feature Flags Slack app but with an incoming webhook. -
* `incoming_webhook.url`: Required. The [incoming webhook
* URL](https://api.slack.com/messaging/webhooks) where the integration should post messages. -
* Amplitude - `apiKey`: Required. Amplitude API Key. - `secretKey`:
* Required. Amplitude Secret Key. - Mixpanel - `serviceAccountUserName`: Required.
* Mixpanel Service Account Username. - `serviceAccountSecret`: Required. Mixpanel
* Service Account Secret. - `projectId`: Required. Mixpanel Project ID. -
* `server`: Mixpanel Server. Available values: `StandardServer`,
* `EUResidencyServer`. Default: `StandardServer`. - Twilio Segment -
* `writeKey`: Required. Twilio Segment Write Key. - `server`: Twilio
* Segment Server. Available values: `Us`, `Eu`. Default: `Us`. -
* PubNub (work in progress)
*
* @param integrationId The identifier of the Integration. (required)
* @param modifyIntegrationRequest (required)
* @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
-
*
400
Bad request.
-
*
404
Not found.
-
*
429
Too many requests. In case of the request rate exceeds the rate limits.
-
*
*/
public okhttp3.Call updateIntegrationAsync(
UUID integrationId,
ModifyIntegrationRequest modifyIntegrationRequest,
final ApiCallback _callback)
throws ApiException {
okhttp3.Call localVarCall =
updateIntegrationValidateBeforeCall(
integrationId, modifyIntegrationRequest, _callback);
Type localVarReturnType = new TypeToken() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}