Amazon API Gateway REST API Reference

apigateway:domain-names

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

HTTP Request

GET /domainnames{?limit}

Template Variable

Response

DomainNames

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 request retrieves up to 10 custom DomainName resources for APIs under the caller's AWS account.

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

A successful response returns the requested custom DomainName resources 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-basepathmapping-{rel}.html",
        "name": "basepathmapping",
        "templated": true
      },
      {
        "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-domainname-{rel}.html",
        "name": "domainname",
        "templated": true
      }
    ],
    "self": {
      "href": "/domainnames?limit=10"
    },
    "domainname:by-name": {
      "href": "/domainnames/{domain_name}",
      "templated": true
    },
    "domainname:create": {
      "href": "/domainnames"
    },
    "item": {
      "href": "/domainnames/a.b.c.com"
    }
  },
  "_embedded": {
    "item": {
      "_links": {
        "self": {
          "href": "/domainnames/a.b.c.com"
        },
        "basepathmapping:by-base-path": {
          "href": "/domainnames/a.b.c.com/basepathmappings/{base_path}",
          "templated": true
        },
        "basepathmapping:create": {
          "href": "/domainnames/a.b.c.com/basepathmappings"
        },
        "domainname:basepathmappings": {
          "href": "/domainnames/a.b.c.com/basepathmappings{?limit}",
          "templated": true
        },
        "domainname:delete": {
          "href": "/domainnames/a.b.c.com"
        },
        "domainname:update": {
          "href": "/domainnames/a.b.c.com"
        }
      },
      "certificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/abcdef",
      "certificateUploadDate": "2016-04-18T22:16:04Z",
      "distributionDomainName": "d3ih7ecqtec0mt.cloudfront.net",
      "domainName": "a.b.c.com"
    }
  }
}

In this example the caller has set up only one custom domain name (a.b.c.com') for the APIs.

See Also

Use a Custom Domain Name, AWS CLI