Amazon API Gateway REST API Reference

basepathmapping:by-path

Gets a BasePathMapping resource by the specified identifier.

HTTP Request

GET /domainnames/<domain_name>/basepathmappings/{base_path}

Template Variable

Response

BasePathMapping

Remarks

To specify an empty base path in the request URL, set the {base_path} path variable to (none).

Example: Get the base path of an API

Request

The following example request retrieves the BasePathMapping resource for the TestApi base path of a given API (fugvjdxtri) deployed in a stage (stage1).

GET /domainnames/a.b.c.com/basepathmappings/TestApi HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20160615T020506Z
Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160615/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 similar to the following:

{
  "_links": {
    "curies": {
      "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-basepathmapping-{rel}.html&quot;,
      "name": "basepathmapping",
      "templated": true
    },
    "self": {
      "href": "/domainnames/a.b.c.com/basepathmappings/TestApi"
    },
    "basepathmapping:create": {
      "href": "/domainnames/a.b.c.com/basepathmappings"
    },
    "basepathmapping:delete": {
      "href": "/domainnames/a.b.c.com/basepathmappings/TestApi"
    },
    "basepathmapping:update": {
      "href": "/domainnames/a.b.c.com/basepathmappings/TestApi"
    }
  },
  "basePath": "TestApi",
  "restApiId": "fugvjdxtri",
  "stage": "stage1"
}

See Also

AWS CLI