All URIs are relative to https://api.configcat.com
Method | HTTP request | Description |
---|---|---|
createProduct | POST /v1/organizations/{organizationId}/products | Create Product |
deleteProduct | DELETE /v1/products/{productId} | Delete Product |
getProduct | GET /v1/products/{productId} | Get Product |
getProductPreferences | GET /v1/products/{productId}/preferences | Get Product Preferences |
getProducts | GET /v1/products | List Products |
updateProduct | PUT /v1/products/{productId} | Update Product |
updateProductPreferences | POST /v1/products/{productId}/preferences | Update Product Preferences |
ProductModel createProduct(organizationId, createProductRequest)
Create Product
This endpoint creates a new Product in a specified Organization identified by the `organizationId` parameter, which can be obtained from the List Organizations endpoint.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID organizationId = UUID.randomUUID(); // UUID | The identifier of the Organization.
CreateProductRequest createProductRequest = new CreateProductRequest(); // CreateProductRequest |
try {
ProductModel result = apiInstance.createProduct(organizationId, createProductRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#createProduct");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
organizationId | UUID | The identifier of the Organization. | |
createProductRequest | CreateProductRequest |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
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. | - |
deleteProduct(productId)
Delete Product
This endpoint removes a Product identified by the `productId` parameter.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID productId = UUID.randomUUID(); // UUID | The identifier of the Product.
try {
apiInstance.deleteProduct(productId);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#deleteProduct");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
productId | UUID | The identifier of the Product. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
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. | - |
ProductModel getProduct(productId)
Get Product
This endpoint returns the metadata of a Product identified by the `productId`.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID productId = UUID.randomUUID(); // UUID | The identifier of the Product.
try {
ProductModel result = apiInstance.getProduct(productId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#getProduct");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
productId | UUID | The identifier of the Product. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | When everything is ok, the product data is returned. | - |
400 | Bad request. | - |
404 | Not found. | - |
429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
PreferencesModel getProductPreferences(productId)
Get Product Preferences
This endpoint returns the preferences of a Product identified by the `productId`.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID productId = UUID.randomUUID(); // UUID | The identifier of the Product.
try {
PreferencesModel result = apiInstance.getProductPreferences(productId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#getProductPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
productId | UUID | The identifier of the Product. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | When everything is ok, the product preferences data is returned. | - |
400 | Bad request. | - |
404 | Not found. | - |
429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
List<ProductModel> getProducts()
List Products
This endpoint returns the list of the Products that belongs to the user.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
try {
List<ProductModel> result = apiInstance.getProducts();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#getProducts");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - | |
429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
ProductModel updateProduct(productId, updateProductRequest)
Update Product
This endpoint updates a Product identified by the `productId` parameter.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID productId = UUID.randomUUID(); // UUID | The identifier of the Product.
UpdateProductRequest updateProductRequest = new UpdateProductRequest(); // UpdateProductRequest |
try {
ProductModel result = apiInstance.updateProduct(productId, updateProductRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#updateProduct");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
productId | UUID | The identifier of the Product. | |
updateProductRequest | UpdateProductRequest |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
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. | - |
PreferencesModel updateProductPreferences(productId, updatePreferencesRequest)
Update Product Preferences
This endpoint updates the preferences of a Product identified by the `productId` parameter.
// Import classes:
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.auth.*;
import com.configcat.publicapi.java.client.models.*;
import com.configcat.publicapi.java.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.configcat.com");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
ProductsApi apiInstance = new ProductsApi(defaultClient);
UUID productId = UUID.randomUUID(); // UUID | The identifier of the Product.
UpdatePreferencesRequest updatePreferencesRequest = new UpdatePreferencesRequest(); // UpdatePreferencesRequest |
try {
PreferencesModel result = apiInstance.updateProductPreferences(productId, updatePreferencesRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#updateProductPreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
productId | UUID | The identifier of the Product. | |
updatePreferencesRequest | UpdatePreferencesRequest |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | When the update was successful. | - |
400 | Bad request. | - |
404 | Not found. | - |
429 | Too many requests. In case of the request rate exceeds the rate limits. | - |