Chilkat Online Tools

PowerBuilder / Atlassian Confluence Cloud / Get multiple users using ids

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_V_type
string ls_AccountId
string ls_AccountType
string ls_Email
string ls_PublicName
string ls_Path
integer li_Width
integer li_Height
integer li_IsDefault
string ls_DisplayName
string ls_Operations
string ls_Details
string ls_PersonalSpace
string ls_Username
string ls_UserKey
string ls_Value
string ls_PersonalValue
integer li_Id
string ls_Key
string ls_Name
string ls_V_Type
string ls_Status
string ls_Settings
string ls_Metadata
string ls_V_expandableOperations
string ls_LookAndFeel
string ls_Permissions
string ls_Icon
string ls_Description
string ls_Theme
string ls_History
string ls_Homepage
string ls_IconPath
integer li_IconWidth
integer li_IconHeight
integer li_IconIsDefault
string ls_PlainValue
string ls_Representation
string ls_ViewValue
string ls_ViewRepresentation
string ls_HomepageValue
integer li_Start
integer li_Limit
integer li_Size
integer li_RouteOverrideEnabled
string ls_Color
string ls_LinksColor
string ls_HoverOrFocusValue
string ls_ColorValue
string ls_BackgroundColorValue
string ls_ButtonValue
string ls_PrimaryNavigationValue
string ls_SecondaryNavigationValue
string ls_SearchValue
string ls_ScreenValue
string ls_ContainerValue
string ls_HeaderValue
string ls_BodyValue
string ls_BordersAndDividersColor
string ls_CreatedDate
integer j
integer li_Count_j
string ls_Operation
string ls_TargetType
string ls_Value
string ls_V_expandableValue
string ls_UserValue
string ls_GroupValue
string ls_Operation
string ls_TargetType
integer li_AnonymousAccess
integer li_UnlicensedAccess
integer li_Start
integer li_Limit
integer li_Size
integer i
integer li_Count_i

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_QueryParams = create oleobject
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_QueryParams.UpdateString("accountId","<string>")
loo_QueryParams.UpdateString("expand","<string>")
loo_QueryParams.UpdateString("expand","<string>")
loo_QueryParams.UpdateString("limit","<integer>")

// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"

