Package Management API¶
POST Get Layer 4 Packages¶
POST /cdn/packageRest/Layer4/list
Body Request Parameters
{
"filters": [
{
"label": "listenPort",
"value": ["443"]
}
],
"pageSize": 10,
"searchHeader": {
"activate": ["1"]
},
"pageNum": 1,
"oid": "20241213279926076364"
}
Request Parameters¶
| Name | Location | Type | Required | Chinese Name | Description |
|---|---|---|---|---|---|
| Authorization | header | string | No | none | |
| body | body | object | No | none | |
| » filters | body | [object] | No | Search | none |
| »» label | body | string | No | Name | oid:package (alias)) |
| »» value | body | [string] | No | Value | e.g.: 442 |
| » pageNum | body | integer(int32) | Yes | Current page | none |
| » pageSize | body | integer(int32) | Yes | Items per page | none |
| » searchHeader | body | object | No | Filter criteria | none |
| »» activate | body | [string] | Yes | Package status | 0:pending payment |
Detailed Description¶
»» label: oid:package (alias)
packageName:package name
»» activate: 0: pending payment -1: unsubscribed 1: in use 3: closed 4: configuring
Example Responses
200 Response
{
"total": 3,
"rows": [
{
"ctime": 1681887684,
"isTest": 1,
"oid": "123456789684",
"packageName": "Test Layer 4",
"ruleCnt": 0,
"remark": "",
"activate": 1,
"mday": null,
"lastday": null,
"alias": "Test 2",
"cname": "",
"bandwidth": 0
}
],
"code": 200,
"msg": "Query successful"
}
201 Response
Responses¶
| Status Code | Status Meaning | Description | Data Model |
|---|---|---|---|
| 200 | OK | none | Inline |
| 201 | Created | none | Inline |
| 401 | Unauthorized | none | Inline |
| 403 | Forbidden | none | Inline |
| 404 | Not Found | none | Inline |
Response Data Structure¶
Status Code 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » total | integer | true | none | Total count | Total number matching query criteria, used for pagination |
| » rows | [object] | true | none | Query result | none |
| »» ctime | integer | true | none | Create time | none |
| »» isTest | integer | true | none | Package Type | 0: test package 1: official package |
| »» oid | string | true | none | Package | none |
| »» packageName | string | true | none | Package name | none |
| »» ruleCnt | integer | true | none | Rule count | none |
| »» remark | string | true | none | Remarks | none |
| »» activate | integer | true | none | Status | 0:pending payment -1:unsubscribed in use closed 4:configuring |
| »» mday | string¦null | true | none | Expiry time | none |
| »» lastday | integer¦null | true | none | Days to expiry | none |
| »» alias | string | true | none | Alias | none |
| » code | integer | true | none | none | |
| » msg | string | true | none | none |