API Access

The ACC provides access to basic functionality through an API. The following API calls are available.

Authentication

The API requires authentication which must be configured in the ACC Web Portal. You must add an access token to a user account in the ACC, and then use this access token in all API calls. We recommend you create a dedicated user account for API access. You cannot add an access key to a Super Admin user.

Follow these steps to create an API access token. Only administrators can create access tokens.

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

ApiAccess.png

2. Click Add Access Token and create a new token. A date can be specified as to when the Access Token will expire.

3. Copy the access token from the list or select Copy to Clipboard from the context menu.

apiToken.png

The authentication token must be added to every API request headers. The following request shows how the access token is added to the Authorization header.

GET /api/agent?agentPath=sequentum/Test2/quick HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Cache-Control: no-cache
accept-encoding: gzip, deflate
Connection: keep-alive

Get agent details from repository

GET api/agent?agentPath={agentPath}

Returns information about an agent's Id, name, directory Id, and description in the ACC Repository. The agentPath is a full path to an agent.

This API call is often the first call you'll make, so you can get the Agent ID which is used in many of the other API calls.

Example:

GET https://acc.sequentum.com/api/agent?agentPath=sequentum/Test2/quick

Output:

{
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"name": "quick",
"directoryId": "45e52cf1-b2a1-4f37-b670-4582c08a8df8",
"description": null
}

Start agent on cluster

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

or

POST api/agent/cluster/start?agentPath=agentPath

Body: {"sessionId":"sessionId", "logLevel": 0|1|2|3, "isProductionRun": true|false, "inputParameters": "{\"name1\":\"value1\",\"name2\":\"value2\"}", "inputFiles": ["input1.csv", "input2.csv"], "isDeleteInputFilesOnCompleted": false, "useMultipleSessions": true}

Starts an agent run on the cluster where the agent is deployed.

agentId - The ID of the agent to start.

agentPath - The path to the agent in the Agent Repository. For example: sequentum/Test1/Test-Agent.

sessionId (optional - default value is empty) - The session ID to start. The agent must support sessions.

logLevel (optional - default value is 1) - The log detail level. 0 means no logging and 3 is the highest detail level.

isProductionRun (optional - default value is true) - Data delivery and email notifications are turned off for non-production runs.

inputParameters (optional - default value is an empty list) - name/value pairs to use as agent input parameters.

inputFiles (optional - default value is an empty list) - Input files to use for this run. The input files must have been previously uploaded. Input files are provided to the agent as input parameters with the names "input_file_1", "input_file_2", ...

Note: The supported input file formats are .csv and .txt and also the agent needs to be configured with the recommended changes below so that the agent can accept any newly uploaded files and use the newly uploaded file inputs in the agent data provider command.

  • When an input CSV/txt file is used, add an Input Parameter named "input_file_1" with a path to the input file. Then, on the data provider command, use [input_file_1] as the CSV input file path. The square brackets instruct the data provider to look for the file path in the specified input parameter.

Agent-Settings-Example.png

isDeleteInputFilesOnCompleted (optional - default value is false) - Deletes the specified input files when the agent run has completed successfully or has been manually set to failed.

useMultipleSessions (optional - default value is false) - Automatically starts new sessions, allowing multiple instances of the same agent to run simultaneously. The sessionId must be empty, and the agent must be configured to support multiple sessions. The agent should be configured to remove sessions immediately on success and session timeout should be set to a long period of time such as 10800 minutes (one week). A value of 10800 minutes will give you one week to rerun or retry a failed agent run before the session is deleted.

isSynchronous (optional - default value is false) - If true, the call will not return before the run has completed.

synchronousTimeout (optional - default value is 60) - The maximum number of seconds an agent is allowed to run synchronously before the agent is stopped and the call returns. The default value is 60.

synchronousDataDelivery (optional - default value is None) - Specifies if this call returns extracted data when run asynchronously. The value can be None, Plain or Zip. The agent run IDs will be returned as normal when this option is set to None. Plain text data will be returned when the option is set to Plain. When returning plain text, only data from the first data file will be returned when an agent exports more than one data file. A ZIP file with ALL data files will be returned when this option i set to Zip.

Example:

POST http://acc.sequentum.com/api/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/cluster/start

Body:

{"logLevel":1, "isProductionRun": true, 
"inputParameters": "{\"input1\":\"my input 1\",\"input2\":\"my input 2\"}"}