loo_Resp = loo_Http.QuickRequestParams("GET","https://your-domain.atlassian.net/wiki/rest/api/user/bulk",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_QueryParams
    return
end if

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

loo_Resp.GetBodySb(loo_SbResponseBody)

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_QueryParams
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

destroy loo_Resp

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "results": [
//     {
//       "type": "user",
//       "accountId": "elit est ullamco in officia",
//       "accountType": "exercitation fugiat labo",
//       "email": "Excepteur in cillum officia",
//       "publicName": "ullamco occaecat",
//       "profilePicture": {
//         "path": "cupidatat dolore et labore ad",
//         "width": -99848841,
//         "height": 55035562,
//         "isDefault": true
//       },
//       "displayName": "amet",
//       "_expandable": {
//         "operations": "labore ut Duis id culpa",
//         "details": "in irure voluptate Duis magna",
//         "personalSpace": "n"
//       },
//       "_links": {},
//       "username": "est sunt dolor nostrud",
//       "userKey": "labo",
//       "operations": [
//         {
//           "operation": "update",
//           "targetType": "attachment"
//         },
//         {
//           "operation": "administer",
//           "targetType": "attachment"
//         }
//       ],
//       "details": {
//         "business": {
//           "value": "<Error: Too many levels of nesting to fake this schema>"
//         },
//         "personal": {
//           "value": "<Error: Too many levels of nesting to fake this schema>"
//         }
//       },
//       "personalSpace": {
//         "id": -93610124,
//         "key": "in eiusmod",
//         "name": "ut minim Excepteur",
//         "type": "sunt qui amet",
//         "status": "null",
//         "_expandable": {
//           "settings": "pariatur deserunt anim",
//           "metadata": "anim occaecat aliqua",
//           "operations": "aute nostrud in",
//           "lookAndFeel": "est irure aute labore",
//           "permissions": "in cupidatat qui",
//           "icon": "voluptate Duis",
//           "description": "culpa veniam Lorem velit",
//           "theme": "consequat sunt reprehenderit",
//           "history": "ex officia veniam sit do",
//           "homepage": "dolore dolore"
//         },
//         "_links": {},
//         "icon": {
//           "path": "dolore Lorem magna sunt",
//           "width": 3933679,
//           "height": -17426468,
//           "isDefault": false
//         },
//         "description": {
//           "plain": {
//             "value": "consequat consectetur laborum labore occaecat",
//             "representation": "view",
//             "embeddedContent": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ]
//           },
//           "view": {
//             "value": "Duis reprehenderit anim ut",
//             "representation": "view",
//             "embeddedContent": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ]
//           }
//         },
//         "homepage": {
//           "value": "<Circular reference to #/components/schemas/Content detected>"
//         },
//         "metadata": {
//           "labels": {
//             "results": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ],
//             "start": 23981894,
//             "limit": -68365223,
//             "size": -97521792,
//             "_links": {}
//           }
//         },
//         "operations": [
//           {
//             "operation": "administer",
//             "targetType": "blogpost"
//           },
//           {
//             "operation": "delete",
//             "targetType": "blogpost"
//           }
//         ],
//         "permissions": [
//           {
//             "subjects": {
//               "_expandable": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "user": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "group": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             },
//             "operation": {
//               "operation": "read",
//               "targetType": "space"
//             },
//             "anonymousAccess": false,
//             "unlicensedAccess": false
//           },
//           {
//             "subjects": {
//               "_expandable": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "user": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "group": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             },
//             "operation": {
//               "operation": "restore",
//               "targetType": "blogpost"
//             },
//             "anonymousAccess": false,
//             "unlicensedAccess": false
//           }
//         ],
//         "settings": {
//           "routeOverrideEnabled": true,
//           "_links": {}
//         },
//         "theme": {},
//         "lookAndFeel": {
//           "headings": {
//             "color": "<string>"
//           },
//           "links": {
//             "color": "<string>"
//           },
//           "menus": {
//             "hoverOrFocus": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "color": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "header": {
//             "backgroundColor": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "button": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "primaryNavigation": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "secondaryNavigation": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "search": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "content": {
//             "screen": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "container": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "header": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "body": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "bordersAndDividers": {
//             "color": "<string>"
//           }
//         },
//         "history": {
//           "createdDate": "2004-03-14T14:56:20.738Z"
//         }
//       }
//     },
//     {
//       "type": "user",
//       "accountId": "aliquip ex aute occaecat minim",
//       "accountType": "cupidatat dolore",
//       "email": "tempor non",
//       "publicName": "Lorem",
//       "profilePicture": {
//         "path": "fugiat ex sit sunt",
//         "width": 86996840,
//         "height": -45552232,
//         "isDefault": false
//       },
//       "displayName": "eu qui mollit",
//       "_expandable": {
//         "operations": "laborum dolor magna adipisicing",
//         "details": "culpa quis a",
//         "personalSpace": "id in"
//       },
//       "_links": {},
//       "username": "proident minim et ipsum",
//       "userKey": "est conseq",
//       "operations": [
//         {
//           "operation": "copy",
//           "targetType": "comment"
//         },
//         {
//           "operation": "purge_version",
//           "targetType": "application"
//         }
//       ],
//       "details": {
//         "business": {
//           "value": "<Error: Too many levels of nesting to fake this schema>"
//         },
//         "personal": {
//           "value": "<Error: Too many levels of nesting to fake this schema>"
//         }
//       },
//       "personalSpace": {
//         "id": -77236660,
//         "key": "mollit",
//         "name": "mollit reprehenderit",
//         "type": "ipsum eu",
//         "status": "id magna esse",
//         "_expandable": {
//           "settings": "Lorem cupidatat fugiat id",
//           "metadata": "ut non",
//           "operations": "m",
//           "lookAndFeel": "elit ",
//           "permissions": "proident labore",
//           "icon": "ut fugiat esse do",
//           "description": "sunt",
//           "theme": "ea consequat aliqua",
//           "history": "ullamco culpa",
//           "homepage": "eu esse ut amet"
//         },
//         "_links": {},
//         "icon": {
//           "path": "laborum magna Dui",
//           "width": -87940522,
//           "height": -74576861,
//           "isDefault": true
//         },
//         "description": {
//           "plain": {
//             "value": "adipisicing proident magna nulla",
//             "representation": "view",
//             "embeddedContent": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ]
//           },
//           "view": {
//             "value": "quis enim ex adipisicing",
//             "representation": "plain",
//             "embeddedContent": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ]
//           }
//         },
//         "homepage": {
//           "value": "<Circular reference to #/components/schemas/Content detected>"
//         },
//         "metadata": {
//           "labels": {
//             "results": [
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             ],
//             "start": 12150462,
//             "limit": -13231996,
//             "size": -79881326,
//             "_links": {}
//           }
//         },
//         "operations": [
//           {
//             "operation": "create",
//             "targetType": "page"
//           },
//           {
//             "operation": "update",
//             "targetType": "blogpost"
//           }
//         ],
//         "permissions": [
//           {
//             "subjects": {
//               "_expandable": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "user": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "group": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             },
//             "operation": {
//               "operation": "purge",
//               "targetType": "attachment"
//             },
//             "anonymousAccess": false,
//             "unlicensedAccess": false
//           },
//           {
//             "subjects": {
//               "_expandable": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "user": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               },
//               "group": {
//                 "value": "<Error: Too many levels of nesting to fake this schema>"
//               }
//             },
//             "operation": {
//               "operation": "delete",
//               "targetType": "application"
//             },
//             "anonymousAccess": false,
//             "unlicensedAccess": false
//           }
//         ],
//         "settings": {
//           "routeOverrideEnabled": true,
//           "_links": {}
//         },
//         "theme": {},
//         "lookAndFeel": {
//           "headings": {
//             "color": "<string>"
//           },
//           "links": {
//             "color": "<string>"
//           },
//           "menus": {
//             "hoverOrFocus": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "color": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "header": {
//             "backgroundColor": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "button": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "primaryNavigation": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "secondaryNavigation": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "search": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "content": {
//             "screen": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "container": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "header": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             },
//             "body": {
//               "value": "<Error: Too many levels of nesting to fake this schema>"
//             }
//           },
//           "bordersAndDividers": {
//             "color": "<string>"
//           }
//         },
//         "history": {
//           "createdDate": "1965-11-18T11:33:14.736Z"
//         }
//       }
//     }
//   ],
//   "start": -77819495,
//   "limit": -88196390,
//   "size": -80415169,
//   "_links": {}
// }

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

li_Start = loo_JResp.IntOf("start")
li_Limit = loo_JResp.IntOf("limit")
li_Size = loo_JResp.IntOf("size")
i = 0
li_Count_i = loo_JResp.SizeOfArray("results")
do while i < li_Count_i
    loo_JResp.I = i
    ls_V_type = loo_JResp.StringOf("results[i].type")
    ls_AccountId = loo_JResp.StringOf("results[i].accountId")
    ls_AccountType = loo_JResp.StringOf("results[i].accountType")
    ls_Email = loo_JResp.StringOf("results[i].email")
    ls_PublicName = loo_JResp.StringOf("results[i].publicName")
    ls_Path = loo_JResp.StringOf("results[i].profilePicture.path")
    li_Width = loo_JResp.IntOf("results[i].profilePicture.width")
    li_Height = loo_JResp.IntOf("results[i].profilePicture.height")
    li_IsDefault = loo_JResp.BoolOf("results[i].profilePicture.isDefault")
    ls_DisplayName = loo_JResp.StringOf("results[i].displayName")
    ls_Operations = loo_JResp.StringOf("results[i]._expandable.operations")
    ls_Details = loo_JResp.StringOf("results[i]._expandable.details")
    ls_PersonalSpace = loo_JResp.StringOf("results[i]._expandable.personalSpace")
    ls_Username = loo_JResp.StringOf("results[i].username")
    ls_UserKey = loo_JResp.StringOf("results[i].userKey")
    ls_Value = loo_JResp.StringOf("results[i].details.business.value")
    ls_PersonalValue = loo_JResp.StringOf("results[i].details.personal.value")
    li_Id = loo_JResp.IntOf("results[i].personalSpace.id")
    ls_Key = loo_JResp.StringOf("results[i].personalSpace.key")
    ls_Name = loo_JResp.StringOf("results[i].personalSpace.name")
    ls_V_Type = loo_JResp.StringOf("results[i].personalSpace.type")
    ls_Status = loo_JResp.StringOf("results[i].personalSpace.status")
    ls_Settings = loo_JResp.StringOf("results[i].personalSpace._expandable.settings")
    ls_Metadata = loo_JResp.StringOf("results[i].personalSpace._expandable.metadata")
    ls_V_expandableOperations = loo_JResp.StringOf("results[i].personalSpace._expandable.operations")
    ls_LookAndFeel = loo_JResp.StringOf("results[i].personalSpace._expandable.lookAndFeel")
    ls_Permissions = loo_JResp.StringOf("results[i].personalSpace._expandable.permissions")
    ls_Icon = loo_JResp.StringOf("results[i].personalSpace._expandable.icon")
    ls_Description = loo_JResp.StringOf("results[i].personalSpace._expandable.description")
    ls_Theme = loo_JResp.StringOf("results[i].personalSpace._expandable.theme")
    ls_History = loo_JResp.StringOf("results[i].personalSpace._expandable.history")
    ls_Homepage = loo_JResp.StringOf("results[i].personalSpace._expandable.homepage")
    ls_IconPath = loo_JResp.StringOf("results[i].personalSpace.icon.path")
    li_IconWidth = loo_JResp.IntOf("results[i].personalSpace.icon.width")
    li_IconHeight = loo_JResp.IntOf("results[i].personalSpace.icon.height")
    li_IconIsDefault = loo_JResp.BoolOf("results[i].personalSpace.icon.isDefault")
    ls_PlainValue = loo_JResp.StringOf("results[i].personalSpace.description.plain.value")
    ls_Representation = loo_JResp.StringOf("results[i].personalSpace.description.plain.representation")
    ls_ViewValue = loo_JResp.StringOf("results[i].personalSpace.description.view.value")
    ls_ViewRepresentation = loo_JResp.StringOf("results[i].personalSpace.description.view.representation")
    ls_HomepageValue = loo_JResp.StringOf("results[i].personalSpace.homepage.value")
    li_Start = loo_JResp.IntOf("results[i].personalSpace.metadata.labels.start")
    li_Limit = loo_JResp.IntOf("results[i].personalSpace.metadata.labels.limit")
    li_Size = loo_JResp.IntOf("results[i].personalSpace.metadata.labels.size")
    li_RouteOverrideEnabled = loo_JResp.BoolOf("results[i].personalSpace.settings.routeOverrideEnabled")
    ls_Color = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.headings.color")
    ls_LinksColor = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.links.color")
    ls_HoverOrFocusValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.menus.hoverOrFocus.value")
    ls_ColorValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.menus.color.value")
    ls_BackgroundColorValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.header.backgroundColor.value")
    ls_ButtonValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.header.button.value")
    ls_PrimaryNavigationValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.header.primaryNavigation.value")
    ls_SecondaryNavigationValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.header.secondaryNavigation.value")
    ls_SearchValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.header.search.value")
    ls_ScreenValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.content.screen.value")
    ls_ContainerValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.content.container.value")
    ls_HeaderValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.content.header.value")
    ls_BodyValue = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.content.body.value")
    ls_BordersAndDividersColor = loo_JResp.StringOf("results[i].personalSpace.lookAndFeel.bordersAndDividers.color")
    ls_CreatedDate = loo_JResp.StringOf("results[i].personalSpace.history.createdDate")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].operations")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Operation = loo_JResp.StringOf("results[i].operations[j].operation")
        ls_TargetType = loo_JResp.StringOf("results[i].operations[j].targetType")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].personalSpace.description.plain.embeddedContent")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Value = loo_JResp.StringOf("results[i].personalSpace.description.plain.embeddedContent[j].value")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].personalSpace.description.view.embeddedContent")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Value = loo_JResp.StringOf("results[i].personalSpace.description.view.embeddedContent[j].value")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].personalSpace.metadata.labels.results")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Value = loo_JResp.StringOf("results[i].personalSpace.metadata.labels.results[j].value")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].personalSpace.operations")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Operation = loo_JResp.StringOf("results[i].personalSpace.operations[j].operation")
        ls_TargetType = loo_JResp.StringOf("results[i].personalSpace.operations[j].targetType")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("results[i].personalSpace.permissions")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_V_expandableValue = loo_JResp.StringOf("results[i].personalSpace.permissions[j].subjects._expandable.value")
        ls_UserValue = loo_JResp.StringOf("results[i].personalSpace.permissions[j].subjects.user.value")
        ls_GroupValue = loo_JResp.StringOf("results[i].personalSpace.permissions[j].subjects.group.value")
        ls_Operation = loo_JResp.StringOf("results[i].personalSpace.permissions[j].operation.operation")
        ls_TargetType = loo_JResp.StringOf("results[i].personalSpace.permissions[j].operation.targetType")
        li_AnonymousAccess = loo_JResp.BoolOf("results[i].personalSpace.permissions[j].anonymousAccess")
        li_UnlicensedAccess = loo_JResp.BoolOf("results[i].personalSpace.permissions[j].unlicensedAccess")
        j = j + 1
    loop
    i = i + 1
