8. 对外接口管理
8.1. 新增`对外接口`
Type: POST
Author: xezzon
Content-Type: application/json
Description: 新增`对外接口`
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
code |
string |
接口编码 |
false |
- |
destination |
string |
后端地址 |
false |
- |
httpMethod |
enum |
请求接口的HTTP方法<br/>(See: 开放平台允许使用的HTTP方法) |
false |
- |
Request-example:
curl -X POST -H "Content-Type: application/json" -i 'http://127.0.0.1/openapi' --data '{
"code": "",
"destination": "",
"httpMethod": "GET"
}'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
id |
string |
No comments found. |
- |
Response-example:
{
"id": ""
}
8.2. 获取`对外接口`列表的分页数据
Type: GET
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 获取`对外接口`列表的分页数据
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
top |
int32 |
No comments found. |
false |
- |
skip |
int32 |
No comments found. |
false |
- |
Request-example:
curl -X GET -i 'http://127.0.0.1/openapi?top=0&skip=0'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
totalPages |
int32 |
No comments found. |
- |
totalElements |
int64 |
No comments found. |
- |
pageable |
object |
No comments found. |
- |
└─pageSize |
int32 |
No comments found. |
- |
└─pageNumber |
int32 |
No comments found. |
- |
└─paged |
boolean |
No comments found. |
- |
└─unpaged |
boolean |
No comments found. |
- |
└─offset |
int64 |
No comments found. |
- |
└─sort |
object |
No comments found. |
- |
└─empty |
boolean |
No comments found. |
- |
└─orders |
array |
No comments found. |
- |
numberOfElements |
int32 |
No comments found. |
- |
first |
boolean |
No comments found. |
- |
last |
boolean |
No comments found. |
- |
size |
int32 |
No comments found. |
- |
content |
array |
No comments found. |
- |
└─id |
string |
对外接口标识 |
- |
└─code |
string |
接口编码 |
- |
└─destination |
string |
后端地址 |
- |
└─httpMethod |
enum |
请求接口的HTTP方法<br/>(See: 开放平台允许使用的HTTP方法) |
- |
└─status |
enum |
接口状态<br/>(See: 接口状态) |
- |
number |
int32 |
No comments found. |
- |
sort |
object |
No comments found. |
- |
└─empty |
boolean |
No comments found. |
- |
└─orders |
array |
No comments found. |
- |
empty |
boolean |
No comments found. |
- |
Response-example:
{
"totalPages": 0,
"totalElements": 0,
"pageable": {
"pageSize": 0,
"pageNumber": 0,
"paged": true,
"unpaged": true,
"offset": 0,
"sort": {
"empty": true,
"orders": [
{
"object": "any object"
}
]
}
},
"numberOfElements": 0,
"first": true,
"last": true,
"size": 0,
"content": [
{
"id": "",
"code": "",
"destination": "",
"httpMethod": "GET",
"status": "DRAFT"
}
],
"number": 0,
"sort": {
"empty": true,
"orders": [
{
"object": "any object"
}
]
},
"empty": true
}
8.3. 更新`对外接口`信息
Type: PUT
Author: xezzon
Content-Type: application/json
Description: 更新`对外接口`信息
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
string |
对外接口标识 |
false |
- |
code |
string |
接口编码 |
false |
- |
destination |
string |
后端地址 |
false |
- |
httpMethod |
enum |
请求接口的HTTP方法<br/>(See: 开放平台允许使用的HTTP方法) |
false |
- |
Request-example:
curl -X PUT -H "Content-Type: application/json" -i 'http://127.0.0.1/openapi' --data '{
"id": "",
"code": "",
"destination": "",
"httpMethod": "GET"
}'
Response-example:
Return void.
8.4. 发布指定的`对外接口`
Type: PUT
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 发布指定的`对外接口`
Path-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
string |
要发布的`对外接口`的唯一标识符 |
true |
- |
Request-example:
curl -X PUT -i 'http://127.0.0.1/openapi/publish/{id}'
Response-example:
Return void.