Documentation
🚀 Quickstart Guides
Manage automation using APIs

Managing flows with APIs

Each of the flow can be seamlessly triggered/managed using our Rest APIs.

🔔

For every flow, the Integration guide with expected data schema is dynamically generated

Upload Assets (Optional)

If there are any assets/files that your flow requires, you can upload them using the upload API. If you don't want us to keep your files for long, you can set isTemp=true in the URL. If you skip this query parameter, the default behavior will be to keep the files for a longer period.

import requests
 
assetsUploadUrl = "https://api.vishwa.ai/v1/assets/upload"
isTemp = False  # Set to True if you don't want us to keep your files for long
url = f"{assetsUploadUrl}?temp={isTemp}"
headers = {
    'XP-API-Key': "<token>",  # Replace <token> with your actual API key
}
files = {
    'files': ('<filename>.jpg', open('<filename.jpg', 'rb'), 'image/jpeg')  # Modify the file details as needed
}
 
response = requests.post(url, headers=headers, files=files)

Start Run API

Run trigger API follows the below generic schema

import requests
url = "https://api.vishwa.ai/v1/workflow/<id>/start-run"
 
payload = { # Schema of payload is available in Integrate panel
    "<input_1>": "<value>",
    "override_config": {
        "<node_id_1>": "<value>",
        ....
    }
}
 
 
headers = {
    'XP-API-Key': "<token>"
    'Content-Type': 'application/json'
}
 
# Making a POST request
response = requests.post(url, json=payload, headers=headers)
 

The platform contains a detailed guide panel

Monitor Status

State of the run can be monitored using /status endpoint

import requests
url = "https://api.vishwa.ai/v1/workflow/<id>/run/<run_id>/status"
 
headers = {
    'XP-API-Key': "<token>"
    'Content-Type': 'application/json'
}
 
# Making a POST request
response = requests.get(url, headers=headers)
 
# Response Format
#   {
#       "run_id": "string",
#       "run_start_time": "string",
#      "run_status": "string",
#       "run_type": "string"
#   }
 

Monitor Workflow

Talk to us

Schedule a demo with us @ https://cal.com/vishwa-ai/talk-to-us (opens in a new tab)

Or contact us at [email protected] for more details

For more detailed information, visit vishwa.ai (opens in a new tab).

How to define and run an automation?