edit-icon download-icon

DescribeDeployedApi

Last Updated: Dec 18, 2017

Description

For querying the running definition of a specified API in a specified stage. The definition refers to the one taking effect in the specified stage, and may be different from the definition being edited.

  • This function is intended for API activators.
  • The interface is used to query a specified API’s definition that is already released to a specified stage. The definition is running in the stage and may be different from the definition being modified. Only when the modified definition is released to the stage can the modified definition overwrite the definition of the API that is running in the stage.

Request parameters

Name Type Required? Description
Action String Yes Operation interface, which is a required parameter; value: DescribeDeployedApi
GroupId String Yes ID of the specified group
ApiId String Yes ID of the specified API
StageName String Yes Stage name; values:
  • RELEASE: online
  • TEST: test

Return parameters

Name Type Description
RequestId String ID of the current request
RegionId String Region where the API is located
GroupId String API group ID
GroupName String API group name
StageName String Stage name; values:
  • RELEASE: online
  • TEST: test
ApiId String ID of the API
ApiName String API name
Description String API description
Visibility String Visibility; values: PUBLIC and PRIVATE, indicating a public API and a private API respectively
AuthType String Security authentication method; values: app and ANONYMOUS, indicating Alibaba Cloud app and anonymous type respectively.
ResultType String Type returned
ResultSample String Example returned
FailResultSample String Sample of the reply failure returned by the backend service.
DeployedTime String Release time (Greenwich mean time)
ErrorCodeSamples ErrorCodeSample Sample of the error code returned by the backend service. For more information, see ApiAttributesType.md#ErrorCodeSamples.
RequestConfig RequestConfig Returned API front-end definition information, in a format consisting of RequestConfig
ServiceConfig ServiceConfig Returned information on the backend service called through the API, in a format consisting of ServiceConfig
SystemParameters SystemParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of SystemParameter
ConstantParameters ConstantParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of ConstantParameter
RequestParameters RequestParameter Returned front-end input parameter information items in the API, in an array consisting of RequestParameter
ServiceParameters ServiceParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of ServiceParameter
ServiceParametersMap ServiceParameterMap Returned mappings between front-end and back-end parameters in the API, in an array consisting of ServiceParameterMap

Examples

Request example

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeDeployedApi
  2. &GroupId=0009db9c828549768a200320714b8930
  3. &ApiId=3b81fd160f5645e097cc8855d75a1cf6
  4. &StageName=RELEASE
  5. &<Public request parameters>

Example returned

XML format

  1. <DescribeDeployedApiResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ004</RequestId>
  3. <RegionId>cn-qingdao</RegionId>
  4. <GroupId>0009db9c828549768a200320714b8930</GroupId>
  5. <GroupName>myGroup2</GroupName>
  6. <StageName>RELEASE</StageName>
  7. <ApiId>3b81fd160f5645e097cc8855d75a1cf6</ApiId>
  8. <ApiName>creatobject</ApiName>
  9. <Description> Object creation</Description>
  10. <Visibility>public</Visibility>
  11. <AuthType>APP</AuthType>
  12. <ResultType>application/json</ResultType>
  13. <ResultSample></ResultSample>
  14. <FailResultSample></FailResultSample>
  15. <DeployedTime>2016-07-23T08:28:48Z</DeployedTime>
  16. <RequestConfig>
  17. <RequestProtocol>HTTP</RequestProtocol>
  18. <RequestHttpMethod>GET</RequestHttpMethod>
  19. <RequestPath>/mypath/creatobject</RequestPath>
  20. <BodyFormat>FORM</BodyFormat>
  21. <PostBodyDescription> Object</PostBodyDescription>
  22. </RequestConfig>
  23. <ServiceConfig>
  24. <ServiceProtocol>HTTP/HTTPS</ServiceProtocol>
  25. <ServiceAddress>http://api.a.com:8080</ServiceAddress>
  26. <ServiceHttpMethod>GET</ServiceHttpMethod>
  27. <ServicePath>/object/add</ServicePath>
  28. <ServiceTimeout>2000</ServiceTimeout>
  29. </ServiceConfig>
  30. <SystemParameters>
  31. <SystemParameter>
  32. <ParameterName>CaRequestId</ParameterName>
  33. <ServiceParameterName>RequestId</ServiceParameterName>
  34. <Location>HEAD</Location>
  35. <DemoValue>0A964636-F7A3-4F1A-92D7-135584A6397F</DemoValue>
  36. <Description> Request ID</Description>
  37. </SystemParameter>
  38. <SystemParameter>
  39. <ParameterName>CaAppId</ParameterName>
  40. <ServiceParameterName>AppId</ServiceParameterName>
  41. <Location>QUERY</Location>
  42. <DemoValue>0A964636-F7A3-4F1A-92D7-135584A6398F</DemoValue>
  43. <Description> Requester application ID</Description>
  44. </SystemParameter>
  45. </SystemParameters>
  46. <ConstantParameters>
  47. <ConstantParameter>
  48. <ServiceParameterName>ConstantKey1</ServiceParameterName>
  49. <ConstantValue>helloworld</ConstantValue>
  50. <Location>QUERY</Location>
  51. <Description>Desc</Description>
  52. </ConstantParameter>
  53. </ConstantParameters>
  54. <RequestParameters>
  55. <RequestParameter>
  56. <ApiParameterName>RequestKey1</ApiParameterName>
  57. <Location>QUERY</Location>
  58. <ParameterType>String</ParameterType>
  59. <Required>REQUIRED</Required>
  60. <DefaultValue></DefaultValue>
  61. <DemoValue>demo1</DemoValue>
  62. <MaxValue></MaxValue>
  63. <MinValue></MinValue>
  64. <MaxLength>100</MaxLength>
  65. <MinLength>3</MinLength>
  66. <RegularExpression></RegularExpression>
  67. <JsonScheme></JsonScheme>
  68. <EnumValue></EnumValue>
  69. <DocShow>PUBLIC</DocShow>
  70. <DocOrder>1</DocOrder>
  71. <Description>Desc1</Description>
  72. </RequestParameter>
  73. <RequestParameter>
  74. <ApiParameterName>RequestKey2</ApiParameterName>
  75. <Location>QUERY</Location>
  76. <ParameterType>Number</ParameterType>
  77. <Required>OPTIONAL</Required>
  78. <DefaultValue></DefaultValue>
  79. <DemoValue>12</DemoValue>
  80. <MaxValue>120</MaxValue>
  81. <MinValue>100</MinValue>
  82. <MaxLength></MaxLength>
  83. <MinLength></MinLength>
  84. <RegularExpression></RegularExpression>
  85. <JsonScheme></JsonScheme>
  86. <EnumValue></EnumValue>
  87. <DocShow>PUBLIC</DocShow>
  88. <DocOrder>2</DocOrder>
  89. <Description>Desc2</Description>
  90. </RequestParameter>
  91. </RequestParameters>
  92. <ServiceParameters>
  93. <ServiceParameter>
  94. <ServiceParameterName>ServiceKey1</ServiceParameterName>
  95. <Location>QUERY</Location>
  96. <ParameterType>String</ParameterType>
  97. </ServiceParameter>
  98. <ServiceParameter>
  99. <ServiceParameterName>ServiceKey2</ServiceParameterName>
  100. <Location>QUERY</Location>
  101. <ParameterType>Number</ParameterType>
  102. </ServiceParameter>
  103. </ServiceParameters>
  104. <ServiceParametersMap>
  105. <ServiceParameterMap>
  106. <ServiceParameterName>RequestKey1</ServiceParameterName>
  107. <RequestParameterName>ServiceKey1</RequestParameterName>
  108. </ServiceParameterMap>
  109. <ServiceParameterMap>
  110. <ServiceParameterName>RequestKey2</ServiceParameterName>
  111. <RequestParameterName>ServiceKey2</RequestParameterName>
  112. </ServiceParameterMap>
  113. </ServiceParametersMap>
  114. <ErrorCodeSamples>
  115. <ErrorCodeSample>
  116. <Code>400</Code>
  117. <Message>Missing the parameter UserId</Message>
  118. <Description> Request where the parameter UserId is missing</Description>
  119. </ErrorCodeSample>
  120. </ErrorCodeSamples>
  121. </DescribeDeployedApiResponse>

