APIs

VSM provides powerful and dev-friendly APIs to integrate VSM seamlessly into your DevOps toolchain.

LeanIX VSM plans to provide two types of APIs - a REST-based API to import data, and a GraphQL API to access and manage the data in the catalogs.

Authorization - Getting a Bearer Token

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:

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

Discovery API

The Discovery API can be used to import data into the catalog, enabling our users to integrate with systems for which no out-of-the-box integration is available.

Importing Services and CycloneDX SBOM files

:bulb: Early Access

This endpoint is in early access. To find more information about the release stages of our APIs & integrations, see Release Stages.

API Documentation
Refer to: https://docs-vsm.leanix.net/reference/discovery_service.

A tangible example of how to use the API to import services and their software libraries can be found in the tutorials section.

To understand how to plainly bring in services, check out this tutorial: https://docs-vsm.leanix.net/docs/importing-services

Importing Products

:bulb: Early Access

This endpoint is in early access. To find more information about the release stages of our APIs & integrations, see Release Stages.

API Documentation
Refer to: https://docs-vsm.leanix.net/reference/discovery_product.

Importing Events

:bulb: Early Access
This endpoint is in early access. To find more information about the release stages of our APIs & integrations, see Release Stages.

API Documentation
Refer to: https://docs-vsm.leanix.net/reference/dora

GraphQL API

:bulb: Early Access

This endpoint is in early access. To find more information about the release stages of our APIs & integrations, see Release Stages.

The GraphQL API gives you access to VSM knowledge graph (i.e., all the information about teams, persons, services, libraries, products and their relations). Exactly the same information we use to build our VSM UI. To access the GraphQL API, please use the GraphiQL Explorer available right in the VSM Workspace under Administration> Developer Tools. There, you can run queries and mutations of the data stored in VSM.

2274

Access the VSM GraphQL API via GraphiQL right from the workspace