Forum Discussion

EJ256's avatar
EJ256
Occasional Contributor
3 years ago
Solved

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.html

 

 

  • "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"}

            ]}

        }

    ]

2 Replies

  • EJ256's avatar
    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"}

            ]}

        }

    ]