-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: openapi 3.2.17 Create App And grant administrative privileges (#…
…5046) * docs: openapi 3.2.17 Create App And grant administrative privileges * fix: url link * docs: openapi 3.2.17 Create App And grant administrative privileges * fix: url link * remove note duplicate --------- Co-authored-by: Jason Song <[email protected]>
- Loading branch information
Showing
2 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -532,7 +532,7 @@ This interface is the interface used to get whether the current namespace is loc | |
* **URL** : `http://{portal_address}/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/ latest` | ||
* **Method** : GET | ||
* **Request Params** : None | ||
* **Response Sample** : None | ||
* **Response Sample** : | ||
|
||
``` json | ||
{ | ||
|
@@ -605,6 +605,45 @@ This interface is the interface used to get whether the current namespace is loc | |
} | ||
``` | ||
|
||
##### 3.2.17 Create App And grant administrative privileges | ||
|
||
App can be created through this interface, | ||
|
||
> note: When creating and allowing third-party application, **check the box to Allow app creation, otherwise an exception will be throw, HTTP status code 401** | ||
* **URL** : http://{portal_address}/openapi/v1/apps/ | ||
* **Method** : POST | ||
* **Request Params** :无 | ||
* **Request Body, JSON format**: | ||
|
||
| Parameter Name | Required | Type | Description | | ||
| ------------------- | -------- | -------- | -------------------------------------------------------- | | ||
| assignAppRoleToSelf | true | Boolean | true:granting app's administrative privileges to self | | ||
| admins | false | String[] | granting app's administrative privileges to those users | | ||
| app | true | Object | APP's information,see Request Sample followed for field | | ||
|
||
* **Request Sample** : | ||
|
||
```json | ||
{ | ||
"assignAppRoleToSelf": true, | ||
"admins": [ | ||
"user1", | ||
"user2" | ||
], | ||
"app": { | ||
"name": "appName1234", | ||
"appId": "xxx-web", | ||
"orgId": "development", | ||
"orgName": "产品研发部", | ||
"ownerName": "user3", | ||
"ownerEmail": "[email protected]" | ||
} | ||
} | ||
``` | ||
|
||
* **Response Sample** : None | ||
|
||
### IV. Error code description | ||
|
||
Under normal circumstances, the Http status code returned by the interface is 200, the following lists the non-200 error code descriptions that Apollo will return. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,7 @@ namespaceName | 所管理的Namespace的名称,如果是非properties格式, | |
- [3.2.14 获取 Namespace 最后一次发布的内容](#_3214-获取某个namespace当前生效的已发布配置接口) | ||
- [3.2.15 回滚 Namespace](#_3215-回滚已发布配置接口) | ||
- [3.2.16 分页获取配置项](#_3216-分页获取配置项接口) | ||
- [3.2.17 创建App并获取管理员权限](#_3217-创建App并获取管理员权限) | ||
|
||
##### 3.2.1 获取App的环境,集群信息 | ||
|
||
|
@@ -609,6 +610,45 @@ size | false | int | 页大小,默认为 50 | |
} | ||
``` | ||
|
||
##### 3.2.17 创建App并获取管理员权限 | ||
|
||
可以通过此接口创建App, | ||
|
||
> 注意:需要在创建第三方应用时,**勾选允许创建app,否则会产生异常,HTTP状态码401** | ||
* **URL** : http://{portal_address}/openapi/v1/apps/ | ||
* **Method** : POST | ||
* **Request Params** :无 | ||
* **请求内容(Request Body, JSON格式)** : | ||
|
||
| 参数名 | 必选 | 类型 | 说明 | | ||
| ------------------- | ----- | -------- | ------------------------------------- | | ||
| assignAppRoleToSelf | true | Boolean | true:授予自己APP的管理权限 | | ||
| admins | false | String[] | 授予这些用户APP的管理权限 | | ||
| app | true | Object | APP的信息,字段参考下方的请求值Sample | | ||
|
||
* **请求值 Sample** : | ||
|
||
```json | ||
{ | ||
"assignAppRoleToSelf": true, | ||
"admins": [ | ||
"user1", | ||
"user2" | ||
], | ||
"app": { | ||
"name": "appName1234", | ||
"appId": "xxx-web", | ||
"orgId": "development", | ||
"orgName": "产品研发部", | ||
"ownerName": "user3", | ||
"ownerEmail": "[email protected]" | ||
} | ||
} | ||
``` | ||
|
||
* **返回值 Sample** : 无返回值 | ||
|
||
### 四、错误码说明 | ||
|
||
正常情况下,接口返回的Http状态码是200,下面列举了Apollo会返回的非200错误码说明。 | ||
|