Attaches a plug-in.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
POST /v1/plugin-attachments HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request data. | |
| pluginId | string | No | The plug-in ID. | pl-cvo8udem1hkob1qd67i0 |
| pluginConfig | string | No | The Base64-encoded configurations of the plug-in. | cHJlcGVuZDoKLSByb2xlOiBzeXN0ZW0KICBjb250ZW50OiDor7fkvb/nlKjoi7Hor63lm57nrZTpl67popgKYXBwZW5kOgotIHJvbGU6IHVzZXIKICBjb250ZW50OiDmr4/mrKHlm57nrZTlrozpl67popjvvIzlsJ3or5Xov5vooYzlj43pl64K |
| attachResourceIds | array | No | The attachment IDs. | |
| string | No | The attachment ID. | api-xafjieoafpjb | |
| attachResourceType | string | No | The type of the resource to which the plug-in is attached. Valid values: GatewayRoute, Gateway, GatewayDomain, HttpApi, and Operation. | HttpApi |
| environmentId | string | No | The environment ID. | env-xxx |
| gatewayId | string | No | The instance ID. | gw-cq7l5s5lhtg*** |
| enable | boolean | No | Specifies whether to enable the plug-in. Default value: false. | false |
Response parameters
Examples
Sample success responses
JSONformat
{
"requestId": "EBCB8485-24F9-54CD-B258-CB15FDB27677",
"code": "Ok",
"message": "success",
"data": {
"pluginAttachmentId": "pa-cvs7jpmm1hkgihaqv4a0"
}
}Error codes
For a list of error codes, visit the Service error codes.
