All Products
Search
Document Center

API Gateway:DescribeDeployedApi

Last Updated:Mar 01, 2024

Queries the definition of an API that takes effect in an environment. The definition may differ from the definition being edited.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apigateway:DescribeDeployedApiRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringNo

The ID of the API group. This ID is generated by the system and globally unique.

81750604ccff48c48f34d6c0165e09db
ApiIdstringYes

The ID of the API.

ab7c95a01a7e42f28718f34497bbf47c
StageNamestringYes

The name of the runtime environment. Valid values:

  • RELEASE
  • PRE: the pre-release environment
  • TEST
RELEASE

Response parameters

ParameterTypeDescriptionExample
object
ApiIdstring

The ID of the API.

4eed13a57d4e42fbb51316be8a5329ff
ResultTypestring

The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML. Default value: JSON.

HTML
DisableInternetboolean
  • Specifies whether to set DisableInternet to true to limit API calls to within the VPC.
  • If you set DisableInternet to false, the limit is lifted.
Note If you do not set this parameter, the original value is not modified.
true
ResultBodyModelstring

The return description of the API.

{}
ResultSamplestring

The sample response from the backend service.

{code: 200, message:'success', data: ''}
AllowSignatureMethodstring

The signature method used by the client. Valid values:

  • HmacSHA256
  • HmacSHA1,HmacSHA256
HmacSHA256
RegionIdstring

The region to which the API group belongs.

cn-beijing
ForceNonceCheckboolean
  • Specifies whether to set ForceNonceCheck to true to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
  • If you set ForceNonceCheck to false, the check is not performed. The default value is false when you create an API.
true
Visibilitystring

Specifies whether to make the API public. Valid values:

  • PUBLIC: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.**
  • PRIVATE: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.
PUBLIC
FailResultSamplestring

The sample error response from the backend service.

{"errorCode":"fail","errorMessage":"param invalid"}
AuthTypestring

The security authentication method of the API. Valid values:

  • APP: Only authorized applications can call the API.

  • ANONYMOUS: The API can be anonymously called. In this mode, you must take note of the following rules:

    • All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If you make this API public, set API-specific throttling policies.
APP
RequestIdstring

The ID of the request.

EF924FE4-2EDD-4CD3-89EC-34E4708574E7
Descriptionstring

The description.

Api description
GroupNamestring

The name of the API group.

Weather
GroupIdstring

The ID of the API group.

bc77f5b49c974437a9912ea3755cd834
DeployedTimestring

The deployment time. Format: yyyy-mm-ddhh:mm:ss.

2022-07-25T17:47:51Z
StageNamestring

The name of the runtime environment. Valid values:

  • RELEASE
  • PRE: the pre-release environment
  • TEST
RELEASE
ApiNamestring

The name of the API

weather
RequestConfigobject

Configuration items of API requests sent by the consumer to API Gateway.

For more information, see RequestConfig .

BodyModelstring

The body model.

https://apigateway.aliyun.com/models/3a240a127dccXXXXXXXX947b4095/9e2df550e85b4121a79XXXXXxaab
RequestPathstring

The API request path. If the complete API URL is http://api.a.com:8080/object/add?key1=value1&key2=value2, the API request path is /object/add .

/api/billing/test/[type]
RequestHttpMethodstring

The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.

POST
BodyFormatstring

This parameter takes effect only when the RequestMode parameter is set to MAPPING.

The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams.

STREAM
RequestModestring

The request mode. Valid values:

  • MAPPING: Parameters are mapped. Unknown parameters are filtered out.
  • PASSTHROUGH: Parameters are passed through.
  • MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.
MAPPING
PostBodyDescriptionstring

The description of the request body.

fwefwef
RequestProtocolstring

The protocol type supported by the API. Valid values: HTTP, HTTPS, and WebSocket. Separate multiple values with commas (,), such as "HTTP,HTTPS".

HTTP
ServiceConfigobject

The configuration items of API requests sent by API Gateway to the backend service.

For more information, see ServiceConfig .

VpcIdstring

The ID of the VPC.

vpc-uf6kg9x8sx2tbxxxx
MockStatusCodeinteger

