Issue with 2.5.1 and API Jobs Post

Unimus support forum
Post Reply
aykay
Posts: 4
Joined: Tue Apr 30, 2024 2:29 pm

Mon Oct 21, 2024 5:10 pm

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.
erik.k
Posts: 29
Joined: Wed Feb 07, 2024 8:16 am

Thu Oct 24, 2024 7:17 am

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.
Post Reply