Searching...

Matching results

    User

    A user account, acts in the context of a company depending on the rights he has in it. A user may have access to several companies.

    Read only fields are computed by AirVantage and can only be seen on response fragments sent by find, create, or edit requests.

    Field Description Type
    uid User's unique identifier. uid
    email User's email. It must be unique as it is a credential. string
    name User's name. string
    phoneNumber User's phone number. A phone number must be set in international format and must respect the regexp ^(\+[1-9])[0-9]{0,18} string
    profile The AirVantage profile assigned to this user in the company. It shows its uid and name. Can be modified by an administrator.
    company The company this user belongs to. It shows its uid and name.
    picture References to a picture in three different sizes:
    - Normal: keeps original image.
    - Small : resized image to 32x32 pixels keeping the length/width ratio.
    - icon : resized image to 16x16 pixels keeping the original length/width ratio.
    string

    This is a representation of a User returned by the Find or GetDetails API.

    {
        "uid": "any_uid_string",
        "email": "any_email@domain.net",
        "name": "any_string",
        "profile": {
            "uid": "any_uid_string",
            "name": "any_string"
        },
        "company": {
            "uid": "any_uid_string",
            "name": "any_string"
        },
        "picture": {
            "icon": "/users/any_uid_string/picture/icon",
            "normal": "/users/any_uid_string/picture/normal",
            "small": "/users/any_uid_string/picture/small"
        }
    }
                        

    /api/v1/users/current

    Returns information about the user doing the API call.

    Request

    GET https://na.airvantage.net/api/v1/users/current

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "company": {
          "uid": "1",
          "name": "Sierra Wireless"
       },
       "uid": "734e516714124fcf80b6a930b06095cf",
       "email": "user@email.net",
       "picture": {
          "normal": "/users/734e516714124fcf80b6a930b06095cf/picture/normal",
          "small": "/users/734e516714124fcf80b6a930b06095cf/picture/small",
          "icon": "/users/734e516714124fcf80b6a930b06095cf/picture/icon"
       },
       "name": "The Administrator",
       "profile": null
    }
                                    
    Name Description
    user.unknown No current user currentlty logged in.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions None

    /api/v1/users/rights

    Returns a list of rights assigned to the authenticated user in a given company.

    Request

    GET https://na.airvantage.net/api/v1/users/rights

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    ["entities.applications.view", "accountNetwork.users.createEdit"]
                                    
    Name Description Use Default Type Operand
    company The user's company. optional context company uid string =
    Name Description
    partner.unknown The user's company does not have any relationship with the specified company.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions None

    /api/v1/users/{uid}

    Returns information about the specific user.

    Request

    GET https://na.airvantage.net/api/v1/users/734e516714124fcf80b6a930b06095cf
                                        

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "company": {
          "uid": "1",
          "name": "Sierra Wireless"
       },
       "uid": "734e516714124fcf80b6a930b06095cf",
       "email": "user@email.net",
       "picture": {
          "normal": "/users/734e516714124fcf80b6a930b06095cf/picture/normal",
          "small": "/users/734e516714124fcf80b6a930b06095cf/picture/small",
          "icon": "/users/734e516714124fcf80b6a930b06095cf/picture/icon"
       },
       "name": "The Administrator",
       "profile": null
    }
                                    
    Name Description
    user.unknown The specified uid does not match any user.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.users.view

    /api/v1/users

    Returns a paginated list of users with their complete details.

    It is possible to restrain the result list using criteria parameters.

    The fields parameter has to be defined in order to specify the attributes of the user which will be returned.
    If fields parameter is missing, only the following attributes of the user are returned: uid, name, email.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/users?fields=uid,name,email,profile
                                        

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "items": [
            {
                "uid": "734e516714124fcf80b6a930b06095cf",
                "email": "user@email.net",
                "name": "The Administrator",
                "profile": null
            }
        ],
       "count": 1,
       "size": 1,
       "offset": 0
    }
                                    
    Name Description Use Default Type Operand
    uid Find user whose uid match with the specified id. optional null uid string =
    email Find users of which the email contains the specified string optional null string like
    company The user's company. optional context company uid string =
    name Find users of which the name contains the specified string optional null string like
    profile Find users linked to a profile optional null uid string =
    freetext Find users of which email or name contains the specified string optional null string like
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.users.view
    Order by name, email, profile
    Fields uid, name, email, profile

    /api/v1/users/{uid}

    Edits the user profile. Profile can only be changed by an administrator.

    Request

    PUT https://na.airvantage.net/api/v1/users/a86e9a3ff1df4a13b39c24f48f1967ed
    Content-Type: application/json
    ...
    {
       "profile": {
         "uid":"63ee28685c8c4ad0a7e408f88abaffc4"
       }
    }
                                        

    Response
    200 OK

    {
       "uid": "a86e9a3ff1df4a13b39c24f48f1967ed",
       "email": "rodrigue@dupont.com",
       "name": "Rodrigue Dupont",
       "phoneNumber" : "+349854797415",
       "profile": {
          "uid": "63ee28685c8c4ad0a7e408f88abaffc4",
          "name": "user"
       },
       "company": {
          "uid": "6500ee29f8ed4e3991dff484b3ce3e73",
          "name": "Current Company Name"
       },
       "picture" : null
    }
                                    
    Name Description
    user.unknown The specified uid does not match with any user.
    user.not.authorize The user is not allowed to change its profile
    profile.unknown Provided profile does not exist.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.users.write

    /api/v1/users/{uid}

    Revoke user access to the AirVantage company.

    Request

    DELETE https://na.airvantage.net/api/v1/users/a86e9a3ff1df4a13b39c24f48f1967ed

    Response
    200 OK

    HTTP/1.1 200 OK
    Name Description
    user.unknown The specified uid does not match with any user.
    HTTP Method DELETE
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.users.write
    TOP