Page 1 of 1

[Fixed in 2.6.0] Issue with 2.5.1 and API Jobs Post

Posted: Mon Oct 21, 2024 5:10 pm
by aykay
I've authorized the api/v3/swagger-ui/ to test with, trying to run /api/v3/jobs/push using the Try It Out! function:

curl:

curl -X 'POST' \
'https://servernamehere/api/v3/jobs/push' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.UsjHT8jUtfOVFYW-YhO3w_hCBrKpmSzXSk8RjilhNn0' \
-H 'Content-Type: application/json' \
-d '{
"commands": "[show version]",
"requireEnableMode": true,
"requireConfigureMode": true,
"deviceUuids": "[D-f3918eae-e52a-400e-a4c4-3b24d9e8c1f3, D-63efb992-869a-4893-b49b-c17be4e17d5b]",
"tagUuids": "[c277fa8-1790-4184-9e3a-c277fa881289]",
"advancedSettings": {
"promptMatchingModeEnum": "LEARNING",
"overrideTimeouts": true,
"timeout": 60000,
"overrideCredentials": true,
"username": "username",
"password": "password",
"enablePassword": "string",
"configurePassword": "string"
}
}'

Response:
Error 400:

{
"errorCode": "INVALID",
"details": [
"Unable to convert JSON to request object, most likely type mismatch"
]
}

I've attempted replacing the deviceUUID fields and tagUUID fields with known good, but always receive the same conversion error.

Any ideas? Would love to start using this feature.

Re: Issue with 2.5.1 and API Jobs Post

Posted: Thu Oct 24, 2024 7:17 am
by erik.k
Hi, thank you for reporting this problem. We checked our APIv3 documentation and found some formatting mistakes for the following endpoints:
  • POST api/v3/jobs/push
  • POST api/v3/zones:untag
  • POST api/v3/zones:tag
The problem has already been resolved, and we plan to release the fix publicly with the upcoming 2.6.0 Beta release, which can be expected sometime at the end of October or the beginning of November.

Re: [Fixed in 2.6.0] Issue with 2.5.1 and API Jobs Post

Posted: Wed Dec 18, 2024 9:14 pm
by Tomas
Just a small update that 2.6.0 is out, and the documentation was fixed.
More info: viewtopic.php?f=3&t=1950