API only returning interal server error.

tjorvenbuyse

Cadet
Joined
Jan 15, 2024
Messages
6
I'm using the API to automate some things. But with the weak documentation I can't seem to get any post request right. And the only return I ever get is internal server error. Is there any way to see WHAT went wrong? Like this field is expected or something like that?

curl -X 'POST' \
'http://192.168.32.153/api/v2.0/pool' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer 1-MAKPeh2hHaWvyAO4gS3RME9R0cPJFzUOfU4uko6UcklUbNpKM9pqHZMNioGqxNwY" \
-d '{
"topology": {
"data": [
{"type": "RAIDZ1", "disks": ["sdb", "sdc"]}
],
"cache": [
{"type": "STRIPE", "disks": []}
],
"log": [
{"type": "STRIPE", "disks": []}
],
"spares": []
},
"name": "testpool",
"deduplication": "OFF",
encryption: "OFF",

}'

above an example of a request I'm trying to use to find out how to api works.
 
Top