Amazon API Gateway REST API Reference

stage:by-name

Gets information of a named stage represented by a Stage resource.

HTTP Request

GET /restapis/<restapi_id>/stages/{stage_name}

Template Variable

Response

Stage

Remarks

Example: Gets a named stage of an API

Request

The following request gets the prod stage of an API (uycll6xg9a).

GET /restapis/uycll6xg9a/stages/prod HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20170223T194603Z
Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
Response

The successful response returns 200 OK status code and a payload similar to the following:

{
  "_links": {
    "curies": {
      "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-stage-{rel}.html&quot;,
      "name": "stage",
      "templated": true
    },
    "self": {
      "href": "/restapis/uycll6xg9a/stages/prod"
    },
    "stage:delete": {
      "href": "/restapis/uycll6xg9a/stages/prod"
    },
    "stage:flush-authorizer-cache": {
      "href": "/restapis/uycll6xg9a/stages/prod/cache/authorizers"
    },
    "stage:update": {
      "href": "/restapis/uycll6xg9a/stages/prod"
    }
  },
  "cacheClusterEnabled": false,
  "cacheClusterStatus": "NOT_AVAILABLE",
  "createdDate": "2016-04-15T17:53:35Z",
  "deploymentId": "vakw79",
  "lastUpdatedDate": "2016-04-15T18:30:10Z",
  "methodSettings": {},
  "stageName": "prod",
  "variables": {
    "version": "v-prod",
    "url": "petstore-demo-endpoint.execute-api.com/petstore/pets",
    "function": "HelloEveryone"
  }
}

See Also

Deploying an API, AWS CLI