1. Overview
  2. Zang Identity
  3. Avaya Spaces

1 Overview

Zang Identity (https://accounts.zang.io) is the authoritative source for all user account information and authentication for all Zang cloud applications. Users log in once to Zang Identity and gain access to all Zang cloud applications without having to provide their login information again (SSO). Authentication by Zang Identity is required to access any other Zang cloud applications,see here. p. Avaya Spaces and Zang Identity store user information independently and as such a single user will have a different userID from each. API calls must use the respective userID. If I am retreiving user data from Avaya Spaces I must reference the Avaya Spaces userID and vice versa for Zang Identity.

Important Note: If a user has not selected a profile picture, picture_url will be a URL that ends with the following path /norevimages/noimage.jpg

2 Zang Identity

To query a list of users from Zang Identity make a request to the following REST API endpointhttps://accounts.zang.io/api/1.0/users/self/colleagues/. This will list all the users that are part of the same company as the currently logged in user, these results are paginated and filterable with the query parameter search.

Example Request:

GET https://accounts.zang.io/api/1.0/users/self/colleagues/?search=kevin

Example Response:

{
    "nextUrl": "", 
    "previousUrl": "", 
    "pageRangeDisplay": [
        1, 
        1
    ], 
    "currentPage": 0, 
    "total": 1, 
    "data": [
        {
            "id": "agxzfm9uZXNuYTIwMTRyEQsSBFVzZXIYgICAoJGt8Qhg", 
            "username": "kevinb@faekemail.com", 
            "name": {
                "familyname": "Bacon", 
                "formatted": "", 
                "givenname": "Kevin", 
                "honorific_prefix": "", 
                "honorific_suffix": "", 
                "middlename": "", 
                "pronunciation": "", 
                "pronunciation_url": ""
            }, 
            "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg", 
            "relation_graphs": [
                {
                    "relationdef_id": "agxzfm9uZXNuYTIwMTRyGAsSC1JlbGF0aW9uRGVmGICAgKCVov0Kop", 
                    "initiator_id": "agxzfm9uZXNuYTIwMTRyFAsSB0NvbXBhbnkYgICAgPuoswla", 
                    "initiator_type": "company", 
                    "relation_type": "employee"
                }
            ], 
            "phone_numbers": [], 
            "addresses": [], 
            "gender": "m", 
            "displayname": "Kevin Bacon", 
            "timezone": "America/New_York"
        }
    ]
}

3 Avaya Spaces

To learn how to send authorized requests to Avaya Spaces read this guide.

To query a list of users from Avaya Spaces make a request to this REST API endpointhttps://spacesapis.zang.io/api/users/{userId}/colleagues. This will return a list of users of Avaya Spaces that are a part of the same company as the currently logged in user.

Example Request

GET https://spacesapis.zang.io/api/users/{userId}/colleagues?search=kevin

Example Response

[
    {
        "_id": "5697f3e1283a4708c4f7ef2c",
        "displayname": "Kevin Bacon",
        "picturefile": "https://accounts.zang.io/norevimages/noimage.jpg",
        "name": {
            "pronunciation_url": "",
            "pronunciation": "",
            "middlename": "",
            "honorific_suffix": "",
            "honorific_prefix": "",
            "givenname": "Kevin",
            "formatted": "",
            "familyname": "Bacon"
        },
        "username": "kevinb@faekemail.com"
    }
]

To get a list of recently contacted people and spaces (including people outside the current user's organization), make an API call to /api/users/me/spaces.