Hello!
I have a question regarding the API. I read the documentation, several threads on this forum, searched the web for request examples, but they do not work properly.
GET requests work fine, but the problem occurs as soon as I want to send JSON.
Can you tell me what I'm doing wrong or show me any working example of code in any language? Here is an example of a request that does not work:
$curl -X POST \
--header 'Content-Type: application/json' \
--user $USER:$PASS \
--insecure \
--data-raw '{"vlan":{"descr":"B","if":"ixl2","pcp":"0","proto":"","vlanif":"ixl2_vlan2","tag":"2"}}' \
"https://192.168.4.189/api/interfaces/vlan_settings/addItem"
Output is:
{"result":"failed"}
I looked in the browser at how the interface executes API requests. So, I can't see a difference.
I'm really sorry. Updating to version 24.7.3 solved the problem