Output:

{"agentRunHistoryIds": ["a2f6782850-7c89-4e05-a30a-034aa980ee6c"]}

agentRunHistoryIds - A list of IDs that identify the agent runs that have started. The list will always consist of a single ID unless performance sessions are used.

The call may return extracted data instead of the run IDs if the option synchroneousDataDelivery is set to Plain or Zip.

Restart run

POST api/run/{agentRunHistoryId}/restart

Restarts a specific agent run.

Example:

POST https://acc.sequentum.com/api/run/9040f86d-bbc1-4038-9868-501145cc2370/restart

Retry run

POST api/run/{agentRunHistoryId}/retry?RunMethod=ContinueAndRetryErrors

Retries errors for a specific agent run. This method requires a RunMethod query parameter set to one of these below:

  • Restart
  • Continue
  • ContinueRefreshAgent
  • ContinueAndRetryErrors
  • ContinueAndRetryErrorsRefreshAgent
  • New

The default value is ContinueAndRetryErrorsRefreshAgent.

Example:

POST https://acc.sequentum.com/api/run/9040f86d-bbc1-4038-9868-501145cc2370/retry?RunMethod=ContinueAndRetryErrors

Get agent run details

GET api/run/{agentRunHistoryId}

Returns information about the specified agent run.

Example:

GET https://acc.sequentum.com/api/run/9040f86d-bbc1-4038-9868-501145cc2370

Output:

{
"agentRunHistoryId": "9040f86d-bbc1-4038-9868-501145cc2370",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"sessionId": null,
"runId": 0,
"agentJobScheduleId": null,
"serverIp": "127.0.0.1",
"startTime": "2019-05-21T13:52:14.3020127+10:00",
"endTime": "2019-05-21T13:52:23.6568249+10:00",
"expectedEndTime": null,
"runTime": "00:00:08.9677836",
"status": 4,
"successActionCount": 1,
"dynamicSuccessActionCount": 1,
"volume": 25,
"pageLoadCount": 1,
"requestCount": 33,
"downloadCount": 0,
"errors": 0,
"dataCount": 1,
"deliveryCount": 0,
"statusMessage": "Completed",
"logPath": "quick-2019_05_21-01_52_14.log",
"inputParameters": null,
"logLevel": 1,
"isWindowLess": true,
"isProductionRun": false,
"backupDataExpiry": null,
"lastUpdated": "2019-05-21T13:52:23.656843+10:00"
}

Run status can be one of the following values:

0 - Never Run
1 - Starting
2 - Running
3 - Delivery
4 - Succeeded
5 - Failed
6 - Stopped
7 - Failure

Get agent run history

GET api/agent/{agentId}/history?count={count}

Returns information about the latest agent runs. Run history includes information about active agent runs. The latest 100 agent runs are returned if count is not specified.

Example:

GET https://acc.sequentum.com/api/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/history?count=1

Output:

[
{
"agentRunHistoryId": "9040f86d-bbc1-4038-9868-501145cc2370",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"sessionId": null,
"runId": 0,
"agentJobScheduleId": null,
"serverIp": "127.0.0.1",
"startTime": "2019-05-21T13:52:14.3020127+10:00",
"endTime": "2019-05-21T13:52:23.6568249+10:00",
"expectedEndTime": null,
"runTime": "00:00:08.9677836",
"status": 4,
"successActionCount": 1,
"dynamicSuccessActionCount": 1,
"volume": 25,
"pageLoadCount": 1,
"requestCount": 33,
"downloadCount": 0,
"errors": 0,
"dataCount": 1,
"deliveryCount": 0,
"statusMessage": "Completed",
"logPath": "quick-2019_05_21-01_52_14.log",
"inputParameters": null,
"logLevel": 1,
"isWindowLess": true,
"isProductionRun": false,
"backupDataExpiry": null,
"lastUpdated": "2019-05-21T13:52:23.656843+10:00"
}
]

Run status can be one of the following values:

0 - Never Run
1 - Starting
2 - Running
3 - Delivery
4 - Succeeded
5 - Failed
6 - Stopped
7 - Failure

Start job

POST api/job/{agentId}/start

Body: {"sessionId":"sessionId", "logLevel": 0|1|2|3, "isProductionRun": true|false, "inputParameters": "{\"name1\":\"value1\",\"name2\":\"value2\"}", "inputFiles": ["input1.csv", "input2.csv"], "isDeleteInputFilesOnCompleted": true|false}

Starts an agent job run. A job keeps track of all runs started by the job, so it's often used together with performance sessions. Multiple job for the same agent cannot run simultaneously.

agentId - The ID of the agent to start.

sessionId (optional - default value is empty) - The session ID to start. The agent must support sessions.

logLevel (optional - default value is 1) - The log detail level. 0 means no logging and 3 is the highest detail level.

isProductionRun (optional - default value is true) - Data delivery and email notifications are turned off for non-production runs.

inputParameters (optional - default value is an empty list) - name/value pairs to use as agent input parameters.

inputFiles (optional - default value is an empty list) - Input files to use for this run. The input files must have been previously uploaded. Input files are provided to the agent as input parameters with the names "input_file_1", "input_file_2", ...

Note: The supported input file formats are .csv and .txt and also the agent needs to be configured with the recommended changes below so that the agent can accept any newly uploaded files and use the newly uploaded file inputs in the agent data provider command.

  • When an input CSV/txt file is used, add an Input Parameter named "input_file_1" with a path to the input file. Then, on the data provider command, use [input_file_1] as the CSV input file path. The square brackets instruct the data provider to look for the file path in the specified input parameter.

Agent-Settings-Example.png

isDeleteInputFilesOnCompleted (optional - default value is false) - Deletes the specified input files when the job run has completed successfully or has been manually set to failed.

Example:

POST http://acc.sequentum.com/api/job/a2f22850-7c88-4e05-a30a-004aa980ee6c/start

Body:

{"logLevel":1, "isProductionRun": true, 
"inputParameters": "{\"input1\":\"my input 1\",\"input2\":\"my input 2\"}"}

Output:

{"agentJobHistoryId": "a2f6782850-7c89-4e05-a30a-034aa980ee6c", "jobRunId":2}

agentJobHistoryId - An ID that identifies the job run.

jobRunId - An increasing number that identifies the job run for a specific agent.

Get job run details

Returns information about the specified job run.

GET api/job/run/{agentJobHistoryId}

Example:

GET https://acc.sequentum.com/api/job/run/a2f22850-7c88-4e05-a30a-004aa980ee6c

Output:

{
"agentJobHistoryId": "6ef84ec7-d5e6-4a98-bbfa-0b67355a648f",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"startTime": "2019-05-19T15:55:47.4225218+10:00",
"endTime": "2019-05-19T15:55:58.9723817+10:00",
"totalSuccessActionCount": 1,
"totalDynamicSuccessActionCount": 1,
"totalPageLoadCount": 1,
"totalRequestCount": 33,
"totalDownloadCount": 0,
"totalVolume": 25,
"totalErrors": 0,
"totalDataCount": 1,
"totalDeliveryCount": 1,
"completedScheduleCount": 1,
"totalScheduleCount": 1,
"completedRunCount": 1,
"totalRunCount": 1,
"runId": 3,
"status": 3,
"agentJobSetting": null
}

The job status can be one of the following values:

0 - Never Run
1 - In Progress
2 - In Progress With Failure
3 - Succeeded
4 - Failure
5 - Failed

Get job run history

Returns information about the specified number of latest job runs. Job history includes information about active job runs. The latest 100 job runs are returned if the count is not specified.

GET api/job/{agentId}/history?count=1

Example:

GET https://acc.sequentum.com/api/job/a2f22850-7c88-4e05-a30a-004aa980ee6c/history?count=2

Output:

