Skip to main content

Sequentum Cloud API Usage

The Sequentum Cloud API is designed for simplicity and ease of use, enabling users to integrate and interact with their agents seamlessly without going through the Sequentum dashboard. The following API calls are available:

List all agents for the user

List agent details

Start an agent

List all runs for the agent

Stop a run

List all files for a run

Download a run file

Authentication

The API requires authentication which must be configured in the Sequentum Cloud. You must add an API Key to a user account in the Sequentum Cloud, and then use this API Key in all API calls. We recommend you to create a dedicated user account for the API Key.

Follow the below steps to create an API Key. Only administrators can create access tokens:

  1. Open the Users page and select Manage API Keys in the context menu for the user you want to give API access.

  1. Click the New API Key button and create a new key.

  1. API keys have a default expiration of one year from the current date. You can modify or extend the expiry date as needed. Additionally, add optional descriptions to each key for improved management and traceability. 

  2. A dialog box will appear for copying the API Key. Carefully copy the key as it will not be displayed again. Once copied, click "OK". Lost API keys cannot be recovered. You must delete the existing key and generate a new one if it is lost.

image-20250115-205956.png

The API Key must be added to every API request header. The following request shows how the API Key is added to the Authorization header.

GET /api/v1/agent/all HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey xxxxxxxxxxx

List all agents for Organization and the user

GET api/v1/agent/all

This API endpoint grants access to the organization's agent inventory as well as the user's personal space agent inventory. It returns a list of all agents accessible to the authenticated user, along with detailed information for each agent.

Example:

  • API Request

  • Python API Request

GET /api/v1/agent/all HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey xxxxxxxxxxx

import requests

api_key = "xxxxxxxxxxx"

url = "https://dashboard.sequentum.com/api/v1/agent/all"

headers = {"Authorization": f"ApiKey {api_key}"}

response = requests.get(url, headers=headers)

print(response.text)

Output:

Sample of output.

{

        "agentTemplates": null,

        "configType": 1,

        "description": null,

        "documentation": null,

        "icon": null,

        "image": null,

        "inputParameters": {},

        "id": 2537,

        "isActive": false,

        "lastActivity": null,

        "name": "steam",

        "proxyPoolId": null,

        "spaceId": null,

        "startUrl": null,

        "status": null,

        "userId": 289,

        "validationStatus": 3,

        "version": 1,

        "created": "0001-01-01T00:00:00",

        "updated": "0001-01-01T00:00:00"

    },

List agent details

GET  api/v1/agent/{agentId}

This API call returns comprehensive details for a specified agent in the Sequentum Cloud. The response includes the agent's ID, name, space ID, input parameters, and descriptive, etc. The Id parameter serves as the unique identifier for the agent. This endpoint is commonly used to obtain detailed information about individual agents.

  • agentId : The ID of the agent of which you want to get details.

Example:

  • API Request

  • Python API Request

GET /api/v1/agent/1596 HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey xxxxxxxxxxx

import requests

api_key = "xxxxxxxxxxx"

url = "https://dashboard.sequentum.com/api/v1/agent/1596"

headers = {"Authorization": f"ApiKey {api_key}"}

response = requests.get(url, headers=headers)

print(response.text)

Output:

{

    "agentTemplates": null,

    "configType": 1,

    "description": null,

    "documentation": null,

    "icon": null,

    "image": null,

    "inputParameters": {},

    "id": 2537,

    "isActive": false,

    "lastActivity": "0001-01-01T00:00:00",

    "name": "steam",

    "proxyPoolId": 5,

    "spaceId": null,

    "startUrl": "https://store.steampowered.com/charts/mostplayed ",

    "status": null,

    "userId": 289,

    "validationStatus": 3,

    "version": 1,

    "created": "2024-12-27T11:39:53.008502Z",

    "updated": "2024-12-27T11:39:53.008502Z"

}

Start an agent

POST api/v1/agent/{agentId}/start

Body: { "inputParameters": { "param1": "value1", "param2": "value2" }, "parallelism": 1, "parallelMaxConcurrency": 2, "parallelExport": “Combine”, "proxyPoolId": 123, "isExclusive": false, "isWaitOnFailure": true, "logLevel": "Info", "logMode": "Normal" }

Starts a new execution of the specified agent using the provided configuration parameters.

  • agentId (Required ):The ID of the agent that you want to start the run for. This is a required parameter.

  • inputParameters (optional - default value is an empty list) - A list of name/value pairs that will be passed to the agent as input parameters.

  • parallelism (optional - default value is an empty): The number of sessions you wish to start for the agent run.

  • parallelMaxConcurrency (optional - default value is an empty): The maximum number of concurrent sessions that you want to be started at the same time.

  • parallelExport (optional - default value is an “Combined”):Defines how the agent's output should be exported during parallel execution. The default value is 'Combined.' Supported parameter values are:

    • Combined

    • Separated

  • proxyPoolId (optional - default value is an empty):The ID of the proxy pool you want the agent to use for this run.

  • isExclusive (optional - default value is an empty): This is a boolean parameter (true/false) that specifies whether the agent run should be exclusive, ensuring no other agents can run in parallel on the same resources.

  • isWaitOnFailure  (optional - default value is an empty) : This boolean parameter (true/false) specifies whether the agent should wait upon failure before attempting a retry or taking further action.

  • logLevel  (optional - default value is “info”): Specifies the level of logging for the run. Options include: Fatal, Error, Warning, Info.

  • logMode  (optional - default value is “Text ”): Defines the mode in which logs will be captured during the run. The options could include:  text, Text and HTML.

Example:

  • API Request

  • Python API Request

POST /api/v1/agent/2415/start HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey xxxxxxxxxxx

Content-Type: application/json

Content-Length: 313

{

    "inputParameters": {

        "param1": "value1",

        "param2": "value2"

    },

    "parallelism": 10,

    "parallelMaxConcurrency": 2,

    "parallelExport": “Combined”,

    "proxyPoolId": 123,

    "isExclusive": false,

    "isWaitOnFailure": true,

    "logLevel": "Info",

    "logMode": "Text"

}

import requests

import json

url = "https://dashboard.sequentum.com/api/v1/agent/2415/start"

payload = json.dumps({

  "inputParameters": {

    "param1": "value1",

    "param2": "value2"

  },

  "parallelism": 10,

  "parallelMaxConcurrency": 2,

  "parallelExport": True,

  "proxyPoolId": 123,

  "isExclusive": False,

  "isWaitOnFailure": True,

  "logLevel": "Info",

  "logMode": "Text"

})

headers = {

  'Authorization': 'ApiKey xxxxxxxxxxx',

  'Content-Type': 'application/json'

}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

List all runs for the agent

GET  api/v1/agent/{agentId}/runs

This endpoint provides access to the complete execution history for a given configuration, returning a list of all recorded runs. The results are presented in descending order of execution time, with the most recent records listed first.

  • agentId (Required): The ID of the agent of which you want to get the details of all the runs.

Example:

  • API Request

  • Python API Request

GET /api/v1/agent/1596/runs HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey xxxxxxxxxxx

import requests

url = "https://dashboard.sequentum.com/api/v1/agent/1596/runs"

payload = {}

headers = {

  'Authorization': 'ApiKey xxxxxxxxxxx'

}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Output:

{

        "id": 22552,

        "configId": 1596,

        "configName": "test",

        "spaceId": 0,

        "organizationId": 78,

        "organizationName": null,

        "sequence": 40,

        "parallelism": 1,

        "parallelMaxConcurrency": 1,

        "parallelExport": "Combined",

        "parallelSet": 0,

        "startTime": "2024-12-18T13:08:49.748151Z",

        "endTime": "2024-12-18T13:08:50.282404Z",

        "created": "2024-12-18T13:08:49.738682Z",

        "status": 9,

        "message": null,

        "configVersion": null,

        "actionCount": 1,

        "pageCount": 1,

        "dynamicPageCount": 0,

        "requestCount": 1,

        "dataCount": 42,

        "inputCount": 0,

        "errorCount": 0,

        "exportCount": 42,

        "traffic": 5463,

        "runTimeSec": 1,

        "serverName": "172.31.28.159:80",

        "tableType": "run"

    }

