The saagieapi python package implements python API wrappers to easily interact with the Saagie platform in python.


pip install saagieapi==<version>

Compatibility with your Saagie platform#

Saagie platform version

saagie-api release

< 2.2.0

< 0.6.0

>= 2.2.0

>= 0.6.0

>= 2023.01

>= 2.4.0

>= 2023.02

>= 2.6.0

>= 2023.03

>= 2.7.0

>= 2023.04

>= 2.9.0


Connecting to your platform#

There are 2 options to connect to your platform :

  1. using the default constructor :

saagie = SaagieApi(url_saagie="<url>",
  1. Using the easy_connect alternative constructor which uses the complete URL (eg: and will parse it in order to retrieve the platform URL, platform id and the realm.

saagie = SaagieApi.easy_connect(url_saagie_platform="<url>",

Using the different endpoints#

Once connected with one of the 2 methods explained above, you can now use the different endpoints to interact with:

  • platform :, see Platform for the details

  • projects :, see Projects for the details

  • jobs :, see Jobs for the details

  • apps :, see Apps for the details

  • pipelines :, see Pipelines for the details

  • environment variables :, see Environment Variables for the details

  • docker credentials :, see Docker Credentials for the details

  • storages :, see Storages for the details

  • repositories :, see Repositories for the details

  • Technologies:, see Technologies for the details

  • users:, see Users for the details

  • profiles:, see Profiles for the details

  • Groups:, see Groups for the details

  • Conditions:, see Conditions for the details

Finding your platform, project, job and instances ids#

Your Saagie projects homepage has the following structure https://<REALM><PLATFORM_ID>/
would give :
    - platform_id = 1
    - realm = mysaagie

Project id can be found in the project URL after the /project
would give :
    - project_id = 8321e13c-892a-4481-8552-5be4b6cc5df4

Job id can be found in the project URL after the /job
would give :
    - job_id = a85ac3db-bca1-4f15-b8f7-44731fba874b

App id can be found in the project URL after the /app
would give :
    - app_id = 02c01d47-8a29-47d0-a53c-235add43c885

Pipeline id can be found in the project URL after the /pipeline
would give :
    - pipeline_id = 4da29f25-e7c9-4410-869e-40b9ba0074d1

Job instance id can be found in the project URL after the /instances
would give :
    - job_instance_id = 6ff448ae-3770-4639-b0f8-079e5c614ab6

Condition id and condition instance id can be found when you use

res = saagieapi.pipelines.get_instance(pipeline_instance_id="pipeline_instance_id")
condition_id = res["pipelineInstance"]["conditionsInstance"]["conditionNodeId"]
condition_instance_id = res["pipelineInstance"]["conditionsInstance"]["id"]