[
{
"agentJobHistoryId": "6ef84ec7-d5e6-4a98-bbfa-0b67355a648f",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"startTime": "2019-05-19T15:55:47.4225218+10:00",
"endTime": "2019-05-19T15:55:58.9723817+10:00",
"totalSuccessActionCount": 1,
"totalDynamicSuccessActionCount": 1,
"totalPageLoadCount": 1,
"totalRequestCount": 33,
"totalDownloadCount": 0,
"totalVolume": 25,
"totalErrors": 0,
"totalDataCount": 1,
"totalDeliveryCount": 1,
"completedScheduleCount": 1,
"totalScheduleCount": 1,
"completedRunCount": 1,
"totalRunCount": 1,
"runId": 3,
"status": 3,
"agentJobSetting": null
},
{
"agentJobHistoryId": "156aba0d-bb4f-4244-96ef-73d89aaa47ec",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"startTime": "2019-05-16T17:30:17.6996551+10:00",
"endTime": "2019-05-16T17:56:49.4434358+10:00",
"totalSuccessActionCount": 1,
"totalDynamicSuccessActionCount": 1,
"totalPageLoadCount": 1,
"totalRequestCount": 31,
"totalDownloadCount": 0,
"totalVolume": 25,
"totalErrors": 0,
"totalDataCount": 0,
"totalDeliveryCount": 1,
"completedScheduleCount": 1,
"totalScheduleCount": 1,
"completedRunCount": 1,
"totalRunCount": 1,
"runId": 2,
"status": 3,
"agentJobSetting": null
}
]

The job status can be one of the following values:

0 - Never Run
1 - In Progress
2 - In Progress With Failure
3 - Succeeded
4 - Failure
5 - Failed

Get agent run history for a job run

GET api/agent/{agentId}/run/{runId}/history

Returns information about all agent runs associated with a specific job run.

Example:

GET https://acc.sequentum.com/api/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/run/5/history?count=1

Output:

[
{
"agentRunHistoryId": "9040f86d-bbc1-4038-9868-501145cc2370",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"sessionId": null,
"runId": 0,
"agentJobScheduleId": null,
"serverIp": "127.0.0.1",
"startTime": "2019-05-21T13:52:14.3020127+10:00",
"endTime": "2019-05-21T13:52:23.6568249+10:00",
"expectedEndTime": null,
"runTime": "00:00:08.9677836",
"status": 4,
"successActionCount": 1,
"dynamicSuccessActionCount": 1,
"volume": 25,
"pageLoadCount": 1,
"requestCount": 33,
"downloadCount": 0,
"errors": 0,
"dataCount": 1,
"deliveryCount": 0,
"statusMessage": "Completed",
"logPath": "quick-2019_05_21-01_52_14.log",
"inputParameters": null,
"logLevel": 1,
"isWindowLess": true,
"isProductionRun": false,
"backupDataExpiry": null,
"lastUpdated": "2019-05-21T13:52:23.656843+10:00"
}
]

Run status can be one of the following values:

0 - Never Run
1 - Starting
2 - Running
3 - Delivery
4 - Succeeded
5 - Failed
6 - Stopped

Get job schedules

GET api/job/{agentId}/schedules

Returns information about all schedules associated with a Job.

Example:

GET https://acc.sequentum.com/api/job/a2f22850-7c88-4e05-a30a-004aa980ee6c/schedules

Output:

[
{
"scheduleId": "d9c944df-93a7-ea77-f7b7-fa0b9c579917",
"agentId": "a2f22850-7c88-4e05-a30a-004aa980ee6c",
"cron": "0 0 0 1",
"cronDescription": "Runs every day at 3:36:00 PM (AET).",
"sessionId": null,
"startTime": "2019-05-30T15:36:00",
"timeZoneId": "AUS Eastern Standard Time",
"nextRunTime": "2019-05-30T15:36:00+10:00",
"inputParameters": "{}",
"logLevel": 2,
"isWindowless": true,
"errorMessage": null,
"scheduleStatus": 2,
"lastRunTime": "2019-05-21T15:26:42.967476+10:00",
"completedTime": "2019-05-21T15:26:52.6831583+10:00",
"isEnabled": true
}
]

Schedule status can be one of the following values:

0 - Waiting
1 - Running
2 - Succeeded
3 - Failed

Add or update job schedule

POST /api/job/{agentId}/schedule

Body:

{"scheduleId":"b4cdc56a-2c16-4b1b-a135-b4e687f8bc95",
"cron":"0 0 0 1","sessionId":null,
"startTime":"2019-07-16T11:21:20","timeZoneId":"AUS Eastern Standard Time",
"inputParameters":"{\"par1\":\"2000\",\"par2\":\"5000\"}",
"logLevel":1,"isWindowless":true,"isEnabled":true}

Adds a new job schedule to a specified agent or updates an existing job schedule.

agentId - The ID of the agent.

scheduleId - The ID of the schedule to add.

cron - The Cron expression which specifies when and how often to run the the schedule. Please read Cron Expressions for more information about Cron syntax.

