GetResources - Amazon API Gateway


Lists information about a collection of Resource resources.

Request Syntax

GET /restapis/restapi_id/resources?embed=embed&limit=limit&position=position HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


A query parameter used to retrieve the specified resources embedded in the returned Resources resource in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the "methods" string. For example, GET /restapis/{restapi_id}/resources?embed=methods.


The maximum number of returned results per page. The default value is 25 and the maximum value is 500.


The current pagination position in the paged result set.


The string identifier of the associated RestApi.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "item": [ { "id": "string", "parentId": "string", "path": "string", "pathPart": "string", "resourceMethods": { "string" : { "apiKeyRequired": boolean, "authorizationScopes": [ "string" ], "authorizationType": "string", "authorizerId": "string", "httpMethod": "string", "methodIntegration": { "cacheKeyParameters": [ "string" ], "cacheNamespace": "string", "connectionId": "string", "connectionType": "string", "contentHandling": "string", "credentials": "string", "httpMethod": "string", "integrationResponses": { "string" : { "contentHandling": "string", "responseParameters": { "string" : "string" }, "responseTemplates": { "string" : "string" }, "selectionPattern": "string", "statusCode": "string" } }, "passthroughBehavior": "string", "requestParameters": { "string" : "string" }, "requestTemplates": { "string" : "string" }, "timeoutInMillis": number, "tlsConfig": { "insecureSkipVerification": boolean }, "type": "string", "uri": "string" }, "methodResponses": { "string" : { "responseModels": { "string" : "string" }, "responseParameters": { "string" : boolean }, "statusCode": "string" } }, "operationName": "string", "requestModels": { "string" : "string" }, "requestParameters": { "string" : boolean }, "requestValidatorId": "string" } } } ], "position": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The current page of elements from this collection.

Type: Array of Resource objects


The current pagination position in the paged result set.

Type: String


For information about the errors that are common to all actions, see Common Errors.


The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

HTTP Status Code: 400


The requested resource is not found. Make sure that the request URI is correct.

HTTP Status Code: 404


The request has reached its throttling limit. Retry after the specified time period.

HTTP Status Code: 429


The request is denied because the caller has insufficient permissions.

HTTP Status Code: 401


Get an API resource collection

This example illustrates one usage of GetResources.

Sample Request

GET /restapis/fugvjdxtri/resources HTTP/1.1 Content-Type: application/json Host: X-Amz-Date: 20160602T173305Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160602/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} Response

Sample Response

{ "_links": { "curies": [ { "href": "{rel}.html", "name": "method", "templated": true }, { "href": "{rel}.html", "name": "resource", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources" }, "item": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2" }, "resource:by-id": { "href": "/restapis/fugvjdxtri/resources/{resource_id}{?embed}", "templated": true }, "resource:create": { "href": "/restapis/fugvjdxtri/resources/{parent_id}", "templated": true } }, "_embedded": { "item": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2" }, "method:by-http-method": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/{http_method}", "templated": true }, "method:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/{http_method}", "templated": true }, "resource:create-child": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2" }, "resource:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2" } }, "id": "3kzxbg5sa2", "path": "/" } } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: