Clarity

 View Only

 REST API - Adding a team member problem

Paul Schofield's profile image
Paul Schofield posted Jul 04, 2023 03:06 AM

Hello everyone.

I'm trying to use the REST API to add a team member.

The body I'm using is {"resourceId" : "1"} but the response is { "resourceId": null, "httpStatus": "400", "errorMessage": "CMN-0007: Attribute 'prresourceid' is required.", "errorCode": "validation.requiredFieldMissing" } in the interective Clarity REST API page. I tried with {"resourceId" : "admin"} but I received the same result.

If I try this in Postman I receive 

{
    "resourceId"null,
    "httpStatus""404",
    "errorMessage""API-1004 : Invalid resource identifier .",
    "errorCode""api.invalidResourceId"
}
It's the same whether I specify ""1 or "admin" for the resource. 
Has anyone managed to add a team member using REST? If so, could they share the body they used?
Many thanks,
Paul
Marc Buigues's profile image
Broadcom Employee Marc Buigues

Hello Paul,

I'm posting this for the benefit of the wider community, as we already discussed this and resolved it over a Support case.

The correct syntax should be {"resource":1} instead of {"resourceId" : "1"}.

Thanks!

Marc