All Products
Search
Document Center

API Gateway:CreatePluginAttachment

Last Updated:Jan 22, 2026

Attaches a plug-in.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v1/plugin-attachments HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request data.

pluginIdstringNo

The plug-in ID.

pl-cvo8udem1hkob1qd67i0
pluginConfigstringNo

The Base64-encoded configurations of the plug-in.

cHJlcGVuZDoKLSByb2xlOiBzeXN0ZW0KICBjb250ZW50OiDor7fkvb/nlKjoi7Hor63lm57nrZTpl67popgKYXBwZW5kOgotIHJvbGU6IHVzZXIKICBjb250ZW50OiDmr4/mrKHlm57nrZTlrozpl67popjvvIzlsJ3or5Xov5vooYzlj43pl64K
attachResourceIdsarrayNo

The attachment IDs.

stringNo

The attachment ID.

api-xafjieoafpjb
attachResourceTypestringNo

The type of the resource to which the plug-in is attached. Valid values: GatewayRoute, Gateway, GatewayDomain, HttpApi, and Operation.

HttpApi
environmentIdstringNo

The environment ID.

env-xxx
gatewayIdstringNo

The instance ID.

gw-cq7l5s5lhtg***
enablebooleanNo

Specifies whether to enable the plug-in. Default value: false.

false

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID.

EBCB8485-24F9-54CD-B258-CB15FDB27677
codestring

The status code.

Ok
messagestring

The response message returned.

success
dataobject

The returned data.

pluginAttachmentIdstring

The plug-in ID.

pa-cvs7jpmm1hkgihaqv4a0

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.