Chilkat Online Tools

DataFlex / Atlassian Confluence Cloud / Get multiple users using ids

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sV_type
    String sAccountId
    String sAccountType
    String sEmail
    String sPublicName
    String sPath
    Integer iWidth
    Integer iHeight
    Boolean iIsDefault
    String sDisplayName
    String sOperations
    String sDetails
    String sPersonalSpace
    String sUsername
    String sUserKey
    String sValue
    String sPersonalValue
    Integer iId
    String sKey
    String sName
    String sV_Type
    String sStatus
    String sSettings
    String sMetadata
    String sV_expandableOperations
    String sLookAndFeel
    String sPermissions
    String sIcon
    String sDescription
    String sTheme
    String sHistory
    String sHomepage
    String sIconPath
    Integer iIconWidth
    Integer iIconHeight
    Boolean iIconIsDefault
    String sPlainValue
    String sRepresentation
    String sViewValue
    String sViewRepresentation
    String sHomepageValue
    Integer iStart
    Integer iLimit
    Integer iSize
    Boolean iRouteOverrideEnabled
    String sColor
    String sLinksColor
    String sHoverOrFocusValue
    String sColorValue
    String sBackgroundColorValue
    String sButtonValue
    String sPrimaryNavigationValue
    String sSecondaryNavigationValue
    String sSearchValue
    String sScreenValue
    String sContainerValue
    String sHeaderValue
    String sBodyValue
    String sBordersAndDividersColor
    String sCreatedDate
    Integer j
    Integer iCount_j
    String sOperation
    String sTargetType
    String sValue
    String sV_expandableValue
    String sUserValue
    String sGroupValue
    String sOperation
    String sTargetType
    Boolean iAnonymousAccess
    Boolean iUnlicensedAccess
    Integer iStart
    Integer iLimit
    Integer iSize
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "accountId" "<string>" To iSuccess
    Get ComUpdateString Of hoQueryParams "expand" "<string>" To iSuccess
    Get ComUpdateString Of hoQueryParams "expand" "<string>" To iSuccess
    Get ComUpdateString Of hoQueryParams "limit" "<integer>" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://your-domain.atlassian.net/wiki/rest/api/user/bulk" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

    // 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

    Get ComIntOf Of hoJResp "start" To iStart
    Get ComIntOf Of hoJResp "limit" To iLimit
    Get ComIntOf Of hoJResp "size" To iSize
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "results" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "results[i].type" To sV_type
        Get ComStringOf Of hoJResp "results[i].accountId" To sAccountId
        Get ComStringOf Of hoJResp "results[i].accountType" To sAccountType
        Get ComStringOf Of hoJResp "results[i].email" To sEmail
        Get ComStringOf Of hoJResp "results[i].publicName" To sPublicName
        Get ComStringOf Of hoJResp "results[i].profilePicture.path" To sPath
        Get ComIntOf Of hoJResp "results[i].profilePicture.width" To iWidth
        Get ComIntOf Of hoJResp "results[i].profilePicture.height" To iHeight
        Get ComBoolOf Of hoJResp "results[i].profilePicture.isDefault" To iIsDefault
        Get ComStringOf Of hoJResp "results[i].displayName" To sDisplayName
        Get ComStringOf Of hoJResp "results[i]._expandable.operations" To sOperations
        Get ComStringOf Of hoJResp "results[i]._expandable.details" To sDetails
        Get ComStringOf Of hoJResp "results[i]._expandable.personalSpace" To sPersonalSpace
        Get ComStringOf Of hoJResp "results[i].username" To sUsername
        Get ComStringOf Of hoJResp "results[i].userKey" To sUserKey
        Get ComStringOf Of hoJResp "results[i].details.business.value" To sValue
        Get ComStringOf Of hoJResp "results[i].details.personal.value" To sPersonalValue
        Get ComIntOf Of hoJResp "results[i].personalSpace.id" To iId
        Get ComStringOf Of hoJResp "results[i].personalSpace.key" To sKey
        Get ComStringOf Of hoJResp "results[i].personalSpace.name" To sName
        Get ComStringOf Of hoJResp "results[i].personalSpace.type" To sV_Type
        Get ComStringOf Of hoJResp "results[i].personalSpace.status" To sStatus
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.settings" To sSettings
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.metadata" To sMetadata
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.operations" To sV_expandableOperations
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.lookAndFeel" To sLookAndFeel
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.permissions" To sPermissions
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.icon" To sIcon
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.description" To sDescription
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.theme" To sTheme
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.history" To sHistory
        Get ComStringOf Of hoJResp "results[i].personalSpace._expandable.homepage" To sHomepage
        Get ComStringOf Of hoJResp "results[i].personalSpace.icon.path" To sIconPath
        Get ComIntOf Of hoJResp "results[i].personalSpace.icon.width" To iIconWidth
        Get ComIntOf Of hoJResp "results[i].personalSpace.icon.height" To iIconHeight
        Get ComBoolOf Of hoJResp "results[i].personalSpace.icon.isDefault" To iIconIsDefault
        Get ComStringOf Of hoJResp "results[i].personalSpace.description.plain.value" To sPlainValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.description.plain.representation" To sRepresentation
        Get ComStringOf Of hoJResp "results[i].personalSpace.description.view.value" To sViewValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.description.view.representation" To sViewRepresentation
        Get ComStringOf Of hoJResp "results[i].personalSpace.homepage.value" To sHomepageValue
        Get ComIntOf Of hoJResp "results[i].personalSpace.metadata.labels.start" To iStart
        Get ComIntOf Of hoJResp "results[i].personalSpace.metadata.labels.limit" To iLimit
        Get ComIntOf Of hoJResp "results[i].personalSpace.metadata.labels.size" To iSize
        Get ComBoolOf Of hoJResp "results[i].personalSpace.settings.routeOverrideEnabled" To iRouteOverrideEnabled
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.headings.color" To sColor
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.links.color" To sLinksColor
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.menus.hoverOrFocus.value" To sHoverOrFocusValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.menus.color.value" To sColorValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.header.backgroundColor.value" To sBackgroundColorValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.header.button.value" To sButtonValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.header.primaryNavigation.value" To sPrimaryNavigationValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.header.secondaryNavigation.value" To sSecondaryNavigationValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.header.search.value" To sSearchValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.content.screen.value" To sScreenValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.content.container.value" To sContainerValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.content.header.value" To sHeaderValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.content.body.value" To sBodyValue
        Get ComStringOf Of hoJResp "results[i].personalSpace.lookAndFeel.bordersAndDividers.color" To sBordersAndDividersColor
        Get ComStringOf Of hoJResp "results[i].personalSpace.history.createdDate" To sCreatedDate
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].operations" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].operations[j].operation" To sOperation
            Get ComStringOf Of hoJResp "results[i].operations[j].targetType" To sTargetType
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].personalSpace.description.plain.embeddedContent" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].personalSpace.description.plain.embeddedContent[j].value" To sValue
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].personalSpace.description.view.embeddedContent" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].personalSpace.description.view.embeddedContent[j].value" To sValue
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].personalSpace.metadata.labels.results" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].personalSpace.metadata.labels.results[j].value" To sValue
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].personalSpace.operations" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].personalSpace.operations[j].operation" To sOperation
            Get ComStringOf Of hoJResp "results[i].personalSpace.operations[j].targetType" To sTargetType
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "results[i].personalSpace.permissions" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "results[i].personalSpace.permissions[j].subjects._expandable.value" To sV_expandableValue
            Get ComStringOf Of hoJResp "results[i].personalSpace.permissions[j].subjects.user.value" To sUserValue
            Get ComStringOf Of hoJResp "results[i].personalSpace.permissions[j].subjects.group.value" To sGroupValue
            Get ComStringOf Of hoJResp "results[i].personalSpace.permissions[j].operation.operation" To sOperation
            Get ComStringOf Of hoJResp "results[i].personalSpace.permissions[j].operation.targetType" To sTargetType
            Get ComBoolOf Of hoJResp "results[i].personalSpace.permissions[j].anonymousAccess" To iAnonymousAccess
            Get ComBoolOf Of hoJResp "results[i].personalSpace.permissions[j].unlicensedAccess" To iUnlicensedAccess
            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop



End_Procedure

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": ""
    }
  ]
}