Amazon API Gateway REST API Reference

ApiGateway

Represents the root of the Amazon API Gateway control service.


Relation Description Method Templated
self

A relation that refers to the current resource.

GET No
apigateway:rest-apis

Gets the RestApis resource representing the collection of RestApi resources for all of your APIs.

This link relation offers the following templated variable(s):

  • limit: Optional.

    The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

GET Yes
apigateway:domain-names

Gets the DomainNames resource representing the collection of DomainName resources as custom domain names for all of your APIs.

This link relation offers the following templated variable(s):

  • limit: Optional.

    The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

GET Yes
apigateway:api-keys

Gets the ApiKeys resource representing the set of ApiKey resources to identify clients for all of your APIs.

This link relation offers the following templated variable(s):

  • includeValues: Optional.

    A boolean flag to specify whether (true) or not (false) the result contains key values.

GET Yes
apigateway:client-certificates

Gets the ClientCertificates resource representing the set of ClientCertificate resources for all of your APIs.

GET No
apigateway:usage-plans

Gets the UsagePlans resource as the collection of UsagePlan resources of the caller's account.

This link relation offers the following templated variable(s):

  • limit: Optional.

    The maximum number of returned results per page.

  • keyId: Optional.

    The identifier of the API key associated with the usage plans.

GET Yes
usageplan:by-id

Gets a UsagePlan resource of a given plan Id.

This link relation offers the following templated variable(s):

  • usageplanId: Required.

    The identifier of the UsagePlan resource to be retrieved.

GET Yes
usageplan:create

Creates a UsagePlan resource representing a usage plan.

POST No
restapi:by-id

Gets the RestApi resources using the specified identifier.

This link relation offers the following templated variable(s):

  • restapi_id: Required.

    The identifier of the RestApi resource.

GET Yes
restapi:create

Creates a new API represented by a RestApi instance in API Gateway.

POST No
restapi:import

Creates an API from an external API definition.

This link relation offers the following templated variable(s):

  • failonwarnings: Optional.

    A query parameter to indicate whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.

POST Yes
domainname:by-name

Gets a DomainName resource using the specified identifier.

This link relation offers the following templated variable(s):

  • domain_name: Required.

    The name of the DomainName resource.

GET Yes
domainname:create

Creates a custom DomainName resource. (from ApiGateway resource)

POST No
apikey:by-key

Gets the ApiKey resource using the specified identifier.

This link relation offers the following templated variable(s):

  • api_Key: Required.

    The identifier of the ApiKey resource.

  • includeValue: Optional.

    A boolean flag to specify whether (true) or not (false) the result contains the key value.

GET Yes
apikey:create

Creates a new ApiKey resource.

POST No
apikey:import

Imports one or more API keys from an external source, such as an CSV-formatted file.

This link relation offers the following templated variable(s):

  • failonwarnings: Optional.

    A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

  • format: Required.

    A query parameter to specify the input format to imported API keys. Currently, only the csv format is supported.

POST Yes
account:update

Changes information about the associated Account resource.

PATCH No


Properties

The ApiGateway resource does not have any properties.

Remarks

The ApiGateway resource is the entry point for you to create, access, and manage your APIs and the associated API keys, client certificates, and custom domain names. To view the available API Gateway resources for your account, submit a GET request against the root resource ("/")"/" as follows.

Error Codes

The following exception may be thrown when the request fails.

  • UnauthorizedException
  • TooManyRequestsException

For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes.

Example: View the settings of an ApiGateway

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

The successful response returns a 200 OK status code and a payload listing the supported link relations prescribing actions that can be performed against specified resources.

{
  "_links": {
    "curies": [
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html",
        "name": "account",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-apigateway-{rel}.html",
        "name": "apigateway",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-apikey-{rel}.html",
        "name": "apikey",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-domainname-{rel}.html",
        "name": "domainname",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-restapi-{rel}.html",
        "name": "restapi",
        "templated": true
      }
    ],
    "self": {
      "href": "/"
    },
    "account:update": {
      "href": "/account"
    },
    "apigateway:api-keys": {
      "href": "/apikeys"
    },
    "apigateway:client-certificates": {
      "href": "/clientcertificates"
    },
    "apigateway:domain-names": {
      "href": "/domainnames"
    },
    "apigateway:rest-apis": {
      "href": "/restapis"
    },
    "apikey:by-key": {
      "href": "/apikeys/{api_Key}",
      "templated": true
    },
    "apikey:create": {
      "href": "/apikeys"
    },
    "domainname:by-name": {
      "href": "/domainnames/{domain_name}",
      "templated": true
    },
    "domainname:create": {
      "href": "/domainnames"
    },
    "restapi:by-id": {
      "href": "/restapis/{restapi_id}",
      "templated": true
    },
    "restapi:create": {
      "href": "/restapis"
    },
    "restapi:import": {
      "href": "/restapis?mode=import&failonwarnings=false"
    }
  }
}

See Also

What Is Amazon API Gateway? AWS CLI