Stop a run

POST api/v1/agent/{agentId}/run/{runId}/stop

Stops a specific running agent instance. This endpoint provides the capability to stop an agent execution in progress. By specifying the agent's ID (`{id}`) and the corresponding run ID (`{runId}`), administrators can precisely control and terminate individual agent instances as needed.

  • agentId (Required): The ID of the agent to stop its run.

  • runId (Required): The ID of the run of the agent which you want to stop.

Example:

  • API Request

  • Python API Request

POST /api/v1/agent/2415/stop HTTP/1.1

Host: http://dashboard.sequentum.com                                         

Authorization: ApiKey xxxxxxxxxxx

import requests

url = "https://dashboard.sequentum.com/api/v1/agent/2415/stop"

payload = {}

headers = {

  'Authorization': 'ApiKey xxxxxxxxxxx'

}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

List all files for a run

GET  api/v1/agent/{agentId}/run/{runId}/files

This endpoint retrieves data files for a given agent run and provides details of the data files generated by that agent run.

  • agentId (Required): The ID of the agent to get the files of its particular run.

  • runId (Required): The ID of the run of the Agent ID of which file details are to be extracted. 

Example:

  • API Request

  • Python API Request

GET /api/v1/agent/1596/run/22552/files HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey sk-wBBcUnKTXBlvM1Jk7dT-J

import requests

url = "https://dashboard.sequentum.com/api/v1/agent/1596/run/22552/files"

payload = {}

headers = {

  'Authorization': 'ApiKey sk-wBBcUnKTXBlvM1Jk7dT-J'

}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Output:

[

    {

        "id": 10379,

        "regionId": null,

        "fileType": 1,

        "name": "test.csv",

        "fileSize": 3020,

        "created": "2024-12-18T13:08:50.257404Z"

    },

    {

        "id": 10380,

        "regionId": null,

        "fileType": 6,

        "name": "test.log",

        "fileSize": 45008,

        "created": "2024-12-18T13:08:50.260296Z"

    }

]

Download a run file

GET  api/v1/agent/{agnetId}/run/{runId}/file/{fileId}/download

Downloads a specific file associated with an agent run. This endpoint allows retrieval of individual files generated during a specific agent execution.

  • agentId (Required): The ID of the agent to get the files of its particular run.

  • runId (Required): The ID of the run of the Agent ID of which file is to be extracted. 

  • fileId (Required): The ID of the File which you want to download.

Example:

  • API Request

  • Python API Request

GET /api/v1/agent/1596/run/22552/file/10379/download HTTP/1.1

Host: http://dashboard.sequentum.com

Authorization: ApiKey sk-wBBcUnKTXBlvM1Jk7dT-J

import requests

url = "https://dashboard.sequentum.com/api/v1/agent/1596/run/22552/file/10379/download"

payload = {}

headers = {

  'Authorization': 'ApiKey sk-wBBcUnKTXBlvM1Jk7dT-J'

}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Output:

"Product Name","Part Number","Category","Qty"

"Russell Brake Bleeder Screw 639590","639590","Brake Bleeder Screw",51

"Russell Brake Bleeder Screw 639520","639520","Brake Bleeder Screw",56

"Russell Brake Bleeder Screw 639600","639600","Brake Bleeder Screw",78

"Russell Brake Bleeder Screw 639580","639580","Brake Bleeder Screw",13

"Russell Brake Bleeder Screw 639570","639570","Brake Bleeder Screw",23

"Russell Brake Bleeder Screw 639530","639530","Brake Bleeder Screw",39

"Russell Brake Bleeder Screw 639630","639630","Brake Bleeder Screw",67

"Russell Brake Bleeder Screw 639610","639610","Brake Bleeder Screw",64

"Russell Brake Bleeder Screw 639540","639540","Brake Bleeder Screw",59

"Russell Brake Bleeder Screw 639560","639560","Brake Bleeder Screw",3

"Russell Brake Bleeder Screw 639550","639550","Brake Bleeder Screw",61

Swagger

The Swagger documentation provides a convenient way of testing API calls.

Click here to view the API Calls on Swagger.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.