Mengambil plugin dari pasar plugin.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:GetPlugins |
get |
*Gateway
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayUniqueId |
string |
Yes |
ID unik gerbang. |
gw-0adf3ad751284cc69fcf9669fba***** |
| Category |
integer |
No |
Kategori plugin. Nilai valid:
|
1 |
| EnableOnly |
boolean |
No |
Jika true, hanya mengembalikan plugin yang diaktifkan. |
true |
| Name |
string |
No |
Nama plugin. |
key-auth |
| AcceptLanguage |
string |
No |
Bahasa tanggapan. Nilai valid: zh (Tionghoa) dan en (Inggris). |
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The request ID. |
03A3E2F4-6804-5663-9D5D-2EC47A1***** |
| Success |
boolean |
Indicates whether the operation was successful. |
true |
| Code |
integer |
The response code. |
200 |
| ErrorCode |
string |
The error code. |
500 |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
success |
| DynamicCode |
string |
The placeholder in the dynamic error message. |
code |
| DynamicMessage |
string |
The dynamic error message. |
message |
| Data |
array<object> |
A list of plugins. |
|
|
object |
The details of the plugin. |
||
| Id |
integer |
The plugin ID. |
1 |
| PrimaryUser |
string |
The ID of the creator. |
123 |
| Category |
integer |
The plugin category. Valid values: 0: user-defined 1: authentication and authorization 2: security protection 3: transport protocol 4: traffic control 5: traffic monitoring |
0 |
| Name |
string |
The plugin name. |
key-auth |
| Version |
string |
The plugin version. |
v1 |
| Summary |
string |
The plugin summary. |
这是一个插件 |
| SummaryEn |
string |
The English summary. |
|
| Phase |
integer |
The plugin execution phase. Valid values:
|
1 |
| Priority |
integer |
The plugin execution priority. A higher value indicates a higher priority. |
1 |
| ConfigCheck |
string |
The configuration validation schema. |
# 配置必须字段的校验,如下例所示,要求插件配置必须存在 "name"、"age"、“friends” 字段 name: John age: 18 friends: - David - Anne |
| WasmLang |
integer |
The language in which the Wasm plugin is implemented. Valid values:
|
0 |
| PublishState |
integer |
The publishing status. Valid values:
|
1 |
| WasmFile |
string |
The OSS URL of the Wasm plugin. |
https://mse-shared-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/cfg/import/1917515******/gw-0adf3ad751284cc69fcf9669fba*****/2022/11/02/4d390496-2c17-4b42-a479-f9068ba****/16673573***5.wasm |
| Status |
string |
The plugin status. Valid values:
|
1 |
| Mode |
integer |
The plugin type. Valid values:
|
0 |
| MaxVersion |
string |
The latest version. |
1.0.0 |
| NewVersionPublishingFlag |
boolean |
Indicates whether the latest version is being published. |
false |
Contoh
Respons sukses
JSONformat
{
"RequestId": "03A3E2F4-6804-5663-9D5D-2EC47A1*****\n",
"Success": true,
"Code": 200,
"ErrorCode": "500",
"HttpStatusCode": 200,
"Message": "success",
"DynamicCode": "code",
"DynamicMessage": "message",
"Data": [
{
"Id": 1,
"PrimaryUser": "123",
"Category": 0,
"Name": "key-auth",
"Version": "v1",
"Summary": "这是一个插件",
"SummaryEn": "",
"Phase": 1,
"Priority": 1,
"ConfigCheck": "# 配置必须字段的校验,如下例所示,要求插件配置必须存在 \"name\"、\"age\"、“friends” 字段\nname: John\nage: 18\nfriends:\n- David\n- Anne\n",
"WasmLang": 0,
"PublishState": 1,
"WasmFile": "https://mse-shared-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/cfg/import/1917515******/gw-0adf3ad751284cc69fcf9669fba*****/2022/11/02/4d390496-2c17-4b42-a479-f9068ba****/16673573***5.wasm",
"Status": "1",
"Mode": 0,
"MaxVersion": "1.0.0",
"NewVersionPublishingFlag": false
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | |
| 400 | InvalidParameter | Parameter error:%s | |
| 500 | InternalError | Console error. Try again later:%s | |
| 403 | NoPermission | You are not authorized to perform this operation:%s | |
| 404 | NotFound | Not found:%s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.