The status code returned for service mocking.

200
ServicePathstring

The path used to call the back-end service. If the complete back-end service path is http://api.a.com:8080/object/add?key1=value1&key2=value2, ServicePath is /object/add.``

/object/add
Mockstring

Specifies whether to enable the Mock mode. Valid values:

  • TRUE: The Mock mode is enabled.
  • **FALSE: The Mock mode is not enabled.
TRUE
ServiceAddressstring

The URL used to call the back-end service. If the complete back-end service URL is http://api.a.com:8080/object/add?key1=value1&key2=value2, the value of ServiceAddress is http://api.a.com:8080.``

http://api.a.com:8080
ServiceVpcEnablestring

Specifies whether to enable the VPC channel. Valid values:

  • TRUE: The VPC channel is enabled. You must create the corresponding VPC access authorization before you can enable a VPC channel.
  • FALSE: The VPC channel is not enabled.
TRUE
MockResultstring

The result returned when the Mock mode is enabled.

test result
ServiceHttpMethodstring

The HTTP method used to call a backend service. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.

POST
ServiceProtocolstring

The backend service protocol. Currently, only HTTP, HTTPS, and FunctionCompute are supported.

HTTP
ServiceTimeoutinteger

The timeout period of the backend service, in millisecond.

1000
MockHeadersobject []

The simulated Headers.

HeaderValuestring

The value of the HTTP header parameter.

86400
HeaderNamestring

The name of the HTTP header parameter.

Content-Type
VpcConfigobject

Configuration items related to VPC channels

VpcIdstring

The ID of the VPC.

vpc-2zeafsc3fygk1***
InstanceIdstring

The IDs of the ELB and SLB instances in the VPC.

i-bp1h497hkijewv2***
Portinteger

The port number that corresponds to the instance.

8080
Namestring

The name of the VPC access authorization.

glmall-app-test
FunctionComputeConfigobject

Backend configuration items when the backend service is Function Compute

FcTypestring

The type of the Function Compute instance.

HttpTrigger
RoleArnstring

The Alibaba Cloud Resource Name (ARN) of the RAM role to be assumed by API Gateway to access Function Compute.

acs:ram::111***:role/aliyunserviceroleforsas
Methodstring

The request method.

GET
FcBaseUrlstring

The root path of Function Compute.

https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/
ContentTypeValuestring

The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.

application/x-www-form-urlencoded; charset=UTF-8
RegionIdstring

The region where the API is located.

cn-beijing
OnlyBusinessPathboolean

The backend only receives the service path.

false
FunctionNamestring

The function name defined in Function Compute.

domain_business_control
ContentTypeCatagorystring

The ContentType header type used when you call the backend service over HTTP.

  • DEFAULT: the default header type in API Gateway.
  • CUSTOM: a custom header type.
  • **CLIENT: the ContentType header type of the client.
DEFAULT
Pathstring

The API request path.

/api/offline/cacheData
ServiceNamestring

The service name defined in Function Compute.

fcservicename
Qualifierstring

The alias of the function.

2
OpenIdConnectConfigobject

The configuration items of the third-party OpenID Connect authentication method.

OpenIdApiTypestring

The configuration of OpenID Connect authentication. Valid values:

  • IDTOKEN: indicates the APIs that are called by clients to obtain tokens. If you specify this value, the PublicKeyId parameter and the PublicKey parameter are required.
  • **BUSINESS: indicates business APIs. Tokens are used to call the business APIs. If you specify this value, the IdTokenParamName parameter is required.
IDTOKEN
IdTokenParamNamestring

The name of the parameter that corresponds to the token.

xxx
PublicKeyIdstring

The ID of the public key.

88483727556929326703309904351185815489
PublicKeystring

The public key of the API.

EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92
ErrorCodeSamplesobject []

The sample error codes returned by the backend service.

For more information, see ErrorCodeSample .

Codestring

The error code.

Error
Messagestring

The error message.

error message
Descriptionstring

The description.

Description
ResultDescriptionsobject []

The return description of the API.

Typestring

The type of the result.

String
Keystring

