ExportHttpApi
Exports the specified HTTP API.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:ExportHttpApi |
none |
*HttpApi
|
None | None |
Request syntax
POST /v1/http-apis/{httpApiId}/export HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| httpApiId |
string |
Yes |
The ID of the HTTP API. |
api-xxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The export configuration. |
|
| gatewayId |
string |
No |
The ID of the gateway instance. This is required to export gateway extension information. |
gw-xxx |
| operationIds |
array |
No |
The IDs of specific operations to export from the REST API. |
|
|
string |
No |
The ID of an operation. |
op-xxxx |
|
| extensionConfig |
object |
No |
The gateway extension configuration. |
|
| withPlugin |
boolean |
No |
Whether to export the plugin configuration. |
|
| withPolicy |
boolean |
No |
Whether to export the policy configuration. |
|
| withService |
boolean |
No |
Whether to export the backend service. |
|
| withAuthConfig |
boolean |
No |
Whether to export the consumer authorization configuration for an operation or route. |
|
| withAuthConsumer |
boolean |
No |
Whether to export authorized consumers. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| requestId |
string |
The request ID. |
4BACB05C-3FE2-588F-9148-700C5C026B74 |
| code |
string |
The response code. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
The API definition. |
|
| specContentBase64 |
string |
The Base64-encoded API definition. |
b3BlbmFwaTogMy4wLjAKaW5mbzoKICAgIHRpdGxlOiBkZW1vCiAgICBkZXNjcmlwdGlvbjogdGhpc2lzZGVtbwogICAgdmVyc2lvbjogIiIKcGF0aHM6CiAgICAvdXNlci97dXNlcklkfToKICAgICAgICBnZXQ6CiAgICAgICAgICAgIHN1bW1hcnk6IOiOt+WPlueUqOaIt+S/oeaBrwogICAgICAgICAgICBkZXNjcmlwdGlvbjog6I635Y+W55So5oi35L+h5oGvCiAgICAgICAgICAgIG9wZXJhdGlvbklkOiBHZXRVc2VySW5mbwogICAgICAgICAgICByZXNwb25zZXM6CiAgICAgICAgICAgICAgICAiMjAwIjoKICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbjog5oiQ5YqfCiAgICAgICAgICAgICAgICAgICAgY29udGVudDoKICAgICAgICAgICAgICAgICAgICAgICAgYXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04OgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NoZW1hOiBudWxsCnNlcnZlcnM6CiAgICAtIHVybDogaHR0cDovL2FwaS5leGFtcGxlLmNvbS92MQo= |
Examples
Success response
JSON format
{
"requestId": "4BACB05C-3FE2-588F-9148-700C5C026B74",
"code": "Ok",
"message": "success",
"data": {
"specContentBase64": "b3BlbmFwaTogMy4wLjAKaW5mbzoKICAgIHRpdGxlOiBkZW1vCiAgICBkZXNjcmlwdGlvbjogdGhpc2lzZGVtbwogICAgdmVyc2lvbjogIiIKcGF0aHM6CiAgICAvdXNlci97dXNlcklkfToKICAgICAgICBnZXQ6CiAgICAgICAgICAgIHN1bW1hcnk6IOiOt+WPlueUqOaIt+S/oeaBrwogICAgICAgICAgICBkZXNjcmlwdGlvbjog6I635Y+W55So5oi35L+h5oGvCiAgICAgICAgICAgIG9wZXJhdGlvbklkOiBHZXRVc2VySW5mbwogICAgICAgICAgICByZXNwb25zZXM6CiAgICAgICAgICAgICAgICAiMjAwIjoKICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbjog5oiQ5YqfCiAgICAgICAgICAgICAgICAgICAgY29udGVudDoKICAgICAgICAgICAgICAgICAgICAgICAgYXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04OgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NoZW1hOiBudWxsCnNlcnZlcnM6CiAgICAtIHVybDogaHR0cDovL2FwaS5leGFtcGxlLmNvbS92MQo="
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.