SSH Certificate Authorities
Create SSH Certificate Authority
Create a new SSH Certificate Authority
Request
POST /ssh_certificate_authorities
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"description":"Staging Environment Hosts","private_key_type":"ed25519"}' \
https://api.ngrok.com/ssh_certificate_authorities
Parameters
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
private_key_type | string | the type of private key to generate. one of rsa , ecdsa , ed25519 |
elliptic_curve | string | the type of elliptic curve to use when creating an ECDSA key |
key_size | int64 | the key size to use when creating an RSA key. one of 2048 or 4096 |
Response
Returns a 201 response on success
Example Response
{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}
Fields
id | string | unique identifier for this SSH Certificate Authority |
uri | string | URI of the SSH Certificate Authority API resource |
created_at | string | timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format |
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
public_key | string | raw public key for this SSH Certificate Authority |
key_type | string | the type of private key for this SSH Certificate Authority |
Delete SSH Certificate Authority
Delete an SSH Certificate Authority
Request
DELETE /ssh_certificate_authorities/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e
Response
Returns a 204 response with no body on success
Get SSH Certificate Authority
Get detailed information about an SSH Certficate Authority
Request
GET /ssh_certificate_authorities/{id}
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e
Response
Returns a 200 response on success
Example Response
{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}
Fields
id | string | unique identifier for this SSH Certificate Authority |
uri | string | URI of the SSH Certificate Authority API resource |
created_at | string | timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format |
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
public_key | string | raw public key for this SSH Certificate Authority |
key_type | string | the type of private key for this SSH Certificate Authority |
List SSH Certificate Authorities
List all SSH Certificate Authorities on this account
Request
GET /ssh_certificate_authorities
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities
Response
Returns a 200 response on success
Example Response
{
"ssh_certificate_authorities": [
{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}
],
"uri": "https://api.ngrok.com/ssh_certificate_authorities",
"next_page_uri": null
}
Fields
ssh_certificate_authorities | SSHCertificateAuthority | the list of all certificate authorities on this account |
uri | string | URI of the certificates authorities list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
SSHCertificateAuthority fields
id | string | unique identifier for this SSH Certificate Authority |
uri | string | URI of the SSH Certificate Authority API resource |
created_at | string | timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format |
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
public_key | string | raw public key for this SSH Certificate Authority |
key_type | string | the type of private key for this SSH Certificate Authority |
Update SSH Certificate Authority
Update an SSH Certificate Authority
Request
PATCH /ssh_certificate_authorities/{id}
Example Request
curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"region\": \"us-east-1\"}"}' \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e
Parameters
id | string | |
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
Response
Returns a 200 response on success
Example Response
{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}
Fields
id | string | unique identifier for this SSH Certificate Authority |
uri | string | URI of the SSH Certificate Authority API resource |
created_at | string | timestamp when the SSH Certificate Authority API resource was created, RFC 3339 format |
description | string | human-readable description of this SSH Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes. |
public_key | string | raw public key for this SSH Certificate Authority |
key_type | string | the type of private key for this SSH Certificate Authority |