擷取外掛程式配置。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mse:GetPluginConfig |
get |
*Gateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| GatewayUniqueId |
string |
是 |
網關 UniqueId。 |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
是 |
網關外掛程式 ID。 |
123 |
| AcceptLanguage |
string |
否 |
返回資訊的語言類型: zh:中文 en:英文 |
zh |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
RestResult |
||
| RequestId |
string |
請求 ID。 |
03A3E2F4-6804-5663-9D5D-2EC47A1***** |
| Success |
boolean |
是否成功。 |
true |
| Code |
integer |
Code。 |
200 |
| ErrorCode |
string |
錯誤碼。 |
500 |
| HttpStatusCode |
integer |
HTTP STATUS 編碼。 |
200 |
| Message |
string |
介面資訊。 |
success |
| DynamicCode |
string |
動態錯誤編碼。 |
code |
| DynamicMessage |
string |
動態錯誤資訊。 |
message |
| Data |
object |
返回資料。 |
|
| Id |
integer |
外掛程式 ID。 |
1 |
| PrimaryUser |
string |
建立人 ID。 |
123 |
| Type |
integer |
外掛程式類型:
|
0 |
| Category |
integer |
外掛程式目錄。 自訂:0 認證許可權:1 安全防護:2 傳輸協議:3 流量管控:4 流量觀測:5 |
0 |
| Name |
string |
外掛程式名稱。 |
name |
| Version |
string |
外掛程式版本。 |
v1 |
| Summary |
string |
外掛程式概要。 |
這是一個外掛程式。 |
| SummaryEn |
string |
英文外掛程式概要。 |
|
| Readme |
string |
README 描述。 |
read me |
| ReadmeEn |
string |
英文 README 描述。 |
read me |
| ConfigExample |
string |
外掛程式配置範例 |
|
| Phase |
integer |
外掛程式執行階段。 預設階段:0 認證階段:1 鑒權階段:2 統計階段:3 |
0 |
| Priority |
integer |
外掛程式執行優先順序。數值越大,優先順序越高。 |
1 |
| ConfigCheck |
string |
配置校正。 |
# 配置必須欄位的校正,如下例所示,要求外掛程式配置必須存在 "name"、"age"、“friends” 欄位 name: John age: 18 friends: - David - Anne |
| Mode |
integer |
模式。 |
0 |
| WasmLang |
integer |
wasm 實現語言。 C++:0 TinyGo:1 Rust:2 AssemblyScript:3 Zig:4 |
0 |
| ImageName |
string |
鏡像名稱。 |
name |
| PublishState |
integer |
發布狀態。 |
1 |
| Status |
string |
啟用狀態。 未啟用:0 啟用:1 |
1 |
| GatewayConfigList |
array<object> |
網關外掛程式配置列表。 |
|
|
array<object> |
資料對象。 |
||
| Id |
integer |
外掛程式配置 ID。 |
1 |
| GatewayId |
integer |
網關 ID。 |
1 |
| GatewayUniqueId |
string |
網關 UniqueId。 |
gw-ubuwqygbq4783gqb2y3f87q**** |
| PluginId |
integer |
網關外掛程式 ID。 |
1 |
| Enable |
boolean |
是否開啟。 |
true |
| Config |
string |
外掛程式配置。 |
# 配置必須欄位的校正,如下例所示,要求外掛程式配置必須存在 "name"、"age"、“friends” 欄位 name: John age: 18 friends: - David - Anne |
| ConfigLevel |
integer |
外掛程式應用範圍。 全域:0 網域名稱:1 路由:2 |
0 |
| ResourceList |
array<object> |
網域名稱/路由資源清單(根據 ConfigLevel 區分) |
|
|
object |
|||
| Id |
integer |
資源 ID。 |
|
| Name |
string |
資源名稱(網域名稱/路由名) |
test-route |
| GmtCreate |
string |
建立時間。 |
1667309705000 |
| GmtModified |
string |
更新時間。 |
1667309705000 |
| RouteConfigStartIndex |
integer |
路由級規則在 GatewayConfigList 中的起始下標。若不存在路由級規則,值為-1 |
0 |
| DomainConfigStartIndex |
integer |
網域名稱級規則在 GatewayConfigList 中的起始下標。若不存在網域名稱級規則,值為-1 |
5 |
| GatewayConfigStartIndex |
integer |
執行個體規則在 GatewayConfigList 中的下標。若不存在執行個體級規則,值為-1 |
7 |
| VersionJson |
string |
網關外掛程式版本資訊列表。 |
[{"id":1, "version": "1.0.0"}] |
樣本
正常返回樣本
JSON格式
{
"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\"}]"
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | 非法請求: %s |
| 400 | InvalidParameter | Parameter error:%s | 請求參數錯誤:%s |
| 500 | InternalError | Console error. Try again later:%s | 控制台錯誤.稍後重試:%s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | 沒有許可權使用此介面:%s |
| 404 | NotFound | Not found:%s | 資源不存在:%s |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。