Scopevisio offers a comprehensive REST API for connecting Scopevisio to other automation systems. The first steps for using the REST API are described here.
The target group for the use of the REST API described here are customers who want to easily integrate Scopevisio into the automation of their existing systems. As a customer, do you want to connect a third-party provider to your company or are you a third-party provider yourself and want to create added value for our customers with Scopevisio? Please contact our support team for authentication via OAuth2.
Creation of a technical user (optional)
An active user in a Scopevisio company is required to use the REST API. For permanent use in the context of automation, we recommend creating a technical user, e.g. via a functional email address such as [email protected]. The technical user's email inbox should be created in the Scopevisio customer's IT infrastructure. After creation, the technical user can be added to the Scopevisio company as usual and provided with the required licences and rights.
Generation of access tokens
An access token is required to use the REST API with a user. This can be created using the command line or Swagger UI.
Create token via command line (curl)
An access token for the REST API can be created using the command line. The following example command with curl is used to create an access token for a user:
curl -X 'POST' 'https://appload.scopevisio.com/rest/token' -d 'grant_type=password&customer=<7-digit-cusomer-number> &username=<user-email>&password=<user-password>&organisation=<organisation-name>'
The placeholders <7-digit-cusomer-number>, <user-email>, <user-password> and <organisation-name> must be replaced with the corresponding values.
In addition to the short-lived access token, the response to the request also contains a long-lived refresh token, which can be used in future to update expired access tokens. This prevents the entry of user names and passwords in applications for automation. Further information on this can be found in the documentation for the /token endpoint.
Create token using Swagger UI
Alternatively, an access token for the REST API can also be created using our Swagger UI. To do this, the required mandatory fields customer, username, organisation and password are filled in for the /token end point and the call is started using "Execute".
Call REST API endpoint
The Scopevisio REST API can now be addressed using the access token. A documentation of the endpoints can be found in our Swagger UI.
For example, calling the endpoint /myaccount provides information about the active user.
curl -X 'GET' \ -H 'accept: */*' \ -H 'Authorisation: Bearer <ACCESS TOKEN>' \ 'https://appload.scopevisio.com/rest/myaccount'
Invalidate access tokens
To invalidate the generated tokens, log in to the customer lounge at https://appload.scopevisio.com/apps/public/login.html with your access data and navigate to "My REST API clients". The generated tokens are listed here and can be cancelled.
