Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

Session Management Resource

This resource enables you to access information on the sessions started in the Abiquo platform. Although this resource is publicly exposed, it should not be used for purposes other than managing the sessions of the UI.

Main URI of the Resource

This class operates mainly over the Resource URI: /login/sessions

Exposed Methods

List all active sessions

List all active sessions.

Synopsis: GET http://example.com/api/login/sessions
Roles Required: AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.sessions+json; version=4.4; application/vnd.abiquo.sessions+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Sessions Media Type
Request Example:

 Click here to show or hide the request example

GET_login_ssns_AC_ssns_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/login/sessions \ 
	 -H 'Accept:application/vnd.abiquo.sessions+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "key": "860", 
      "nick": "25", 
      "authType": "ABIQUO", 
      "expirationDate": "2017-12-05T15:22:38.000+0000", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/enterprises/1181/users/860", 
          "type": "application/vnd.abiquo.user+json", 
          "rel": "user", 
          "title": "25"
        }, 
        {
          "href": "http://localhost:9009/api/admin/enterprises/1181", 
          "type": "application/vnd.abiquo.enterprise+json", 
          "rel": "enterprise", 
          "title": "20"
        }
      ], 
      "idUser": 860, 
      "id": 1119
    }
  ]
}

List all active sessions for a given session key

List all active sessions for the given key. Because sessions are opened in the Flex UI application, the session key will be managed by the browser. If the browser reuses (for example) the same session key between different tabs, there will be multiple sessions (and maybe different users) with the same session key.

Synopsis: GET http://example.com/api/login/sessions/{session}
Roles Required: AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.sessions+json; version=4.4; application/vnd.abiquo.sessions+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Sessions Media Type
Request Example:

 Click here to show or hide the request example
GET_login_ssns_X_AC_ssns_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/login/sessions/872 \ 
	 -H 'Accept:application/vnd.abiquo.sessions+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "key": "872", 
      "nick": "sysadmin", 
      "authType": "ABIQUO", 
      "expirationDate": "2017-12-05T15:22:39.000+0000", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/enterprises/1191/users/872", 
          "type": "application/vnd.abiquo.user+json", 
          "rel": "user", 
          "title": "sysadmin"
        }, 
        {
          "href": "http://localhost:9009/api/admin/enterprises/1191", 
          "type": "application/vnd.abiquo.enterprise+json", 
          "rel": "enterprise", 
          "title": "104"
        }
      ], 
      "idUser": 872, 
      "id": 1138
    }
  ]
}

Get the session for a given user

Get the session information for the given user.

Synopsis: GET http://example.com/api/login/sessions/{session}/{user}
Roles Required: AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.session+json; version=4.4; application/vnd.abiquo.session+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Session Media Type
Request Example:

 Click here to show or hide the request example
GET_login_ssns_X_X_AC_session_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/login/sessions/871/871 \ 
	 -H 'Accept:application/vnd.abiquo.session+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "key": "871", 
  "nick": "sysadmin", 
  "authType": "ABIQUO", 
  "expirationDate": "2017-12-05T15:22:39.000+0000", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/1190/users/871", 
      "type": "application/vnd.abiquo.user+json", 
      "rel": "user", 
      "title": "sysadmin"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/1190", 
      "type": "application/vnd.abiquo.enterprise+json", 
      "rel": "enterprise", 
      "title": "98"
    }
  ], 
  "idUser": 871, 
  "id": 1136
}