Skip to content

Instantly share code, notes, and snippets.

@jfqd
Created November 6, 2019 19:31
Show Gist options
  • Save jfqd/8c8143b74a8e8d06e6cea83e3edcdcc8 to your computer and use it in GitHub Desktop.
Save jfqd/8c8143b74a8e8d06e6cea83e3edcdcc8 to your computer and use it in GitHub Desktop.
Create a certificate in a OPNsense appliance via the api
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"
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment