Amazon API Gateway REST API Reference

restapi:deployments

Gets an API's Deployments resource.

HTTP Request

GET /restapis/<restapi_id>/deployments{?limit}

Template Variable

Response

Deployments

Remarks

Logically, Deployments is the container of all the deployments of a given API.

Example: Get the deployments of an API

Request

The following example retrieves the first two deployments of an API.

GET /restapis/fugvjdxtri/deployments?limit=2 HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20160606T222635Z
Authorization: AWS4-HMAC-SHA256 Credential={secrete_key}/20160606/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
Response

The successful response returns 200 OK status and a payload as follows:

{
  "_links": {
    "curies": {
      "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-deployment-{rel}.html&quot;,
      "name": "deployment",
      "templated": true
    },
    "self": {
      "href": "/restapis/fugvjdxtri/deployments?limit=2"
    },
    "deployment:by-id": {
      "href": "/restapis/fugvjdxtri/deployments/{deployment_id}{?embed}",
      "templated": true
    },
    "deployment:create": {
      "href": "/restapis/fugvjdxtri/deployments"
    },
    "item": [
      {
        "href": "/restapis/fugvjdxtri/deployments/4vvti6"
      },
      {
        "href": "/restapis/fugvjdxtri/deployments/a9kdln"
      }
    ],
    "next": {
      "href": "/restapis/fugvjdxtri/deployments?position=aWQ9U2E5a2Rsbg%3D%3D&limit=2"
    }
  },
  "_embedded": {
    "item": [
      {
        "_links": {
          "self": {
            "href": "/restapis/fugvjdxtri/deployments/4vvti6"
          },
          "deployment:delete": {
            "href": "/restapis/fugvjdxtri/deployments/4vvti6"
          },
          "deployment:stages": {
            "href": "/restapis/fugvjdxtri/stages?deployment_id=4vvti6"
          },
          "deployment:update": {
            "href": "/restapis/fugvjdxtri/deployments/4vvti6"
          }
        },
        "createdDate": "2016-06-06T17:42:37Z",
        "id": "4vvti6"
      },
      {
        "_links": {
          "self": {
            "href": "/restapis/fugvjdxtri/deployments/a9kdln"
          },
          "deployment:delete": {
            "href": "/restapis/fugvjdxtri/deployments/a9kdln"
          },
          "deployment:stages": {
            "href": "/restapis/fugvjdxtri/stages?deployment_id=a9kdln"
          },
          "deployment:update": {
            "href": "/restapis/fugvjdxtri/deployments/a9kdln"
          }
        },
        "createdDate": "2016-06-06T22:18:22Z",
        "description": "stage2 deploy2",
        "id": "a9kdln"
      }
    ]
  }
}

The embedded and linked item properties show the available deployments of the API. The properties of the returned Deployments resource reflect the latest deployment.

See Also

AWS CLI