Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
[Solved] acmeclient api json
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] acmeclient api json (Read 1919 times)
jfqd
Newbie
Posts: 5
Karma: 2
[Solved] acmeclient api json
«
on:
November 06, 2019, 06:25:02 pm »
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"
}
}'
«
Last Edit: November 06, 2019, 06:56:08 pm by jfqd
»
Logged
jfqd
Newbie
Posts: 5
Karma: 2
Re: acmeclient api json
«
Reply #1 on:
November 06, 2019, 06:55:37 pm »
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"
}
}'
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
[Solved] acmeclient api json