Return an array of user objects that are colleagues of the user specified by {userId}. To be considered a colleague, one of the following must hold:

  1. Users are members of the same company
  2. Users have been in a space together previously
  3. Colleagues are automatically added by email

If accountid parameter is specified then search parameter is ignored.

Note: Use nextPageUrl and prevPageUrl from the response data for query pagination.

URL Parameters

NameDescriptionLocationRequiredDefault Value
userIdUnique identifier of the user whose colleagues to find. Use keyword me for current user.pathYes
searchRegular expression to filter colleague results. User properties searched: name, email(s), identity phone number(s)*. Uses "contain" string logic.
For "begin with" logic, use "^" sign, e.g.: "/colleagues?search=^{query}"
For "end with" logic, use "$" sign, e.g.: "/colleagues?search={query}$"
QueryNo
accountidUnique identifier of user from Avaya Cloud Accounts. If this parameter exists then search parameter is ignored.QueryNo
sizeThe number of responses to return per requestQueryNo10
pageThe page number of response dataQueryNo0

*Identity phone number: This is a phone number that has been verified by Avaya Cloud Accounts and has theAllow colleagues to find my account using this phone number flag set to true. Phone number formatting characters should be removed by client.

Body Parameters

None.

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator, ServiceAppAuthenticator

Authorization

OAuthAuthorizer

Example Request

URL

For Production: GET https://spacesapis.avayacloud.com/api/users/me/colleagues?search=ed
For Staging: GET https://loganstagingapis.esna.com/api/users/me/colleagues?search=ed

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZ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Q-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Example Response

{
  "data": [
    {
      "_id": "5697f041283a4708c4f7d02f",
      "displayname": "Eric3333 Ding",
      "picturefile": "pictures/pfpic_1K5zo3gELl_7f5a14d1-60e3-47c0-a8f9-dd042c7fb05a",
      "picture_url": "https://storage.googleapis.com/onesna/pictures/pfpic_1K5zo3gELl_7f5a14d1-60e3-47c0-a8f9-dd042c7fb05a",
      "accountId": "ag9zfm9uZXNuYXRlc3RpbmdyEQsSBFVzZXIYgICAqMHf1AgJ",  //userId from Avaya Cloud Accounts
      "name": {
          "pronunciation_url": "",
          "pronunciation": "",
          "middlename": "",
          "honorific_suffix": "",
          "honorific_prefix": "",
          "givenname": "Eric3333",
          "formatted": "",
          "familyname": "Ding"
      },
      "username": "1K5zo3gELl@esna.com",
      "emails": [
        {
          "value": "ed@esna.com",
          "primary": true
        },
        {
          "value": "ed2@zang.io",
          "primary": false
        },
        {
          "value": "ed3@avaya.com",
          "primary": false
        }
      ],
      "phone_numbers": [
        {
          "verified": false,
          "primary": true,
          "canonicalForm": "+19055551234",
          "type": "mobile",
          "value": "+19055551234"
        }
      ]
    }
  ],
  "from": 1,
  "to": 1,
  "nextPageUrl": "/api/users/593807c13b3132a1e27c8069/colleagues?page=1&size=1&search=ed"
}