Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

REQUEST

This API is used to get the web session of the user.

The structure of API as below:

GET

/auth/session/list

HEADER

The request requires you given the Token of the user in headers.

Code Block
{
	"accept": "application/json",
	"X-Auth-Token": "Admin Token"
}

 

If you call API without header, the system will return the message as below:

Code Block
{
  	"error_type": "unauthenticated_error",
   	"success": false,
   	"error":    {
      	"message": "No header X-Auth-Token present",
      	"code": 110,
      	"reason": "auth_token_not_provided"
   	}
}

JSON RESPONSE

There is message return as JSON format. It will return the result of API and the related information as well.

If you provide correct token, the server will return code 200 with a message as below:

Code Block
{
   Web Session list
}

 

If you provide the wrong token, the server will return code 120 with a message as below:

Code Block
{
   	"error_type": "unauthenticated_error",
   	"success": false,
   	"error":    {
      	"message": "Incorrect token provided",
      	"code": 120,
      	"reason": "incorrect_token_provided"
   	}
}

 

EXAMPLE

We will know more about the API through the example below:

Request

I will call API to get the list of web session as below:

Code Block
curl \
-H "X-Auth-Token: eyaskjksadkasd9.9123kjsadhkj123jhasdjajsjsdhKS.IH5uHASSJsadnbads980asTHo9dhljM" \
-X GET "http://88.99.175.131:8000/v1/auth/session/list"
 

Response

Code Block
{
   
}

...