Accessing Viewst API

To use Viewst API you need 2 public URLs on your side. Authentication one (Auth URL) and another for getting export results (Result Handler URL)

Auth URL

  1. Auth URL should receive request with a pair - login and password and send back an authentication JSON WEB token.

An example of incoming request:

{
	"login" : "viewstauthlogin",
	"password": "viewstauthpassword"
}

An example of a token:

{
	"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJoaSI6ImZyb20gVmlld3N0LmNvbSIsImlhdCI6MTY1NjkzNzkwOX0.Gq3omKmWCmr3YP_0iG_ADr0dZL5XtZGBFtiTgD_Vlx4"
}

Important notes:

Result Handler URL

When the export is successful Viewst sends a POST request for Result Handler URL.

The authorization title contains a token in the form of Bearer ${token} :

Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJoaSI6ImZyb20gVmlld3N0LmNvbSIsImlhdCI6MTY1NjkzNzkwOX0.Gq3omKmWCmr3YP_0iG_ADr0dZL5XtZGBFtiTgD_Vlx4'

The request body contains the export type (exportType)