Mengambil konfigurasi plug-in.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:GetPluginConfig |
get |
*Gateway
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayUniqueId |
string |
Yes |
ID unik gateway. |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
Yes |
ID plugin gateway. |
123 |
| AcceptLanguage |
string |
No |
Bahasa respons. Nilai yang valid: zh: Tionghoa dan en: Inggris. |
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
RestResult |
||
| RequestId |
string |
ID permintaan. |
03A3E2F4-6804-5663-9D5D-2EC47A1***** |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. |
true |
| Code |
integer |
Kode status. |
200 |
| ErrorCode |
string |
Kode error. |
500 |
| HttpStatusCode |
integer |
Kode status HTTP. |
200 |
| Message |
string |
Pesan respons. |
success |
| DynamicCode |
string |
Kode error dinamis. |
code |
| DynamicMessage |
string |
Pesan error dinamis. |
message |
| Data |
object |
Data respons. |
|
| Id |
integer |
ID plugin. |
1 |
| PrimaryUser |
string |
ID pembuat. |
123 |
| Type |
integer |
Jenis plugin. Nilai yang valid:
|
0 |
| Category |
integer |
Kategori plugin. Nilai yang valid: 0: Kustom 1: Otorisasi Izin 2: Perlindungan Keamanan 3: Protokol Transport 4: Kontrol Lalu Lintas 5: Observasi Lalu Lintas |
0 |
| Name |
string |
Nama plugin. |
name |
| Version |
string |
Versi plugin. |
v1 |
| Summary |
string |
Ringkasan plugin. |
这是一个插件。 |
| SummaryEn |
string |
Ringkasan plugin dalam bahasa Inggris. |
|
| Readme |
string |
Konten README. |
read me |
| ReadmeEn |
string |
Konten README dalam bahasa Inggris. |
read me |
| ConfigExample |
string |
Contoh konfigurasi plugin. |
|
| Phase |
integer |
Fase eksekusi plugin. Nilai yang valid: 0: Fase Default 1: Fase Autentikasi 2: Fase Otorisasi 3: Fase Statistik |
0 |
| Priority |
integer |
Prioritas eksekusi. Nilai yang lebih besar menunjukkan prioritas yang lebih tinggi. |
1 |
| ConfigCheck |
string |
Pemeriksaan konfigurasi. |
# 配置必须字段的校验,如下例所示,要求插件配置必须存在 "name"、"age"、“friends” 字段 name: John age: 18 friends: - David - Anne |
| Mode |
integer |
Mode. |
0 |
| WasmLang |
integer |
Bahasa implementasi Wasm. Nilai yang valid: 0: C++ 1: TinyGo 2: Rust 3: AssemblyScript 4: Zig |
0 |
| ImageName |
string |
Nama image. |
name |
| PublishState |
integer |
Status publikasi. |
1 |
| Status |
string |
Status. Nilai yang valid: 0: Dinonaktifkan 1: Diaktifkan |
1 |
| GatewayConfigList |
array<object> |
Daftar konfigurasi untuk plugin. |
|
|
array<object> |
Konfigurasi plugin. |
||
| Id |
integer |
The plug-in configuration ID. |
1 |
| GatewayId |
integer |
The gateway ID. |
1 |
| GatewayUniqueId |
string |
The unique ID of the gateway. |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
The ID of the gateway plug-in. |
1 |
| Enable |
boolean |
Indicates whether the plug-in is enabled. |
true |
| Config |
string |
The plug-in configuration. |
# 配置必须字段的校验,如下例所示,要求插件配置必须存在 "name"、"age"、“friends” 字段 name: John age: 18 friends: - David - Anne |
| ConfigLevel |
integer |
The application scope of the plug-in. 0: global 1: domains 2: routes |
0 |
| ResourceList |
array<object> |
The domains or routes that are distinguished based on ConfigLevel. |
|
|
object |
|||
| Id |
integer |
||
| Name |
string |
The domain name or route name. |
test-route |
| GmtCreate |
string |
The time when the configuration was created. |
1667309705000 |
| GmtModified |
string |
The time when the configuration was updated. |
1667309705000 |
| RouteConfigStartIndex |
integer |
Indeks awal aturan tingkat rute dalam array |
0 |
| DomainConfigStartIndex |
integer |
Indeks awal aturan tingkat domain dalam array |
5 |
| GatewayConfigStartIndex |
integer |
Indeks aturan tingkat instance dalam array |
7 |
| VersionJson |
string |
String JSON yang merepresentasikan daftar versi plugin gateway. |
[{"id":1, "version": "1.0.0"}] |
Contoh
Respons sukses
JSONformat
{
"RequestId": "03A3E2F4-6804-5663-9D5D-2EC47A1*****",
"Success": true,
"Code": 200,
"ErrorCode": "500",
"HttpStatusCode": 200,
"Message": "success",
"DynamicCode": "code",
"DynamicMessage": "message",
"Data": {
"Id": 1,
"PrimaryUser": "123",
"Type": 0,
"Category": 0,
"Name": "name",
"Version": "v1",
"Summary": "这是一个插件。",
"SummaryEn": "",
"Readme": "read me",
"ReadmeEn": "read me",
"ConfigExample": "",
"Phase": 0,
"Priority": 1,
"ConfigCheck": "# 配置必须字段的校验,如下例所示,要求插件配置必须存在 \"name\"、\"age\"、“friends” 字段\nname: John\nage: 18\nfriends:\n- David\n- Anne",
"Mode": 0,
"WasmLang": 0,
"ImageName": "name",
"PublishState": 1,
"Status": "1",
"GatewayConfigList": [
{
"Id": 1,
"GatewayId": 1,
"GatewayUniqueId": "gw-ubuwqygbq4783gqb2y3f87q****",
"PluginId": 1,
"Enable": true,
"Config": "# 配置必须字段的校验,如下例所示,要求插件配置必须存在 \"name\"、\"age\"、“friends” 字段\nname: John\nage: 18\nfriends:\n- David\n- Anne",
"ConfigLevel": 0,
"ResourceList": [
{
"Id": 0,
"Name": "test-route"
}
],
"GmtCreate": "1667309705000",
"GmtModified": "1667309705000"
}
],
"RouteConfigStartIndex": 0,
"DomainConfigStartIndex": 5,
"GatewayConfigStartIndex": 7,
"VersionJson": "[{\"id\":1, \"version\": \"1.0.0\"}]"
}
}
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.