Skip to content

Latest commit

 

History

History
217 lines (168 loc) · 10.1 KB

File metadata and controls

217 lines (168 loc) · 10.1 KB

config-api-java

配置服务API

  • API version: 1.0.0
    • Build date: 2020-12-08T12:57:31.779Z[GMT]

配置服务API

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.xopenapi</groupId>
  <artifactId>config-api-java</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.xopenapi:config-api-java:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/config-api-java-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import com.xopenapi.ApiClient;
import com.xopenapi.ApiException;
import com.xopenapi.Configuration;
import com.xopenapi.auth.*;
import com.xopenapi.models.*;
import com.xopenapi.config.ConfigApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lucfish.com/configuration/v1");
    
    // Configure HTTP bearer authorization: ApiKey
    HttpBearerAuth ApiKey = (HttpBearerAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setBearerToken("BEARER TOKEN");

    ConfigApi apiInstance = new ConfigApi(defaultClient);
    IdsReq idsReq = new IdsReq(); // IdsReq | 
    try {
      DeleteRsp result = apiInstance.configBatchDeletePost(idsReq);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ConfigApi#configBatchDeletePost");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://api.lucfish.com/configuration/v1

Class Method HTTP request Description
ConfigApi configBatchDeletePost POST /config/batchDelete 批量删除配置
ConfigApi configBatchRetrieveByKeysPost POST /config/batchRetrieveByKeys 查询配置
ConfigApi configBatchRetrieveByResourcesPost POST /config/batchRetrieveByResources 查询配置
ConfigApi configBatchRetrievePost POST /config/batchRetrieve 批量查询配置
ConfigApi configCursorPost POST /config/cursor Cursor查询配置
ConfigApi configIdDelete DELETE /config/{id} 删除配置
ConfigApi configIdGet GET /config/{id} 查询配置
ConfigApi configPagePost POST /config/page Page查询配置
ConfigApi configPost POST /config 创建配置
ConfigApi configPut PUT /config 更新配置
ConfigApi configRetrieveByKeyPost POST /config/retrieveByKey 查询配置
ConfigApi configTemplatePut PUT /configTemplate 更新配置模版
ConfigGroupApi configGroupBatchDeletePost POST /configGroup/batchDelete 批量删除组
ConfigGroupApi configGroupBatchRetrievePost POST /configGroup/batchRetrieve 批量查询组
ConfigGroupApi configGroupCursorPost POST /configGroup/cursor Cursor查询组
ConfigGroupApi configGroupIdDelete DELETE /configGroup/{id} 删除组
ConfigGroupApi configGroupIdGet GET /configGroup/{id} 查询组
ConfigGroupApi configGroupPagePost POST /configGroup/page Page查询组
ConfigGroupApi configGroupPost POST /configGroup 创建组
ConfigGroupApi configGroupPut PUT /configGroup 更新组
ConfigGroupApi configGroupRetrieveByNamePost POST /configGroup/retrieveByName 查询组
ConfigTemplateApi configTemplateBatchDeletePost POST /configTemplate/batchDelete 批量删除配置模版
ConfigTemplateApi configTemplateBatchRetrieveByGroupPost POST /configTemplate/batchRetrieveByGroup 查询配置模版
ConfigTemplateApi configTemplateBatchRetrieveByKeysPost POST /configTemplate/batchRetrieveByKeys 查询配置模版
ConfigTemplateApi configTemplateBatchRetrievePost POST /configTemplate/batchRetrieve 批量查询配置模版
ConfigTemplateApi configTemplateCursorPost POST /configTemplate/cursor Cursor查询配置模版
ConfigTemplateApi configTemplateIdDelete DELETE /configTemplate/{id} 删除配置模版
ConfigTemplateApi configTemplateIdGet GET /configTemplate/{id} 查询配置模版
ConfigTemplateApi configTemplatePagePost POST /configTemplate/page Page查询配置模版
ConfigTemplateApi configTemplatePost POST /configTemplate 创建配置模版
ConfigTemplateApi configTemplateRetrieveByKeyPost POST /configTemplate/retrieveByKey 查询配置模版

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author