Hi
I’m working with the Atlassian API, and following this tutorial to be able to add a user to a group (Add user to group)
The first step is to search all the users in the Atlassian instance, to get the users accountId
I’ve got a Basic Auth request, which interacts with the Atlassian API OK, but i’m having trouble with the data it returns, and being able to search for a specific user.
The Basic Auth Request looks like this
And then in the output it returns data like this
And finally an example of the data in a Collection is like this
Example of the data is below
"data": [
{
"self": "https://test123.atlassian.net/rest/api/3/user?accountId=783720:62a0e7df-322d-4cbb-b15d-2ff90b17a242",
"accountId": "783720:62a0e7df-322d-4cbb-b15d-2ff90b17a242",
"accountType": "atlassian",
"emailAddress": "john.smith@test123.com",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/bd8d14bab8df72fb471986aa180c568e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRY-1.png",
"24x24": "https://secure.gravatar.com/avatar/bd8d14bab8df72fb471986aa180c568e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRY-1.png",
"16x16": "https://secure.gravatar.com/avatar/bd8d14bab8df72fb471986aa180c568e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRY-1.png",
"32x32": "https://secure.gravatar.com/avatar/bd8d14bab8df72fb471986aa180c568e?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRY-1.png"
},
"displayName": "John Smith",
"active": true,
"locale": "en_US"
},
{
"self": "https://test123.atlassian.net/rest/api/3/user?accountId=a57158:f58131cb-b67d-43c7-b30d-4b58d30bd077",
"accountId": "a57158:f58131cb-b67d-43c7-b30d-4b58d30bd077",
"accountType": "atlassian",
"emailAddress": "frank.barns@test123.com",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/600529a7c8cfef89daa848e6db28ed2d?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAJ-0.png",
"24x24": "https://secure.gravatar.com/avatar/600529a7c8cfef89daa848e6db28ed2d?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAJ-0.png",
"16x16": "https://secure.gravatar.com/avatar/600529a7c8cfef89daa848e6db28ed2d?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAJ-0.png",
"32x32": "https://secure.gravatar.com/avatar/600529a7c8cfef89daa848e6db28ed2d?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAJ-0.png"
},
"displayName": "Frank Barns",
"active": true,
"locale": "en_US"
}
I’ve using an iterator, but it only returns data from the first bundle.
I just need to be able to search by the users emailAddress and return the accountId.
Thanks