loop


destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -G -d "accountId=%3Cstring%3E"
	-d "expand=%3Cstring%3E"
	-d "expand=%3Cstring%3E"
	-d "limit=%3Cinteger%3E"
	-H "Authorization: Bearer <access_token>"
https://your-domain.atlassian.net/wiki/rest/api/user/bulk

Postman Collection Item JSON

{
  "name": "Get multiple users using ids",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/api/user/bulk?accountId=<string>&expand=<string>&expand=<string>&limit=<integer>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "user",
        "bulk"
      ],
      "query": [
        {
          "key": "accountId",
          "value": "<string>",
          "description": "(Required) A list of accountId's of users to be returned."
        },
        {
          "key": "expand",
          "value": "<string>",
          "description": "A multi-value parameter indicating which properties of the user to\nexpand.\n\n  - `operations` returns the operations that the user is allowed to do.\n  - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'.\n  Note that these fields have been deprecated due to privacy changes. See the\n  [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\n  for details.\n  - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'.\n  Note that these fields have been deprecated due to privacy changes. See the\n  [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\n  for details.\n  - personalSpace returns the user's personal space, if it exists."
        },
        {
          "key": "expand",
          "value": "<string>",
          "description": "A multi-value parameter indicating which properties of the user to\nexpand.\n\n  - `operations` returns the operations that the user is allowed to do.\n  - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'.\n  Note that these fields have been deprecated due to privacy changes. See the\n  [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\n  for details.\n  - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'.\n  Note that these fields have been deprecated due to privacy changes. See the\n  [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\n  for details.\n  - personalSpace returns the user's personal space, if it exists."
        },
        {
          "key": "limit",
          "value": "<integer>",
          "description": "The maximum number of results returned.\nCurrently API returns 200 results max.\nIf more that 200 ids are passed first 200 will be returned."
        }
      ]
    },
    "description": "Returns user details for the ids provided in request.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to access the Confluence site ('Can use' global permission)."
  },
  "response": [
    {
      "name": "Returned if, the list of users is returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/user/bulk?accountId=<string>&expand=<string>&expand=<string>&limit=<integer>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "user",
            "bulk"
          ],
          "query": [
            {
              "key": "accountId",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "limit",
              "value": "<integer>"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"results\": [\n  {\n   \"type\": \"user\",\n   \"accountId\": \"elit est ullamco in officia\",\n   \"accountType\": \"exercitation fugiat labo\",\n   \"email\": \"Excepteur in cillum officia\",\n   \"publicName\": \"ullamco occaecat\",\n   \"profilePicture\": {\n    \"path\": \"cupidatat dolore et labore ad\",\n    \"width\": -99848841,\n    \"height\": 55035562,\n    \"isDefault\": true\n   },\n   \"displayName\": \"amet\",\n   \"_expandable\": {\n    \"operations\": \"labore ut Duis id culpa\",\n    \"details\": \"in irure voluptate Duis magna\",\n    \"personalSpace\": \"n\"\n   },\n   \"_links\": {},\n   \"username\": \"est sunt dolor nostrud\",\n   \"userKey\": \"labo\",\n   \"operations\": [\n    {\n     \"operation\": \"update\",\n     \"targetType\": \"attachment\"\n    },\n    {\n     \"operation\": \"administer\",\n     \"targetType\": \"attachment\"\n    }\n   ],\n   \"details\": {\n    \"business\": {\n     \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n    },\n    \"personal\": {\n     \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n    }\n   },\n   \"personalSpace\": {\n    \"id\": -93610124,\n    \"key\": \"in eiusmod\",\n    \"name\": \"ut minim Excepteur\",\n    \"type\": \"sunt qui amet\",\n    \"status\": \"null\",\n    \"_expandable\": {\n     \"settings\": \"pariatur deserunt anim\",\n     \"metadata\": \"anim occaecat aliqua\",\n     \"operations\": \"aute nostrud in\",\n     \"lookAndFeel\": \"est irure aute labore\",\n     \"permissions\": \"in cupidatat qui\",\n     \"icon\": \"voluptate Duis\",\n     \"description\": \"culpa veniam Lorem velit\",\n     \"theme\": \"consequat sunt reprehenderit\",\n     \"history\": \"ex officia veniam sit do\",\n     \"homepage\": \"dolore dolore\"\n    },\n    \"_links\": {},\n    \"icon\": {\n     \"path\": \"dolore Lorem magna sunt\",\n     \"width\": 3933679,\n     \"height\": -17426468,\n     \"isDefault\": false\n    },\n    \"description\": {\n     \"plain\": {\n      \"value\": \"consequat consectetur laborum labore occaecat\",\n      \"representation\": \"view\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     },\n     \"view\": {\n      \"value\": \"Duis reprehenderit anim ut\",\n      \"representation\": \"view\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     }\n    },\n    \"homepage\": {\n     \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n    },\n    \"metadata\": {\n     \"labels\": {\n      \"results\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ],\n      \"start\": 23981894,\n      \"limit\": -68365223,\n      \"size\": -97521792,\n      \"_links\": {}\n     }\n    },\n    \"operations\": [\n     {\n      \"operation\": \"administer\",\n      \"targetType\": \"blogpost\"\n     },\n     {\n      \"operation\": \"delete\",\n      \"targetType\": \"blogpost\"\n     }\n    ],\n    \"permissions\": [\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"read\",\n       \"targetType\": \"space\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     },\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"restore\",\n       \"targetType\": \"blogpost\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     }\n    ],\n    \"settings\": {\n     \"routeOverrideEnabled\": true,\n     \"_links\": {}\n    },\n    \"theme\": {},\n    \"lookAndFeel\": {\n     \"headings\": {\n      \"color\": \"<string>\"\n     },\n     \"links\": {\n      \"color\": \"<string>\"\n     },\n     \"menus\": {\n      \"hoverOrFocus\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"color\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"header\": {\n      \"backgroundColor\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"button\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"primaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"secondaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"search\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"content\": {\n      \"screen\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"container\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"header\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"body\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"bordersAndDividers\": {\n      \"color\": \"<string>\"\n     }\n    },\n    \"history\": {\n     \"createdDate\": \"2004-03-14T14:56:20.738Z\"\n    }\n   }\n  },\n  {\n   \"type\": \"user\",\n   \"accountId\": \"aliquip ex aute occaecat minim\",\n   \"accountType\": \"cupidatat dolore\",\n   \"email\": \"tempor non\",\n   \"publicName\": \"Lorem\",\n   \"profilePicture\": {\n    \"path\": \"fugiat ex sit sunt\",\n    \"width\": 86996840,\n    \"height\": -45552232,\n    \"isDefault\": false\n   },\n   \"displayName\": \"eu qui mollit\",\n   \"_expandable\": {\n    \"operations\": \"laborum dolor magna adipisicing\",\n    \"details\": \"culpa quis a\",\n    \"personalSpace\": \"id in\"\n   },\n   \"_links\": {},\n   \"username\": \"proident minim et ipsum\",\n   \"userKey\": \"est conseq\",\n   \"operations\": [\n    {\n     \"operation\": \"copy\",\n     \"targetType\": \"comment\"\n    },\n    {\n     \"operation\": \"purge_version\",\n     \"targetType\": \"application\"\n    }\n   ],\n   \"details\": {\n    \"business\": {\n     \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n    },\n    \"personal\": {\n     \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n    }\n   },\n   \"personalSpace\": {\n    \"id\": -77236660,\n    \"key\": \"mollit\",\n    \"name\": \"mollit reprehenderit\",\n    \"type\": \"ipsum eu\",\n    \"status\": \"id magna esse\",\n    \"_expandable\": {\n     \"settings\": \"Lorem cupidatat fugiat id\",\n     \"metadata\": \"ut non\",\n     \"operations\": \"m\",\n     \"lookAndFeel\": \"elit \",\n     \"permissions\": \"proident labore\",\n     \"icon\": \"ut fugiat esse do\",\n     \"description\": \"sunt\",\n     \"theme\": \"ea consequat aliqua\",\n     \"history\": \"ullamco culpa\",\n     \"homepage\": \"eu esse ut amet\"\n    },\n    \"_links\": {},\n    \"icon\": {\n     \"path\": \"laborum magna Dui\",\n     \"width\": -87940522,\n     \"height\": -74576861,\n     \"isDefault\": true\n    },\n    \"description\": {\n     \"plain\": {\n      \"value\": \"adipisicing proident magna nulla\",\n      \"representation\": \"view\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     },\n     \"view\": {\n      \"value\": \"quis enim ex adipisicing\",\n      \"representation\": \"plain\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     }\n    },\n    \"homepage\": {\n     \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n    },\n    \"metadata\": {\n     \"labels\": {\n      \"results\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ],\n      \"start\": 12150462,\n      \"limit\": -13231996,\n      \"size\": -79881326,\n      \"_links\": {}\n     }\n    },\n    \"operations\": [\n     {\n      \"operation\": \"create\",\n      \"targetType\": \"page\"\n     },\n     {\n      \"operation\": \"update\",\n      \"targetType\": \"blogpost\"\n     }\n    ],\n    \"permissions\": [\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"purge\",\n       \"targetType\": \"attachment\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     },\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"delete\",\n       \"targetType\": \"application\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     }\n    ],\n    \"settings\": {\n     \"routeOverrideEnabled\": true,\n     \"_links\": {}\n    },\n    \"theme\": {},\n    \"lookAndFeel\": {\n     \"headings\": {\n      \"color\": \"<string>\"\n     },\n     \"links\": {\n      \"color\": \"<string>\"\n     },\n     \"menus\": {\n      \"hoverOrFocus\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"color\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"header\": {\n      \"backgroundColor\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"button\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"primaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"secondaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"search\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"content\": {\n      \"screen\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"container\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"header\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"body\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"bordersAndDividers\": {\n      \"color\": \"<string>\"\n     }\n    },\n    \"history\": {\n     \"createdDate\": \"1965-11-18T11:33:14.736Z\"\n    }\n   }\n  }\n ],\n \"start\": -77819495,\n \"limit\": -88196390,\n \"size\": -80415169,\n \"_links\": {}\n}"
    },
    {
      "name": "Returned if the calling user does not have permission to use\nConfluence.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/user/bulk?accountId=<string>&expand=<string>&expand=<string>&limit=<integer>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "user",
            "bulk"
          ],
          "query": [
            {
              "key": "accountId",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "limit",
              "value": "<integer>"
            }
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}