Is there anywhere documented what the required json is to create a certificate with the acmeclient api?
Tried this, but it is failing:
curl -XPOST -H "Content-Type: application/json" -u "user:pass" \
https://opnsense.example.com/api/acmeclient/certificates/add -d \
'{
"certificate": {
"enabled": "0",
"name": "test.example.com",
"altNames": "test2.example.com",
"description": "test.example.com",
"account": "example account",
"validationMethod": "http-01 validation",
"keyLength": "4096 bit",
"autoRenewal": "1",
"renewInterval": "60"
}
}'
This worked for me, maybe it will help someone in the future:
curl -XPOST -H "Content-Type: application/json" -u "user:pass" \
https://opnsense.example.com/api/acmeclient/certificates/add -d \
'{
"certificate": {
"enabled": "0",
"name": "test.example.com",
"altNames": "test2.example.com",
"description": "test.example.com",
"account": "uuid-of-the-account",
"validationMethod": "uuid-of-the-validation-method",
"keyLength": "key_4096",
"autoRenewal": "1",
"renewInterval": "60"
}
}'