The primary key of the result.

DEMO
HasChildboolean

Specifies whether a subnode exists.

false
Descriptionstring

The description.

result description
Pidstring

The ID of the parent node.

pid
Mandatoryboolean

Specifies whether the parameter is required.

true
Namestring

The name of the result.

fwqf
Idstring

The ID of the result.

id
SystemParametersobject []

System parameters

DemoValuestring

Examples

192.168.1.1
Descriptionstring

The description.

QueryParamDTO
ParameterNamestring

The name of the system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, and CaProxy.

CaClientIp
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the corresponding backend parameter.

clientIp
CustomSystemParametersobject []

The custom system parameters.

DemoValuestring

Example

192.168.1.1
Descriptionstring

The description.

123
ParameterNamestring

The name of the custom system parameter.

appid
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the corresponding backend parameter.

clientIp
ConstantParametersobject []

The constant parameters.

Descriptionstring

The description.

123
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the backend service parameter.

constance
ConstantValuestring

The constant value.

constance
RequestParametersobject []

The parameters of API requests sent by the consumer to API Gateway.

For more information, see RequestParameter .

JsonSchemestring

JSON scheme

{}
MaxValuelong

The maximum parameter value when ParameterType is set to Int, Long, Float, or Double.

123456
ArrayItemsTypestring

The type of the array element.

String
MinValuelong

The minimum parameter value when ParameterType is set to Int, Long, Float, or Double.

123456
DocShowstring

Specifies whether the document is public. Valid values: PUBLIC and PRIVATE.

PUBLIC
MaxLengthlong

The maximum parameter length when ParameterType is set to String.

123456
DefaultValuestring

The default value.

20
ApiParameterNamestring

The name of the API parameter.

age
EnumValuestring

The hash values that can be entered when ParameterType is set to Int, Long, Float, Double, or String. Separate different values with commas (,), such as 1,2,3,4,9 or A,B,C,E,F.

boy,girl
DemoValuestring

Example

20
Requiredstring

Indicates whether the parameter is required. Valid values: REQUIRED and OPTIONAL.

OPTIONAL
Descriptionstring

Description

parameter description
ParameterTypestring

The type of a request parameter. Valid values: String, Int, Long, Float, Double, and Boolean.

String
RegularExpressionstring

The regular expression used for parameter validation when ParameterType is set to String.

xxx
MinLengthlong

The minimum parameter length when ParameterType is set to String.

123456
DocOrderinteger

The order in the document.

0
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParametersobject []

The parameters of API requests sent by API Gateway to the backend service.

For more information, see ServiceParameter .

Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ParameterTypestring

The data type of the back-end service parameter.

String
ServiceParameterNamestring

The name of the backend service parameter.

clientIp
ServiceParametersMapobject []

The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.

For more information, see ServiceParameterMap .

RequestParameterNamestring

The name of the front-end input parameter.

sex
ServiceParameterNamestring

The name of the backend service parameter.

sex

Examples

Sample success responses

JSONformat

