User Login session info

Retrieve user Login Session Info

GET /api/v1/session/user_login_info/

Deprecated url: /api/v1/session/login_info/

Retrieve login profile of the logged user.

Example request:

GET /api/v1/session/user_login_info/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"
Set-Cookie: sessionid=0123456780

{
   "ids": {
      "tenant_id": "Pie",
      "group_id": "PieGroup"
   }
   "profile" : {
      "user_level": 8,
      "first_name": "John",
      "last_name": "Doe",
      "emailAddress": "john.doe@netaxis.be"
   },
   "username" : "PieGroupAdmin1@sip.netaxis.be
}
Response JSON Object:
  • ids (object) – The list of ids of the logged user defined as Ids attributes, to be used by the client to build further API urls. Of course only ids relevant for the type of user retrieved are returned

  • profile (object) – Some properties of the profile as defined in Login profile attributes. The optional parameters are only present if relevant. The “is_first_login” is never provided as it is not a login.

  • username (string) – The full username (including domain if any) of the logged user.

Status Codes:

Modify user Login Session Info

PUT /api/v1/session/user_login_info/

Modify login profile of the logged user.

As only elements of the profile can be changed they have been promoted to the root level instead of inside a profile object.

Example request:

PUT /api/v1/session/user_login_info/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "first_name": "Test First Name",
   "last_name": "Test Last Name",
   "emailAddress": "testemail@netaxis.be"
}
Request JSON Object:
  • first_name (string) – The first name of the logged user.

  • last_name (string) – The last name of the logged user.

  • emailAddress (string) – The email address of the logged user.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"
Set-Cookie: sessionid=0123456780

{
   "ids": {
      "tenant_id": "Pie",
      "group_id": "PieGroup"
   }
   "profile" : {
      "user_level": 8,
      "first_name": "Test First Name",
      "last_name": "Test Last Name",
      "emailAddress": "testemail@netaxis.be"
   },
   "username" : "PieGroupAdmin1@sip.netaxis.be
}
Response JSON Object:
  • ids (object) – The list of ids of the logged user defined as Ids attributes, to be used by the client to build further API urls. Of course only ids relevant for the type of user retrieved are returned

  • profile (object) – Some properties of the profile as defined in Login profile attributes. The optional parameters are only present if relevant. The “is_first_login” is never provided as it is not a login.

  • username (string) – The full username (including domain if any) of the logged user.

Status Codes:
The API behaviour is strictly linked to the user login mode:
  • SERVER_LOGIN: Both Application Server DB and APIO DB are updated.

  • LOCAL_LOGIN_SHARED: Only APIO DB is updated.

  • LOCAL_LOGIN_DEDICATED: Both Application Server DB and APIO DB are updated.

  • SSO_LOGIN_DEDICATED: APIO DB is always updated. Application Server DB updating is controlled by the following setting (with default False): UPDATE_PROFILE_TO_BS_DB_SSO

  • DJANGO_ONLY: Only APIO DB is updated.