Amazon API Gateway REST API Reference

apigateway:rest-apis

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

HTTP Request

GET /restapis{?limit}

Template Variable

Response

RestApis

Remarks

Error Codes

The following exception may be thrown when the request fails.

  • UnauthorizedException
  • TooManyRequestsException
  • BadRequestException

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

Example

Request

The following example GET request retrieves one API from an account. The limit query string parameter is used to limit the quantity of the returned result. For illustrative purposes, we choose limit=1.

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

A successful response returns an API that can be navigated to by following the linked item or examining the embedded item resource.

{
  "_links": {
    "curies": [
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-authorizer-{rel}.html",
        "name": "authorizer",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-deployment-{rel}.html",
        "name": "deployment",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-model-{rel}.html",
        "name": "model",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-resource-{rel}.html",
        "name": "resource",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-restapi-{rel}.html",
        "name": "restapi",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-stage-{rel}.html",
        "name": "stage",
        "templated": true
      }
    ],
    "self": {
      "href": "/restapis?limit=1"
    },
    "item": {
      "href": "/restapis/0n1anifwvf"
    },
    "next": {
      "href": "/restapis?position=aWQ9UzBuMWFuaWZ3dmY%3D&limit=1"
    },
    "restapi:by-id": {
      "href": "/restapis/{restapi_id}",
      "templated": true
    },
    "restapi:create": {
      "href": "/restapis"
    },
    "restapi:put": {
      "href": "/restapis/{restapi_id}?failonwarnings=false{&mode}",
      "templated": true
    }
  },
  "_embedded": {
    "item": {
      "_links": {
        "self": {
          "href": "/restapis/0n1anifwvf"
        },
        "authorizer:by-id": {
          "href": "/restapis/0n1anifwvf/authorizers/{authorizer_id}",
          "templated": true
        },
        "authorizer:create": {
          "href": "/restapis/0n1anifwvf/authorizers"
        },
        "deployment:by-id": {
          "href": "/restapis/0n1anifwvf/deployments/{deployment_id}{?embed}",
          "templated": true
        },
        "deployment:create": {
          "href": "/restapis/0n1anifwvf/deployments"
        },
        "model:by-name": {
          "href": "/restapis/0n1anifwvf/models/{model_name}?flatten=false",
          "templated": true
        },
        "model:create": {
          "href": "/restapis/0n1anifwvf/models"
        },
        "resource:by-id": {
          "href": "/restapis/0n1anifwvf/resources/{resource_id}{?embed}",
          "templated": true
        },
        "resource:create": {
          "href": "/restapis/0n1anifwvf/resources/ny9qrywoj2"
        },
        "restapi:authorizers": {
          "href": "/restapis/0n1anifwvf/authorizers"
        },
        "restapi:delete": {
          "href": "/restapis/0n1anifwvf"
        },
        "restapi:deployments": {
          "href": "/restapis/0n1anifwvf/deployments{?limit}",
          "templated": true
        },
        "restapi:models": {
          "href": "/restapis/0n1anifwvf/models"
        },
        "restapi:resources": {
          "href": "/restapis/0n1anifwvf/resources{?limit,embed}",
          "templated": true
        },
        "restapi:stages": {
          "href": "/restapis/0n1anifwvf/stages{?deployment_id}",
          "templated": true
        },
        "restapi:update": {
          "href": "/restapis/0n1anifwvf"
        },
        "stage:by-name": {
          "href": "/restapis/0n1anifwvf/stages/{stage_name}",
          "templated": true
        },
        "stage:create": {
          "href": "/restapis/0n1anifwvf/stages"
        }
      },
      "createdDate": "2016-04-05T19:58:27Z",
      "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints",
      "id": "0n1anifwvf",
      "name": "PetStore"
    }
  }
}

The returned API above was created using the API Gateway console Import API feature. For more information, see Learn from Example.

See Also

Getting Started with API Gateway, Creating an API Gateway API, AWS CLI