Managing Certificates

These public APIs allows to manage your certificates.

Create

POST /api/v1/public/apps/{app_slug}/certificates

Required params

Name

Type

Description

Optional

private_cert

string

Contents of the private key

false

public_cert

string

Contents of the public key

false

name

string

Certificate name

true

Request example

$ curl -n -X POST https://$SUBDOMAIN.neetodeploy.com/api/v1/public/apps/$APP_NAME/certificates \
  -d '{
  "public_cert": "-----BEGIN CERTIFICATE----- ...",
  "private_cert": "-----BEGIN RSA PRIVATE KEY----- ..."
}' \
  -H "Content-Type: application/json" \
  -H "AuthToken: $PUBLIC_API_TOKEN"

Response example

{
"certificate":{ 
  "id":"56224e0f-897a-4b84-84a0-114f0d99c546",
  "name":"beautiful-blue",
  "public_cert":"-----BEGIN CERTIFICATE----- ...",
  "private_cert":"-----BEGIN RSA PRIVATE KEY----- ..."
  }
}

Update

PATCH /api/v1/public/apps/{app_slug}/certificates/{certificate_name}

Required params

Name

Type

Description

Optional

private_cert

string

Contents of the private key

true

public_cert

string

Contents of the public key

true

Request example

$ curl -n -X PATCH https://$SUBDOMAIN.neetodeploy.com/api/v1/public/apps/$APP_NAME/certificates/
$CERTIFICATE_NAME \
  -d '{
  "public_cert": "-----BEGIN UPDATED CERTIFICATE----- ...",
  "private_cert": "-----BEGIN UPDATED RSA PRIVATE KEY----- ..."
}' \
  -H "Content-Type: application/json" \
  -H "AuthToken: $PUBLIC_API_TOKEN"

Response example

{
"certificate":{ 
  "id":"56224e0f-897a-4b84-84a0-114f0d99c546",
  "name":"beautiful-blue",
  "public_cert": "-----BEGIN UPDATED CERTIFICATE----- ...",
  "private_cert": "-----BEGIN UPDATED RSA PRIVATE KEY----- ..."
  }
}

Delete

DELETE /api/v1/public/apps/{app_slug}/certificates/{certificate_name}

Request example

$ curl -n -X DELETE https://$SUBDOMAIN.neetodeploy.com/api/v1/public/apps/$APP_NAME/certificates/
$CERTIFICATE_NAME \

  -H "Content-Type: application/json" \
  -H "AuthToken: $PUBLIC_API_TOKEN"

Response example

{"message":"The certificate was successfully deleted."}

Can't find what you're looking for?