# API

All components of the Service Lifecycle Management have a REST API. More details about the individual APIs are described below.

# Authentication

All APIs are secured using token-based authentication via Keycloak. To get a access token from Keycloak, the request below can be used. It will return a JSON containing a filed access_token. This token must be used for authentication on the component APIs.

ATTENTION

<<your-slm-host>>, <<your-username>> and <<your-password>>must be replaced!

curl --request POST \
  --url http://<<your-slm-host>>:7080/auth/realms/fabos/protocol/openid-connect/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data client_id=ui \
  --data grant_type=password \
  --data username=<<your-username>> \
  --data password=<<your-password>>

# Components

# AWX

Version: 15.0.1
The REST API of AWX is reachable under the following URL http://<<your-slm-host>>:80/api/v2. AWX is one of the open source upstream projects for Red Hat Ansible Automation Platform (opens new window). The commercial variant of RedHat is Ansible Tower. Therefore, information on how to use the AWX REST API can be found in the Ansible Tower API Guide (opens new window).

# Consul

Version: 1.13.2
The REST API of Consul is reachable under the following URL http://<<your-slm-host>>:8500/v1. Further information on how to use des Consul REST API can be found in the API docs of Consul.

# Keycloak

Version: 19.0.3
The REST API of Keycloak is reachable under the following URL http://<<your-slm-host>>:7080/auth. For configuration Keycloak has a Admin REST API, which is described here.

# BaSyx AAS Registry

Version: 1.2.0
The REST API of BaSyx AAS Registry is reachable under the following URL http://<<your-slm-host>>:4000/registry. API documentation is available on SwaggerHub: https://app.swaggerhub.com/apis/BaSyx/BaSyx_Registry_API/v1#/ (opens new window)

# BaSyx AAS Server

Version: 1.2.0
The REST API of BaSyx AAS Server is reachable under the following URL http://<<your-slm-host>>:4001/aasServer. API documentation is available on SwaggerHub: https://app.swaggerhub.com/apis/BaSyx/basyx_asset_administration_shell_repository_http_rest_api/v1 (opens new window)

# BaSyx AAS GUI

Version: v230113
The web interface of the BaSyx/Fraunhofer AAS GUI (opens new window) is reachable under http://<<your-slm-host>>:3000.

# Notification Service

The REST API of the Service Registry is reachable under the following URL http://<<your-slm-host>>:9001. API documentation is available via Swagger http://<<your-slm-host>>:9001/swagger-ui/index.html. When requests are made via the Swagger UI, an Authorization is required via the "Authorize" button. If spring_oauth is used, it will redirect to the Keycloak login page.

# Resource Registry

The REST API of the Service Registry is reachable under the following URL http://<<your-slm-host>>:9010. API documentation is available via Swagger http://<<your-slm-host>>:9010/swagger-ui/index.html. When requests are made via the Swagger UI, an Authorization is required via the "Authorize" button. If spring_oauth is used, it will redirect to the Keycloak login page.

# Service Registry

The REST API of the Service Registry is reachable under the following URL http://<<your-slm-host>>:9020. API documentation is available via Swagger http://<<your-slm-host>>:9020/swagger-ui/index.html. When requests are made via the Swagger UI, an Authorization is required via the "Authorize" button. If spring_oauth is used, it will redirect to the Keycloak login page.

# Vault

Version: 1.11.11
The REST API of Keycloak is reachable under the following URL http://<<your-slm-host>>:8200/v1. Further information on how to use des Consul REST API can be found in the API docs of Vault.

# Postman

In order to simplify the use of the API, there is a public Postman workspace (opens new window). The requests can be viewed without a Postman account. For sending requests, an account and a locally installed Postman desktop client (opens new window) are required:

  1. Login to your Postman account
  2. Open the Postman workspace (opens new window) of the Service Lifecycle Management
  3. Select Collections tab on the left and fork collection Service Lifecycle Management by right-clicking the collection and select Create a fork
  4. Enter the required details and hit Fork Collection
  5. Your selected Postman workspace will open and show the forked collection. Select Environments tab on the left and press Import. A dialog will show up and ask to Upload Files:
  6. Select the file postman-env.json generated by the Config Exporter. The file wil be parsed to an environment with the name schema SLM - <<your-slm-hostname>>. Press the Import button to finally import the environment.
  7. To perform the request of the forked collection against your Service Lifecycle Management instance you need to select the imported environment in the upper right corner: