Hello,
You can use the following to select the "name" attribute at the root of the entity object:
"translationMap": {
"Members": "$.entities[*].name"
}
Regards,
------------------------------
Jerome Saint-Marc
Senior Development Support Engineer
------------------------------
Original Message:
Sent: 04-14-2025 11:24
From: Tristen Schwarzenberger
Subject: Get List of Queue Members
Hello,
I am wanting to generate a list of members of a queue. Here's my output:
{
"type": "object",
"properties": {
"Members": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
And my Response:
{
"translationMap": {
"Members": "$..entities..name"
},
"translationMapDefaults": {
"Members": "[]"
},
"successTemplate": "{\n \"Members\": ${Members}\n}"
}
The issue I'm running into is it's going through every single "name" in the response. For example when running /api/v2/routing/queues/{queueId}/members I get the following response:
"entities": [
{
"id": "id1",
"name": "Name1",
"user": {
"id": "id1",
"name": "Name2",
"division": {
"id": "id",
"name": "Name3",
"selfUri": "/api/v2/authorization/divisions/id"
},
"chat": {
"jabberId": "id@orgspan.com"
}
This will return Name1, Name2, and Name3, but I am just wanting to return Name1. I figure it has something to do with my translation map, I'm just not sure what.
Thank you,
#DataActions
------------------------------
Tristen Schwarzenberger
------------------------------