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
Name | Type | Description |
---|---|---|
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
{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}
Fields
Name | Type | Description |
---|---|---|
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_2k5okFwpGYjs2O5IRVHTt8DOl2m
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_2k5okFwpGYjs2O5IRVHTt8DOl2m
Response
Returns a 200 response on success
Example Response
{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}
Fields
Name | Type | Description |
---|---|---|
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
{
"next_page_uri": null,
"ssh_certificate_authorities": [
{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}
],
"uri": "https://api.ngrok.com/ssh_certificate_authorities"
}
Fields
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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_2k5okFwpGYjs2O5IRVHTt8DOl2m
Parameters
Name | Type | Description |
---|---|---|
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
{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}
Fields
Name | Type | Description |
---|---|---|
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 |