{
  "ApiId": "4eed13a57d4e42fbb51316be8a5329ff",
  "ResultType": "HTML",
  "DisableInternet": true,
  "ResultBodyModel": "{}",
  "ResultSample": "{code: 200, message:'success', data: ''}",
  "AllowSignatureMethod": "HmacSHA256",
  "RegionId": "cn-beijing",
  "ForceNonceCheck": true,
  "Visibility": "PUBLIC",
  "FailResultSample": "{\"errorCode\":\"fail\",\"errorMessage\":\"param invalid\"}",
  "AuthType": "APP",
  "RequestId": "EF924FE4-2EDD-4CD3-89EC-34E4708574E7",
  "Description": "Api description",
  "GroupName": "Weather",
  "GroupId": "bc77f5b49c974437a9912ea3755cd834",
  "DeployedTime": "2022-07-25T17:47:51Z",
  "StageName": "RELEASE",
  "ApiName": "weather",
  "RequestConfig": {
    "BodyModel": "https://apigateway.aliyun.com/models/3a240a127dccXXXXXXXX947b4095/9e2df550e85b4121a79XXXXXxaab",
    "RequestPath": "/api/billing/test/[type]",
    "RequestHttpMethod": "POST",
    "BodyFormat": "STREAM",
    "RequestMode": "MAPPING",
    "PostBodyDescription": "fwefwef",
    "RequestProtocol": "HTTP"
  },
  "ServiceConfig": {
    "VpcId": "vpc-uf6kg9x8sx2tbxxxx",
    "MockStatusCode": 200,
    "ServicePath": "/object/add",
    "Mock": "TRUE",
    "ServiceAddress": "http://api.a.com:8080",
    "ServiceVpcEnable": "TRUE",
    "MockResult": "test result",
    "ServiceHttpMethod": "POST",
    "ServiceProtocol": "HTTP",
    "ServiceTimeout": 1000,
    "MockHeaders": {
      "MockHeader": [
        {
          "HeaderValue": "86400",
          "HeaderName": "Content-Type"
        }
      ]
    },
    "VpcConfig": {
      "VpcId": "vpc-2zeafsc3fygk1***",
      "InstanceId": "i-bp1h497hkijewv2***",
      "Port": 8080,
      "Name": "glmall-app-test"
    },
    "FunctionComputeConfig": {
      "FcType": "HttpTrigger",
      "RoleArn": "acs:ram::111***:role/aliyunserviceroleforsas",
      "Method": "GET",
      "FcBaseUrl": "https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/",
      "ContentTypeValue": "application/x-www-form-urlencoded; charset=UTF-8\n",
      "RegionId": "cn-beijing",
      "OnlyBusinessPath": false,
      "FunctionName": "domain_business_control",
      "ContentTypeCatagory": "DEFAULT",
      "Path": "/api/offline/cacheData",
      "ServiceName": "fcservicename",
      "Qualifier": "2"
    }
  },
  "OpenIdConnectConfig": {
    "OpenIdApiType": "IDTOKEN",
    "IdTokenParamName": "xxx",
    "PublicKeyId": "88483727556929326703309904351185815489",
    "PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
  },
  "ErrorCodeSamples": {
    "ErrorCodeSample": [
      {
        "Code": "Error",
        "Message": "error message",
        "Description": "Description\n"
      }
    ]
  },
  "ResultDescriptions": {
    "ResultDescription": [
      {
        "Type": "String",
        "Key": "DEMO",
        "HasChild": false,
        "Description": "result description",
        "Pid": "pid",
        "Mandatory": true,
        "Name": "fwqf",
        "Id": "id"
      }
    ]
  },
  "SystemParameters": {
    "SystemParameter": [
      {
        "DemoValue": "192.168.1.1",
        "Description": "QueryParamDTO",
        "ParameterName": "CaClientIp",
        "Location": "HEAD",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "CustomSystemParameters": {
    "CustomSystemParameter": [
      {
        "DemoValue": "192.168.1.1",
        "Description": "123",
        "ParameterName": "appid",
        "Location": "HEAD",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "ConstantParameters": {
    "ConstantParameter": [
      {
        "Description": "123",
        "Location": "HEAD",
        "ServiceParameterName": "constance",
        "ConstantValue": "constance"
      }
    ]
  },
  "RequestParameters": {
    "RequestParameter": [
      {
        "JsonScheme": "{}",
        "MaxValue": 123456,
        "ArrayItemsType": "String",
        "MinValue": 123456,
        "DocShow": "PUBLIC",
        "MaxLength": 123456,
        "DefaultValue": "20",
        "ApiParameterName": "age",
        "EnumValue": "boy,girl",
        "DemoValue": "20",
        "Required": "OPTIONAL",
        "Description": "parameter description",
        "ParameterType": "String",
        "RegularExpression": "xxx",
        "MinLength": 123456,
        "DocOrder": 0,
        "Location": "HEAD"
      }
    ]
  },
  "ServiceParameters": {
    "ServiceParameter": [
      {
        "Location": "HEAD",
        "ParameterType": "String",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "ServiceParametersMap": {
    "ServiceParameterMap": [
      {
        "RequestParameterName": "sex",
        "ServiceParameterName": "sex"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history