Amazon API Gateway REST API Reference

domainname:basepathmappings

Gets the BasePathMappings resource representing the collection of base path mappings for the specified custom domain name.

HTTP Request

GET /domainnames/<domain_name>/basepathmappings{?limit}

Template Variable

Response

BasePathMappings

Remarks

Example: Gets the base path mappings of a custom domain name

Request

GET /domainnames/a.b.c.com/basepathmappings HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20160615T221921Z
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{?limit}",
      "templated": true
    },
    "basepathmapping:by-path": {
      "href": "/domainnames/a.b.c.com/basepathmappings/{base_path}",
      "templated": true
    },
    "basepathmapping:create": {
      "href": "/domainnames/a.b.c.com/basepathmappings"
    },
    "item": [
      {
        "href": "/domainnames/a.b.c.com/basepathmappings/my-service-api"
      },
      {
        "href": "/domainnames/a.b.c.com/basepathmappings/my-sample-api"
      }
    ]
  },
  "_embedded": {
    "item": [
      {
        "_links": {
          "self": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-service-api"
          },
          "basepathmapping:create": {
            "href": "/domainnames/a.b.c.com/basepathmappings"
          },
          "basepathmapping:delete": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-service-api"
          },
          "basepathmapping:update": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-service-api"
          }
        },
        "basePath": "my-service-api",
        "restApiId": "fugvjdxtri",
        "stage": "stage2"
      },
      {
        "_links": {
          "self": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-sample-api"
          },
          "basepathmapping:create": {
            "href": "/domainnames/a.b.c.com/basepathmappings"
          },
          "basepathmapping:delete": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-sample-api"
          },
          "basepathmapping:update": {
            "href": "/domainnames/a.b.c.com/basepathmappings/my-sample-api"
          }
        },
        "basePath": "my-sample-api",
        "restApiId": "fugvjdxtri",
        "stage": "stage1"
      }
    ]
  }
}

In this example, the custom domain name of (a.b.c.com) has a base path (my-sample-api) mapped to an API in the stage1 stage and another base path (my-service-api) mapped to the same API in the stage2 stage. Although not shown here, you could have a base path mapped to a different API in a deployment stage.

See Also

AWS CLI