Welcome to the SAP LeanIX Scripts Hub. This repository contains Python scripts that allow you to optimize your workflows for LeanIX. Using these scripts, you can automate recurring tasks, reduce manual processes, and enable your team to focus on strategic goals.
To use the scripts in this repository effectively, you should have a basic knowledge of:
- Python and its libraries
- APIs in general and especially SAP LeanIX APIs
- GraphQL
- Running and deploying scripts
Most of the scripts need a few prerequisites to be used to their full extent. Every script requires an API Token and the Subdomain (e.g. demo-eu-1) of the workspace your changes are to be made in. In some cases an input file is also required, which too needs to be specified beforehand.
Each of these values are generally defined through environmental variables, but for the specific syntax please refer to the separate README of each script.
To authenticate your requests to LeanIX APIs, you need an access token. To learn how to obtain an access token, see Authentication to LeanIX Services in our developer documentation.
To create an API token, you need to have admin access to your LeanIX workspace to create a Technical User.
Prepare your environment by installing the necessary dependencies. Follow these steps:
- Install Python.
- Install required libraries for the script itself. For this information, please refer to the script specific README.
- Prepare your SAP LeanIX workspace and provide necessary input files.
The scripts in this repository cover a wide range of typical use cases for the LeanIX application. Use these scripts as a starting point to build custom integrations tailored to your organization's needs.
Depending on the script, you may want to run it on a schedule or in response to certain events. You can do it using various methods, such as cron jobs on Linux, Task Scheduler on Windows, or cloud-based solutions such as Azure Functions or AWS Lambda.
To get started, follow these steps:
-
Set up configuration: As mentioned, some scripts may require a configuration file or environment variables to work correctly. Make sure to fill these with your specific values. Further instructions are also provided in the script specific READMEs.
-
Run the script: Once everything is set up, you can run the script using the commands provided in the README of the scripts.
-
Understand the output: Each script may output data differently. Some might print data to the console, while others might write data to a file. Make sure to understand how the particular script you're using works.
Found an issue or need help? Open an issue in this repository.
If you need further assistance, please contact LeanIX Support.
Visit the LeanIX Developer Documentation to learn how to get started with custom integrations, explore LeanIX APIs, and view practical examples for typical tasks in our tutorials.
Also join the Community group for developers to never miss out on news and to connect with fellow developers.