Guide to authenticate your API calls to VSM

LeanIX VSM uses OAuth2 to authenticate users to access any of the available APIs. The following flow describes, how an API Token is used to retrieve a Bearer Token. Administrators can generate one or more API Tokens in the Administration of LeanIX VSM, which have expiry data until they can be used. To get an API Token go to Administration> Technical Users > New Technical User.

An example of how to use the technical user token for acquiring an access token can be seen in the following snippet.

To get the hostparameter just copy it from your workspace URL:

curl --request POST \
  --url https://<host>.leanix.net/services/mtm/v1/oauth2/token \
  -u apitoken:<API Token from the technical user panel> \
  --data grant_type=client_credentials