All Products
Document Center

Attach Plugin

Last Updated: Apr 24, 2019


You can call this operation to bind a plug-in to an API.

  • This operation is intended for API providers.
  • You can bind a plug-in only to a published API.
  • This operation takes effect immediately after it is completed.
  • Modifications to a plug-in take effect immediately on the API to which the plug-in is bound.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set this value to AttachPlugin.
PluginId String Yes The ID of the plug-in that you want to bind.
ApiId String Yes The ID of the API to which you want to bind the plug-in.
StageName String Yes The name of the runtime environment. Valid values:
  • RELEASE: indicates the release environment.
  • PRE: indicates the pre-release environment.
  • TEST: indicates the test environment.

Response parameters

Name Type Description
RequestId String The request ID


Sample request

  2. &PluginId=9a3f1a5279434f2ba74ccd91c295af9f
  3. &ApiId=8afff6c8c4c6447abb035812e4d66b65
  4. &StageName=RELEASE

Sample responses

XML format

  1. <AttachPluginResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
  3. </AttachPluginResponse>

JSON format

  1. {
  2. "RequestId":"EF924FE4-2EDD-4CD3-89EC-34E4708574E7"
  3. }