Mage Pro API overview
Mage Pro offers two main APIs for managing your workflows and infrastructure:
- Mage Cloud API: Used to manage and update your Mage clusters from the Mage Cloud Portal.
- Mage Pro Cluster API: Runs on your Mage Pro cluster and is similar to the Mage OSS API, used to manage pipelines, runs, variables, and other resources.
Mage Cloud API
The Mage Cloud API is a private API used internally by the Mage Cloud Portal to manage Mage Pro clusters. It supports operations such as:
- Starting, stopping, and restarting clusters
- Updating cluster environment variables and configurations
Base URL
https://cloud.mage.ai/api/v1
Authentication
To interact with the Mage Cloud API, you must first authenticate with your Mage Cloud credentials and obtain a session token.
Example: Initialize session and get token
Start or Stop a Cluster
Once authenticated, you can update the cluster status by modifying the replicaCount and status in the cluster’s config.
Example: Start or Stop a Cluster
Example usage
Update Cluster Environment Variables
To add or update environment variables in a Mage Pro cluster, modify the extraEnvs
field in the cluster config.
Example: Update Environment Variables
Example usage
Mage Pro cluster API
The Mage Pro Cluster API is the set of HTTP APIs available on your running Mage Pro cluster. It extends the Mage OSS API and allows:
- Create/Get/Update/Delete pipelines/blocks
- Trigger pipelines
- CRUD pipeline schedules/triggers
- CRUD pipeline runs
- CRUD workspaces
- Deploy git commits
- More APIs available in Mage Pro UI
Base URL
https://<your-cluster-hostname>/api
For the full list of cluster API endpoints, see the Mage Open Source API Reference.
Note: Mage Pro may expose additional admin or authentication APIs depending on your deployment and licensing tier.