# apollo_client **Repository Path**: a67793581_admin/apollo_client ## Basic Information - **Project Name**: apollo_client - **Description**: php版阿波罗第三方平台接入sdk PHP Apollo third-party platform access SDK - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-29 - **Last Updated**: 2025-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # apollo-open-api This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v0.0.2 - Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen ## Requirements PHP 5.5 and later ## Installation & Usage ### Composer To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: ``` { "repositories": [ { "type": "git", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } } ``` Then run `composer install` ### Manual Installation Download the files and include `autoload.php`: ```php require_once('/path/to/SwaggerClient-php/vendor/autoload.php'); ``` ## Tests To run the unit tests: ``` composer install ./vendor/bin/phpunit ``` ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```php setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 $key = "key_example"; // string | 字段名 $operator = "operator_example"; // string | 删除配置的操作者,域账号 try { $apiInstance->deleteField($app_id, $env, $cluster_name, $namespace_name, $key, $operator); } catch (Exception $e) { echo 'Exception when calling DefaultApi->deleteField: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->getAppInfo(); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getAppInfo: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 try { $result = $apiInstance->getClusters($app_id, $env, $cluster_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getClusters: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id try { $result = $apiInstance->getEnvClustersById($app_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getEnvClustersById: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 $key = "key_example"; // string | 字段名 try { $result = $apiInstance->getField($app_id, $env, $cluster_name, $namespace_name, $key); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getField: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 try { $result = $apiInstance->getLock($app_id, $env, $cluster_name, $namespace_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getLock: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 try { $result = $apiInstance->getNamespace($app_id, $env, $cluster_name, $namespace_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getNamespace: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 try { $result = $apiInstance->getNamespaces($app_id, $env, $cluster_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getNamespaces: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 try { $result = $apiInstance->getReleases($app_id, $env, $cluster_name, $namespace_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->getReleases: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\ClusterInfoBase(); // \Swagger\Client\Model\ClusterInfoBase | post携带参数 $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 try { $result = $apiInstance->postClusters($body, $app_id, $env); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->postClusters: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\FieldBase(); // \Swagger\Client\Model\FieldBase | post携带参数 $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 try { $result = $apiInstance->postField($body, $app_id, $env, $cluster_name, $namespace_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->postField: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\NamespaceBase(); // \Swagger\Client\Model\NamespaceBase | post携带参数 $app_id = "app_id_example"; // string | 应用id try { $result = $apiInstance->postNamespace($body, $app_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->postNamespace: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\ReleasesPost(); // \Swagger\Client\Model\ReleasesPost | post携带参数 $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 try { $result = $apiInstance->postReleases($body, $app_id, $env, $cluster_name, $namespace_name); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->postReleases: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\FieldPut(); // \Swagger\Client\Model\FieldPut | 携带参数 $app_id = "app_id_example"; // string | 应用id $env = "env_example"; // string | 环境 $cluster_name = "cluster_name_example"; // string | 集群名称 $namespace_name = "namespace_name_example"; // string | 命名空间名称 $key = "key_example"; // string | 字段名 $create_if_not_exists = true; // bool | 当配置不存在时是否自动创建 try { $apiInstance->putField($body, $app_id, $env, $cluster_name, $namespace_name, $key, $create_if_not_exists); } catch (Exception $e) { echo 'Exception when calling DefaultApi->putField: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: ApiKeyAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $operator = "operator_example"; // string | 删除配置的操作者,域账号 $release_id = "release_id_example"; // string | 发布记录id $env = "env_example"; // string | 环境 try { $result = $apiInstance->rollback($operator, $release_id, $env); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->rollback: ', $e->getMessage(), PHP_EOL; } ?> ``` ## Documentation for API Endpoints All URIs are relative to *http://config-admin.test.huajiao.com/openapi/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DefaultApi* | [**deleteField**](docs/Api/DefaultApi.md#deletefield) | **DELETE** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置接口 *DefaultApi* | [**getAppInfo**](docs/Api/DefaultApi.md#getappinfo) | **GET** /apps | 获取App信息 *DefaultApi* | [**getClusters**](docs/Api/DefaultApi.md#getclusters) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName} | 获取集群接口 *DefaultApi* | [**getEnvClustersById**](docs/Api/DefaultApi.md#getenvclustersbyid) | **GET** /apps/{appId}/envclusters | 获取App的环境,集群信息 *DefaultApi* | [**getField**](docs/Api/DefaultApi.md#getfield) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 读取配置接口 *DefaultApi* | [**getLock**](docs/Api/DefaultApi.md#getlock) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取某个Namespace当前编辑人接口 *DefaultApi* | [**getNamespace**](docs/Api/DefaultApi.md#getnamespace) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取某个Namespace信息接口 *DefaultApi* | [**getNamespaces**](docs/Api/DefaultApi.md#getnamespaces) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取集群下所有Namespace信息接口 *DefaultApi* | [**getReleases**](docs/Api/DefaultApi.md#getreleases) | **GET** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取生效配置接口 *DefaultApi* | [**postClusters**](docs/Api/DefaultApi.md#postclusters) | **POST** /envs/{env}/apps/{appId}/clusters | 创建集群接口 *DefaultApi* | [**postField**](docs/Api/DefaultApi.md#postfield) | **POST** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 新增配置接口 *DefaultApi* | [**postNamespace**](docs/Api/DefaultApi.md#postnamespace) | **POST** /apps/{appId}/appnamespaces | 创建Namespace *DefaultApi* | [**postReleases**](docs/Api/DefaultApi.md#postreleases) | **POST** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 发布配置接口 *DefaultApi* | [**putField**](docs/Api/DefaultApi.md#putfield) | **PUT** /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 修改配置接口 *DefaultApi* | [**rollback**](docs/Api/DefaultApi.md#rollback) | **PUT** /envs/{env}/releases/{releaseId}/rollback | 回滚已发布配置接口 ## Documentation For Models - [AppInfo](docs/Model/AppInfo.md) - [ClusterInfo](docs/Model/ClusterInfo.md) - [ClusterInfoBase](docs/Model/ClusterInfoBase.md) - [EnvCluster](docs/Model/EnvCluster.md) - [Field](docs/Model/Field.md) - [FieldBase](docs/Model/FieldBase.md) - [FieldPut](docs/Model/FieldPut.md) - [Lock](docs/Model/Lock.md) - [ModelNamespace](docs/Model/ModelNamespace.md) - [NamespaceBase](docs/Model/NamespaceBase.md) - [NamespaceInfo](docs/Model/NamespaceInfo.md) - [Releases](docs/Model/Releases.md) - [ReleasesConfigurations](docs/Model/ReleasesConfigurations.md) - [ReleasesPost](docs/Model/ReleasesPost.md) ## Documentation For Authorization ## ApiKeyAuth - **Type**: API key - **API key parameter name**: Authorization - **Location**: HTTP header ## Author