startTime - The start date and time of the schedule. Must be in the following format: yyyy-MM-ddTHH:mm:ss

timeZoneId - The time zone of the schedule. Read List of Time Zones for more details.

sessionId (optional - default value is empty) - The session ID. The agent must support sessions.

logLevel (optional - default value is 1) - The log detail level. 0 means no logging and 3 is the highest detail level.

inputParameters (optional - default value is an empty list) - name/value pairs to use as agent input parameters.

isWindowless - Specifies whether the schedule will run windowless or not.

isEnabled - Specifies whether the schedule is enabled or not.

Example:

POST https://acc.sequentum.com/api/job/0041d691-49d1-4c48-8c21-654b8e248c11/schedule

POST /api/job/0041d691-49d1-4c48-8c21-654b8e248c11/schedule HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive
{"scheduleId":"b4cdc56a-2c16-4b1b-a135-b4e687f8bc95","cron":"0 0 0 1","sessionId":null,"startTime":"2019-07-16T11:21:20","timeZoneId":"AUS Eastern Standard Time","inputParameters":"{\"par1\":\"2000\",\"par2\":\"5000\"}","logLevel":1,"isWindowless":true,"isEnabled":true}

Delete job schedule

DELETE /api/job/schedule/{scheduleId}

Deletes a specified job schedule.

scheduleId - The ID of the schedule to delete.

Example:

DELETE https://acc.sequentum.com/api/job/schedule/b4cdc56a-2c16-4b1b-a135-b4e687f8bc95

DELETE /api/job/schedule/b4cdc56a-2c16-4b1b-a135-b4e687f8bc95 HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Delete all job schedules

DELETE /api/job/{agentId}/schedules

Deletes all job schedules from a specified agent.

agentId - The ID of the agent.

Example:

DELETE https://acc.sequentum.com/api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules

DELETE /api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Start job schedule

POST api/job/schedule/{scheduleId}/start

Starts a specified job schedule.

Example:

POST https://acc.sequentum.com/api/job/schedule/d9c944df-93a7-ea77-f7b7-fa0b9c579917/start

Body: {"status": 5} 

Disable job schedule

POST /api/job/schedule/{scheduleId}/off

Disables a specified job schedule.

scheduleId - The ID of the schedule to disable.

Example:

POST https://acc.sequentum.com/api/job/schedule/3a8cc967-1158-e0ca-b1aa-d0f0eecd8d63/off

POST /api/job/schedule/3a8cc967-1158-e0ca-b1aa-d0f0eecd8d63/off HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Disable all job schedules

POST /api/job/{agentId}/schedules/off

Disables all job schedules for a specified agent

agentId - The ID of the agent.

Example:

POST https://acc.sequentum.com/api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules/off

POST /api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules/off HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Enable job schedule

POST /api/job/schedule/{scheduleId}/on

Enables a specified job schedule.

scheduleId - The ID of the schedule to enable.

Example:

POST https://acc.sequentum.com/api/job/schedule/3a8cc967-1158-e0ca-b1aa-d0f0eecd8d63/on

POST /api/job/schedule/3a8cc967-1158-e0ca-b1aa-d0f0eecd8d63/on HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Enable all job schedules

POST /api/job/{agentId}schedules/on

Enables all job schedules for a specified agent

agentId - The ID of the agent.

Example:

POST https://acc.sequentum.com/api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules/on

