Ask a Question

JSON API not working to update reviewers

SOLVED
EJ256
Occasional Contributor

JSON API not working to update reviewers

Working off the following example, I am getting "Unexpected character (':' (code 58)): was expecting comma to separate Array entries" and it is giving me the reference to the colon character after the user ID. Can someone help? This error is being thrown for an example that is a direct copy and paste from the collaborator documentation.  

 

https://support.smartbear.com/collaborator/docs/custom-integrations/json-api/examples/manage-reviews...

 

EJ256_0-1630767891519.png

 

2 REPLIES 2
EJ256
Occasional Contributor

"reviewID" needs to be declared before assignment. SmartBear, you probably want to update your documentation. I lost about four hours on this. Corrected example below. 

 

[

   {"command" : "SessionService.authenticate",

    "args":{"login":"jsmith","ticket":"0123456789abcdef0123456789abcdef"}},

    {"command" : "ReviewService.updateAssignments",

    "args":{

        "reviewId":"10463",

        "assignments": [

            {"user":"jsmith", "role":"AUTHOR"},

            {"user":"mike", "role":"REVIEWER"},

            {"poolGuid":"1234567890", "role":"OBSERVER"}

        ]}

    }

]

 

Quite right!  Thanks for the feedback.  We'll get the docs fixed.

-----
Joseph
cancel
Showing results for 
Search instead for 
Did you mean: