Amazon API Gateway REST API Reference

clientcertificate:generate

Generates a new ClientCertificate resource.

HTTP Request

POST /clientcertificates

Request Body

{
  "description" : "String"
}

Request Body Fields

The request accepts the following fields in JSON format.

Response

ClientCertificate

Remarks

Example: Generate a client-side certificate for authentication of API Gateway

Request

POST /clientcertificates HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20160615T223313Z
Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160615/us-east-1/apigateway/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature={sig4_hash}

{
    "description": "my-second-client-cert"
}
Response

The successful response returns a 201 Created status code and a payload similar to the following:

{
  "_links": {
    "curies": {
      "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-clientcertificate-{rel}.html",
      "name": "clientcertificate",
      "templated": true
    },
    "self": {
      "href": "/clientcertificates/9ao60f"
    },
    "clientcertificate:delete": {
      "href": "/clientcertificates/9ao60f"
    },
    "clientcertificate:update": {
      "href": "/clientcertificates/9ao60f"
    }
  },
  "clientCertificateId": "9ao60f",
  "createdDate": "2016-06-15T22:33:13Z",
  "description": "my-second-client-cert",
  "expirationDate": "2017-06-15T22:33:13Z",
  "pemEncodedCertificate": "-----BEGIN CERTIFICATE-----\r\nMIIC6T...2yQAGEHvs=\r\n-----END CERTIFICATE-----"
}

For brevity, the pemEncodedCertificate property value is abbreviated.

See Also

AWS CLI, Use a client-side certificate to get API Gateway authenticated