Certificates
Manage symBalancer certificates.
Certificate List
Type: GET
- https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/certs
List installed certificates. Cert id is a UUID value.
Required URL Parameters:
- SYMBALANCER_ID
Symbalancer ID
curl --request GET \
--url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/certs \
--header "content-type: application/json" \
--header "authorization:bearer $API_TOKEN"
{
"data": [
{
"cert_name": "example.com.crt",
"fingerprint": "B2:FB:36:D5:CF:0E:A9:41:32:DC:B3:3E:44:9C:66:37",
"id": "0a600f35-67ad-4674-b621-5a25a4eda0e1"
},
{
"cert_name": "example-pet-store.com.crt",
"fingerprint": "AF:A9:ED:EA:E1:54:EC:D2:98:13:1E:65:03:0A:DC:A9",
"id": "2d98df50-ca69-4fa1-914a-17450ec7ffc4"
}
]
}
Add Certificate
Type: POST
- https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/certs/add
Add backend server to SYMBALANCER_ID
Required URL Parameters:
- SYMBALANCER_ID
Symbalancer ID to add a certificate to.
Required JSON Properties:
- cert_name
Certificate name. Typically domain name of the cert although it is free-form.
Note
Certificate name must be unique from other certificates on the same balancer.
- certificate
Full plaintext certificate, including the key.
Important
JSON does not allow raw linebreaks, so certificate must be a single long line with printed “\n” escape sequences for newlines. Also, many certificates have DOS style carriage returns (”\r”) which need to be stripped out. The command below might be helpful in converting these files into the single string you need:
cat MY_CERTIFICATE_FILE.pem |sed 's/\r//' |sed 's/$/\\n/' | tr -d '\n'
Example request:
curl --request POST \
--url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/certs/add \
--header "content-type: application/json" \
--header "authorization:bearer $API_TOKEN" \
--data '
{
"cert_name": "example.com",
"cert": "[...full certificate text...]"
}
'
Response: 202 OK
Delete Certificate
Type: DELETE
- https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/certs/delete/{CERT_ID}
Delete a port from a symBalancer.
Required URL Parameters:
- SYMBALANCER_ID
symBalancer ID to add port to.
- CERT_ID
Certificate ID to delete. It is a UUID value as provided by Certificate List.
curl --request DELETE \
--url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/certs/delete/CERT_ID \
--header "content-type: application/json" \
--header "authorization:bearer $API_TOKEN"
Response: 202 OK