Hello,
I am trying to use the following WEBCON BPS API endpoint to add multiple users to a group:
POST /api/data/v6.0/admin/group/members/add
Example URL:
https://webcondev.webcon.pl/api/data/v6.0/admin/group/members/add?bpsId=BPS_ADD%40webcon.pl
The API expects a request body in this format:
{
"members": [
{
"bpsId": "krystian@webcon.pl"
},
{
"bpsId": "tomek@webcon.pl"
}
]
}
I generate the complete JSON body using an SQL and pass it to the Invoke REST Web Service action.
However, WEBCON treats the SQL result as a string and escapes all quotation marks. The actual request body sent by WEBCON looks like this:
{ \"members\":[{\"bpsId\":\"krystian@webcon.pl\"},{\ "bpsId\":\ "tomek@webcon.pl\"}]}
As a result, the API returns HTTP 400:
Response Code:
BadRequest (400)
Response Body:
{
"type": "InvalidInput",
"description": "Model is not valid. Invalid property identifier character: \\. Path '', line 1, position 2.",
"errorGuid": "c9f2580a-60f1-4a6f-b22f-a440cb8a6349"
}
Do you have any idea how to add multiple users in a single API call?