JSON format

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ004",
  3. "RegionId": "cn-qingdao",
  4. "GroupId": "0009db9c828549768a200320714b8930",
  5. "GroupName": "myGroup2",
  6. "StageName": "RELEASE",
  7. "ApiId": "3b81fd160f5645e097cc8855d75a1cf6",
  8. "ApiName": "creatobject",
  9. "Description": " Object creation",
  10. "Visibility": "public",
  11. "AuthType": "APP",
  12. "ResultType": "application/json",
  13. "DeployedTime": "2016-07-23T08:28:48Z",
  14. "RequestConfig": {
  15. "RequestProtocol": "HTTP",
  16. "RequestHttpMethod": "GET",
  17. "RequestPath": "/mypath/creatobject",
  18. "BodyFormat": "FORM",
  19. "PostBodyDescription": " Object"
  20. },
  21. "ServiceConfig": {
  22. "ServiceProtocol": "HTTP/HTTPS",
  23. "ServiceAddress": "http://api.a.com:8080",
  24. "ServiceHttpMethod": "GET",
  25. "ServicePath": "/object/add",
  26. "ServiceTimeout": "2000"
  27. },
  28. "SystemParameters": {
  29. "SystemParameter": [
  30. {
  31. "ParameterName": "CaRequestId",
  32. "ServiceParameterName": "RequestId",
  33. "Location": "HEAD",
  34. "DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6397F",
  35. "Description": " Request ID"
  36. },
  37. {
  38. "ParameterName": "CaAppId",
  39. "ServiceParameterName": "AppId",
  40. "Location": "QUERY",
  41. "DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6398F",
  42. "Description": " Requester application ID"
  43. }
  44. ]
  45. },
  46. "ConstantParameters": {
  47. "ConstantParameter": {
  48. "ServiceParameterName": "ConstantKey1",
  49. "ConstantValue": "helloworld",
  50. "Location": "QUERY",
  51. "Description": "Desc"
  52. }
  53. },
  54. "RequestParameters": {
  55. "RequestParameter": [
  56. {
  57. "ApiParameterName": "RequestKey1",
  58. "Location": "QUERY",
  59. "ParameterType": "String",
  60. "Required": "REQUIRED",
  61. "DemoValue": "demo1",
  62. "MaxLength": "100",
  63. "MinLength": "3",
  64. "DocShow": "PUBLIC",
  65. "DocOrder": "1",
  66. "Description": "Desc1"
  67. },
  68. {
  69. "ApiParameterName": "RequestKey2",
  70. "Location": "QUERY",
  71. "ParameterType": "Number",
  72. "Required": "OPTIONAL",
  73. "DemoValue": "12",
  74. "MaxValue": "120",
  75. "MinValue": "100",
  76. "DocShow": "PUBLIC",
  77. "DocOrder": "2",
  78. "Description": "Desc2"
  79. }
  80. ]
  81. },
  82. "ServiceParameters": {
  83. "ServiceParameter": [
  84. {
  85. "ServiceParameterName": "ServiceKey1",
  86. "Location": "QUERY",
  87. "ParameterType": "String"
  88. },
  89. {
  90. "ServiceParameterName": "ServiceKey2",
  91. "Location": "QUERY",
  92. "ParameterType": "Number"
  93. }
  94. ]
  95. },
  96. "ServiceParametersMap": {
  97. "ServiceParameterMap": [
  98. {
  99. "ServiceParameterName": "RequestKey1",
  100. "RequestParameterName": "ServiceKey1"
  101. },
  102. {
  103. "ServiceParameterName": "RequestKey2",
  104. "RequestParameterName": "ServiceKey2"
  105. }
  106. ]
  107. },
  108. "ErrorCodeSamples": {
  109. "ErrorCodeSample": [
  110. {
  111. "Code": "400",
  112. "Message": "Missing the parameter UserId",
  113. "Description": " Request where the parameter UserId is missing"
  114. }
  115. ]
  116. }
  117. }
Thank you! We've received your feedback.