Retrieving job sequences
Gets a list of all job sequences.
Service URL
GET /api/cx-unity-api/flows
Request parameters
N/A
Response parameters
|
Name |
Description |
|---|---|
flowName
|
Name of the job sequence. |
flowId
|
The job sequence ID. |
description
|
The description of the job sequence . |
versionTS
|
Timestamp when the job sequence was created. |
active
|
Whether the job sequence is active. Job sequences must be active before they can be started. |
lastModifiedBy
|
Timestamp when the job sequence was last updated. |
createdTS
|
Timestamp when the job sequence was created. |
createdBy
|
ID of the user who created the job sequence. |
Nested schema: jobs
|
Name |
Description |
|---|---|
id
|
Name of the job created. |
jobId
|
ID for the job created. |
type
|
Job type. |
description
|
Description of the job. |
depends
|
Array that lists job dependencies. |
Nested schema: schedule
Scheduling job sequences is optional. See Scheduling job sequences for more information.
|
Name |
Description |
|---|---|
cronExpression
|
The date and time the job sequence is scheduled to run, represented as a Cron Expression. |
Nested schema: notification
Email notifications are optional. See Configuring job sequence notifications for more information.
|
Name |
Type |
Description |
Possible values |
|---|---|---|---|
list
|
array | Array of email addresses. The email addresses specified here will receive email notifications when individual jobs succeed and fail, and also when the entire job sequence succeeds and fails. | |
onlyFailure
|
boolean | Flag to enable sending email notifications for failure notifications only. If set to true, the email addresses specified will be notified when individual jobs in the sequence fail, and when the entire sequence fails. The default is false. |
|
onlySummary
|
boolean | Flag to enable sending email notifications for job sequence summary notifications only. If set to true, the email addresses specified will be notified when the entire job sequence succeeds and fails. The default is false. |
|
Example
Get all job sequences:
GET /api/cx-unity-api/flows
Response:
[
{
"flowName": "Example_Sequence1",
"flowId": "Example_Sequence1",
"description": "My first job sequence",
"versionTS": 1612352506381,
"active": true,
"lastModifiedBy": "0d21396c936a4e41afda8d44523d6dc0",
"createdTS": 1612352506381,
"createdBy": "0d21396c936a4e41afda8d44523d6dc0",
"status": "STOPPED",
"jobs": [
{
"id": "customer_cxsales",
"jobId": "CXU_JOB_1611731643985",
"type": "INGEST",
"depends": [
]
},
{
"id": "dw_job",
"jobId": "Dw",
"type": "DW",
"depends": [
"customer_cxsales"
]
},
{
"id": "campaign1",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "campaign2",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "campaign3",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "campaign4",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "camp_and_gate",
"jobId": "and_gate",
"type": "GATE",
"condition": "and",
"depends": [
"campaign1",
"campaign2",
"campaign3",
"campaign4"
]
},
{
"id": "Customer_CSV",
"jobId": "CXU_JOB_1611731643985",
"type": "INGEST",
"depends": [
"camp_and_gate"
]
},
{
"id": "rj_dw1",
"jobId": "Dw",
"type": "DW",
"depends": [
"Customer_CSV"
]
},
{
"id": "campaign5",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "campaign6",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
},
{
"id": "camp_sup_and_gate",
"jobId": "and_gate",
"type": "GATE",
"condition": "and",
"depends": [
"campaign5",
"campaign6"
]
},
{
"id": "customer_csv2",
"jobId": "CXU_JOB_1611731643985",
"type": "INGEST",
"depends": [
"camp_sup_and_gate"
]
},
{
"id": "rk_dw1",
"jobId": "Dw",
"type": "DW",
"depends": [
"customer_csv2"
]
},
{
"id": "camp9",
"jobId": "CXU_JOB_1599592639999",
"type": "CAMPAIGN",
"depends": [
"dw_job"
]
}
]
},
{
"flowName": "Example_Sequence2",
"flowId": "Example_Sequence2",
"description": "My second job sequence",
"versionTS": 1612349475811,
"active": true,
"lastModifiedBy": "0d21396c936a4e41afda8d44523d6dc0",
"createdTS": 1612349475811,
"createdBy": "0d21396c936a4e41afda8d44523d6dc0",
"status": "STOPPED",
"jobs": [
{
"id": "job1",
"jobId": "CXU_JOB_1611732176368",
"type": "QUERYEXPORT",
"description": "Export Customer",
"depends": [
]
},
{
"id": "job2.1",
"jobId": "CXU_JOB_1611731643985",
"type": "INGEST",
"description": "Ingest Customer",
"depends": [
"job1"
]
},
{
"id": "job2.2",
"jobId": "CXU_JOB_1611731863790",
"type": "INGEST",
"description": "Ingest Address",
"depends": [
"job1"
]
},
{
"id": "job2.3",
"jobId": "CXU_JOB_1611747658146",
"type": "INGEST",
"description": "Ingest Order",
"depends": [
"job1"
]
},
{
"id": "job3",
"jobId": "and_gate",
"type": "GATE",
"condition": "and",
"depends": [
"job2.1",
"job2.2",
"job2.3"
]
},
{
"id": "job4",
"jobId": "Dw",
"type": "DW",
"description": "Run DW",
"depends": [
"job3"
]
},
{
"id": "job5",
"jobId": "CXU_JOB_1611732176368",
"type": "QUERYEXPORT",
"description": "Export Customer",
"depends": [
"job4"
]
}
]
},
{
"flowName": "Example_Sequence3",
"flowId": "Example_Sequence3",
"description": "My third job sequence",
"versionTS": 1612345646523,
"active": true,
"lastModifiedBy": "0d21396c936a4e41afda8d44523d6dc0",
"createdTS": 1612345646523,
"createdBy": "0d21396c936a4e41afda8d44523d6dc0",
"status": "STOPPED",
"jobs": [
{
"id": "job2.1",
"jobId": "CXU_JOB_1611731643985",
"type": "INGEST",
"description": "Ingest Customer",
"depends": [
]
},
{
"id": "job2.2",
"jobId": "CXU_JOB_1611731863790",
"type": "INGEST",
"description": "Ingest Address",
"depends": [
]
},
{
"id": "job2.3",
"jobId": "CXU_JOB_1611747658146",
"type": "INGEST",
"description": "Ingest Order",
"depends": [
]
},
{
"id": "job3",
"jobId": "and_gate",
"type": "GATE",
"condition": "and",
"depends": [
"job2.1",
"job2.2",
"job2.3"
]
},
{
"id": "job4",
"jobId": "Dw",
"type": "DW",
"description": "Run DW",
"depends": [
"job3"
]
},
{
"id": "job5",
"jobId": "CXU_JOB_1611732176368",
"type": "QUERYEXPORT",
"description": "Export Customer",
"depends": [
"job4"
]
}
]
}
]
Error responses
No job sequence found with flowId = <flowId>: This message appears if the specified flowId does not exist. Ensure the flowId exists, and try again.
{
"type": "",
"title": "System Error",
"detail": "No job sequence found with flowId = <flowId>.",
"o:errorCode": "InvalidFlowException",
"o:errorDetails":[]
}