Retrieves the plug-in configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:GetPluginConfig |
get |
*Gateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayUniqueId |
string |
Yes |
The unique ID of the gateway. |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
Yes |
The ID of the gateway plugin. |
123 |
| AcceptLanguage |
string |
No |
The language of the response. Valid values: zh: Chinese and en: English. |
zh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
RestResult |
||
| RequestId |
string |
The request ID. |
03A3E2F4-6804-5663-9D5D-2EC47A1***** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Code |
integer |
The status code. |
200 |
| ErrorCode |
string |
The error code. |
500 |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
success |
| DynamicCode |
string |
The dynamic error code. |
code |
| DynamicMessage |
string |
The dynamic error message. |
message |
| Data |
object |
The response data. |
|
| Id |
integer |
The plugin ID. |
1 |
| PrimaryUser |
string |
The creator ID. |
123 |
| Type |
integer |
The plugin type. Valid values:
|
0 |
| Category |
integer |
The plugin category. Valid values: 0: Custom 1: Permission Authorization 2: Security Protection 3: Transport Protocol 4: Traffic Control 5: Traffic Observation |
0 |
| Name |
string |
The plugin name. |
name |
| Version |
string |
The plugin version. |
v1 |
| Summary |
string |
The plugin summary. |
这是一个插件。 |
| SummaryEn |
string |
The plugin summary in English. |
|
| Readme |
string |
The README content. |
read me |
| ReadmeEn |
string |
The README content in English. |
read me |
| ConfigExample |
string |
The plugin configuration example. |
|
| Phase |
integer |
The execution phase of the plugin. Valid values: 0: Default Phase 1: Authentication Phase 2: Authorization Phase 3: Statistics Phase |
0 |
| Priority |
integer |
The execution priority. A larger value indicates a higher priority. |
1 |
| ConfigCheck |
string |
The configuration check. |
# 配置必须字段的校验,如下例所示,要求插件配置必须存在 "name"、"age"、“friends” 字段 name: John age: 18 friends: - David - Anne |
| Mode |
integer |
The mode. |
0 |
| WasmLang |
integer |
The Wasm implementation language. Valid values: 0: C++ 1: TinyGo 2: Rust 3: AssemblyScript 4: Zig |
0 |
| ImageName |
string |
The image name. |
name |
| PublishState |
integer |
The publishing status. |
1 |
| Status |
string |
The status. Valid values: 0: Disabled 1: Enabled |
1 |
| GatewayConfigList |
array<object> |
The list of configurations for the plugin. |
|
|
array<object> |
A plugin configuration. |
||
| Id |
integer |
The plugin configuration ID. |
1 |
| GatewayId |
integer |
The gateway ID. |
1 |
| GatewayUniqueId |
string |
The unique ID of the gateway. |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
The gateway plugin ID. |
1 |
| Enable |
boolean |
Indicates whether the plugin configuration is enabled. |
true |
| Config |
string |
The plugin configuration. |
# 配置必须字段的校验,如下例所示,要求插件配置必须存在 "name"、"age"、“friends” 字段 name: John age: 18 friends: - David - Anne |
| ConfigLevel |
integer |
The application scope of the plugin. Valid values: 0: Global 1: Domain 2: Route |
0 |
| ResourceList |
array<object> |
A list of resources, which can be domains or routes depending on the value of |
|
|
object |
|||
| Id |
integer |
The resource ID. |
|
| Name |
string |
The name of the resource, which can be a domain or route name. |
test-route |
| GmtCreate |
string |
The creation time. |
1667309705000 |
| GmtModified |
string |
The modification time. |
1667309705000 |
| RouteConfigStartIndex |
integer |
The starting index of route-level rules in the |
0 |
| DomainConfigStartIndex |
integer |
The starting index of domain-level rules in the |
5 |
| GatewayConfigStartIndex |
integer |
The index of the instance-level rule in the |
7 |
| VersionJson |
string |
A JSON string that represents a list of gateway plugin versions. |
[{"id":1, "version": "1.0.0"}] |
Examples
Success response
JSON format
{
"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\"}]"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.