POST /api/job/0041d691-49d1-4c48-8c21-654b8e248c12/schedules/on HTTP/1.1
Host: acc.sequentum.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
Accept: */*
Content-Type: application/json
Accept-encoding: gzip, deflate
Connection: keep-alive

Get all logs for a specific job run

GET api/job/run/{jobRunHistoryId}/logs

Returns the log file for a specified agent run. The log file is compressed.

Example:

GET https://acc.sequentum.com/api/job/run/6ef84ec7-d5e6-4a98-bbfa-0b67355a648f/logs

Set status for latest job run

POST api/job/{agentId}/status

Body: {"status": status}

Sets the specified status on the latest job run. The following job statuses are available:

0 - Never Run
1 - In Progress
2 - In Progress With Failure
3 - Succeeded
4 - Failure
5 - Failed

Example:

POST https://acc.sequentum.com/api/job/schedule/d9c944df-93a7-ea77-f7b7-fa0b9c579917/start

Get log for a specific agent run

GET api/run/{agentRunHistoryId}/log

Returns the log file for a specified agent run. The log file is compressed.

Example:

GET https://acc.sequentum.com/api/run/9040f86d-bbc1-4038-9868-501145cc2370/log

Get all data for a specific job run

GET api/job/run/{jobRunHistoryId}/backup

Returns data files for the specified job run. The data files are compressed. The agent or Sequentum server must be configured to store backup data.

Example:

GET https://acc.sequentum.com/api/job/run/6ef84ec7-d5e6-4a98-bbfa-0b67355a648f/backup

Get data for a specific agent run

GET api/run/{agentRunHistoryId}/backup

Returns data files for a specified agent run. The data files are compressed. The agent or Sequentum server must be configured to store backup data.

Example:

GET https://acc.sequentum.com/api/run/9040f86d-bbc1-4038-9868-501145cc2370/backup

Add or update agent input data

POST api/input/agent/{agentId}/csv?name={filename}

Body: Plain text CSV content.

Adds or updates input data for an agent. Input data will be updated if data with the same name already exists. Otherwise, the input data will be added to the agent.

agentId - The ID of the agent.

filename - The name of the input data. The extension of the file name should be .csv

Example:

POST https://acc.sequentum.com/api/input/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/csv?name=input.csv

Body:

URL
http://www.sequentum.com
http://www.sequentum.com/help
http://www.sequentum.com/account 

Upload agent input files

POST api/input/agent/{agentId}/files

Uploads one or more input files for an agent using multipart/form-data formatted file data.

Note: You can upload input files in either .csv or .txt or .zip format,where a zip file can have multiple csv or txt files.

Example 1 (raw request):

The following raw request uploads a small file input2.csv.

POST http://acc.sequentum.com/api/input/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/files HTTP/1.1
Content-Type: multipart/form-data; boundary=--------------------------151786529386200587700590
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c
User-Agent: PostmanRuntime/7.13.0
Accept: */*
Cache-Control: no-cache
Postman-Token: 77633619-0f5a-4a07-9d35-1ca6083a0ac0
Host: localhost:8888
accept-encoding: gzip, deflate
content-length: 300
Connection: keep-alive

----------------------------151786529386200587700590
Content-Disposition: form-data; name="file"; filename="input2.csv"
Content-Type: text/csv

url
http://www.sequentum.com
http://www.sequentum.com/help
http://www.sequentum.com/account
----------------------------151786529386200587700590--

Example 2 (CURL):

curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c"
-F "data=@c:\test\input2.csv" 
http://acc.sequentum.com/api/input/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/files

Example 3 (.NET):

using (HttpClient httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IlJvb3QiLCJTdGFtcCI6ImNjOWNiN2JhLWM0ZjItNGM0NS05ODY4LTMxM2Y5ZDRmZjhkZiIsIm5iZiI6MTU1ODQwNTI4NiwiZXhwIjoxNTkwMDI3NjgxLCJpc3MiOiJTZXF1ZW50dW0iLCJhdWQiOiJDb250ZW50IEdyYWJiZXIifQ.2pFQY9Ag8jndcL4jBSVLm_rhsZpmXXS8nn_crqXZ85c");
MultipartFormDataContent form = new MultipartFormDataContent();
byte[] fileBytes = File.ReadAllBytes(@"c:\test\input2.csv");
form.Add(new ByteArrayContent(fileBytes, 0, fileBytes.Length), "input2", "input2.csv");
HttpResponseMessage response = httpClient.PostAsync("http://acc.sequentum.com/api/input/agent/a2f22850-7c88-4e05-a30a-004aa980ee6c/files", form).Result;
}

Delete all agent input files

DELETE api/input/agent/{agentId}

Deletes all input files associated with the specified agent.

Example:

DELETE https://acc.sequentum.com/api/input/agent/9040f86d-bbc1-4038-9868-501145cc2370

Disable All Agent Input Files

POST api/input/agent/{agentId}/disable

Disables all input files associated with the specified agent. Disabled input files are not deployed to the servers running the agent, so therefore not available to the agent as well.

Example:

POST https://acc.sequentum.com/api/input/agent/9040f86d-bbc1-4038-9868-501145cc2370/disable

Postman

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

Click here to view the API Calls on Postman

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.