Job API
Job API
Create Cache Connection URL
Create Cache Connection generates a URL for users to create or update their cache connection.
Request
POST https://cloud.cdata.com/api/job/cacheConnection/formLink
{
"redirectURL": "https://www.google.com"
}
Payload Parameters
| Name | Description |
| redirectURL | The URL to redirect the customer once the customer has edited the connection through the Connect AI UI. |
Response
A string containing the URL to redirect the user to. Users can then add their PostgreSQL connection information to this page.
HTTP 200 OK
{
"redirectURL": "https://cloud.cdata.com/oem/user/cacheConnection?token=eyJhbGciOiJSUzI1NiIsImtpZCI6IlNJdTlCdjVjWU1HMDRMYW84YXh3T0E2Nlk5UVlBV0dQd05YeTA5Q1hlY3MiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmZWUxY2U5ZC1jNDBjLTRlZjYtOGY4Yy03NzQ2MTMxNTcxM2QiLCJ0b2tlblR5cGUiOiJwb3dlcmVkLWJ5Iiwib2VtQWRtaW5BY2NvdW50SWQiOiJkZWUxZmVlZC1jNDBjLTRlZjYtOGY4Yy03NzQ2MTMxNTcxM2QiLCJvZW1TdWJBY2NvdW50SWQiOiJmZWUxY2U5ZC1jNDBjLTRlZjYtOGY4Yy03NzQ2MTMxNTcxM2QiLCJmbG93VHlwZSI6ImNyZWF0ZUNvbm5lY3Rpb24iLCJhY2NvdW50SWQiOiJmZWUxY2U5ZC1jNDBjLTRlZjYtOGY4Yy03NzQ2MTMxNTcxM2QiLCJodHRwczovL2Nsb3VkLmNkYXRhLmNvbS9jbGFpbXMvYWNjb3VudF9uYW1lIjoiQ0RhdGFCU0VDaGlsZCIsImh0dHBzOi8vY2xvdWQuY2RhdGEuY29tL2NsYWltcy91c2VyX3R5cGUiOiIwIiwiaHR0cHM6Ly9jbG91ZC5jZGF0YS5jb20vY2xhaW1zL3VzZXJfaWQiOiI0YmJiYmJiYi0zYzVjLTU2ZjgtYWFlNC1iOTg3ZDhlYTM5N2EiLCJuYW1lIjoiU2VydmljZSBVc2VyIiwiZW1haWwiOiJzZXJ2aWNlQWNjY291bnRAZmFrZS5jb20iLCJmbG93RGF0YXNvdXJjZSI6IlBvc3RncmVTUUwiLCJuYmYiOjE3NjI4OTYxNTEsImV4cCI6MTc2Mjg5NjMzMSwiaXNzIjoiY2RhdGEuY29ubmVjdC5hY2NvdW50c2VydmljZSIsImF1ZCI6ImNkYXRhLmNvbm5lY3Qub2VtIn0.Wucf_8YhzGlggHr3DXMsJJYD7BpvcJTxFhJrYcWo9hF28gt684XES0Jh6VZ3YReFb0HVvQlqB_Vf7pkSC_seIPLXC4J7gVaX8oRBKgT6S8aIrNiyi_kZDueeRnBo3sVezUCmzCenEMcHA61H8H8-B7PDhMgOwaKWyFZCpL_ATHH7kTVYAVl8AoeG-z4A1RlwcSnbsoP4RZRgeOv9XEpz_0naviJ7TUyz54WlPAvdFwG6As_R0oI1oU6Nw7aXetphiTqmq3pAYk3FP__8KIkUSliEQv6-VxO6Ugc7CF97Dplzl7arBYkoGkVpv3Rk7jdteZYw0m_uRjKNjhfeB1Vexg&driver=PostgreSQL&redirectUrl=https%3A%2F%2Fwww.google.com&connectionName=OEMCacheConnection"
}
Create Cache Connection
Create/update the cache connection used by the other caching API calls.
Request
POST https://cloud.cdata.com/api/job/cacheConnection
Payload Parameters
| Name | Description |
| connectionString | The connection string used to configure the user’s PostgreSQL connection. |
Response
HTTP 200 OK
List Jobs
Administrators, impersonating a service user, can request a list of jobs for a child account.
Request
GET https://cloud.cdata.com/api/job/list
Response
HTTP 200 OK
{
"jobs": [/*job information shown below*/]
}
Fields
| Name | Description |
| jobType | The type of job the user wants to run. |
| id | The job’s Id. |
| name | The job’s name. |
| enabled | A Boolean value indicating whether the job is enabled. |
| created | The date and time the job was created. |
| lastModified | The date and time the job was last modified. |
| nextRunTime | The date and time the job is scheduled to be run next. |
| intervalUnit | A string representing the interval unit for the job (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected interval unit the job should wait before running again. |
| logVerbosity | A number indicating the level of log verbosity (1-5). |
| lastRun | The last run metrics for the job, including the date and time, duration, status, rows affected, and next run time. See example below. |
| params | An object containing different job details, depending on whether the job is a cache job or a scheduled query. See examples below. |
lastRun example:
"lastRun": {
"dateTime": "0001-01-01T00:00:00Z",
"duration": 63894847975,
"status": "JOB_QUEUED",
"rowsAffected": 0,
"nextRunTime": "0001-01-01T00:00:00Z"
}
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnection": "f6f3cfe6-72e2-4edb-914f-4409c01c1418",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnection": "421437d4-19c8-4288-89d7-c71c9dc64658",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Describe Job
Retrieve the details for a specific job.
Request
GET https://cloud.cdata.com/api/job/{jobId}
Path Parameters
| Name | Description |
| jobId | The Id of the job you want to retrieve details from. |
Response
HTTP 200 OK
{
"jobs": [/*job information shown below*/]
}
| Name | Description |
| jobType | The type of job the user wants to run. |
| id | The job’s Id. |
| name | The job’s name. |
| enabled | A Boolean value indicating whether the job is enabled. |
| created | The date and time the job was created. |
| lastModified | The date and time the job was last modified. |
| nextRunTime | The date and time the job is scheduled to be run next. |
| intervalUnit | A string representing the interval unit for the job (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected interval unit the job should wait before running again. |
| logVerbosity | A number indicating the level of log verbosity (1-5). |
| lastRun | The last run metrics for the job, including the date and time, duration, status, rows affected, and next run time. See example below. |
| params | An object containing different job details, depending on whether the job is a cache job or a scheduled query. See examples below. |
lastRun example:
"lastRun": {
"dateTime": "0001-01-01T00:00:00Z",
"duration": 63894847975,
"status": "JOB_QUEUED",
"rowsAffected": 0,
"nextRunTime": "0001-01-01T00:00:00Z"
}
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnection": "f6f3cfe6-72e2-4edb-914f-4409c01c1418",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnection": "421437d4-19c8-4288-89d7-c71c9dc64658",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Create Job
Administrators, impersonating a service user, can use this call to create a new job.
Request
POST https://cloud.cdata.com/api/job/create
{
"jobType": "Caching",
"intervalUnit": "Hour",
"intervalValue": "1",
"logVerbosity": "1",
"enabled": "true",
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
}
Payload Parameters
| Name | Description |
| jobType | The type of job that the user wants to run (Caching or ScheduledQuery). |
| intervalUnit | A string representing the time interval (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected frequency unit the job should wait before running again. |
| logVerbosity | An enum indicating the level of log verbosity (1-5). |
| enabled | A Boolean value indicating whether the job is enabled. The default value is true. |
| definedNextRun | An optional DateTime value that can be used to set the initial start time for the job. |
| params | An object containing different job details depending on if the job is a cache job or a scheduled query. See examples below. |
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Response
HTTP 200 OK
{
"jobs": [/*job information shown below*/]
}
| Name | Description |
| id | The job’s Id. |
| name | The job’s name. |
| enabled | A Boolean value indicating whether the job is enabled. |
| created | The date and time the job was created. |
| lastModified | The date and time the job was last modified. |
| nextRunTime | The date and time the job is scheduled to be run next. |
| intervalUnit | A string representing the interval unit for the job (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected interval unit the job should wait before running again. |
| logVerbosity | A number indicating the level of log verbosity (1-5). |
| lastRun | The last run metrics for the job, including the date and time, duration, status, rows affected, and next run time. See example below. |
| params | An object containing different job details, depending on whether the job is a cache job or a scheduled query. See examples below. |
lastRun example:
"lastRun": {
"dateTime": "0001-01-01T00:00:00Z",
"duration": 63894847975,
"status": "JOB_QUEUED",
"rowsAffected": 0,
"nextRunTime": "0001-01-01T00:00:00Z"
}
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnection": "f6f3cfe6-72e2-4edb-914f-4409c01c1418",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnection": "421437d4-19c8-4288-89d7-c71c9dc64658",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Update Job
Administrators, impersonating a service user, can use this call to update a specified job.
Request
PUT https://cloud.cdata.com/api/job/{jobId}/update
{
"jobType": "Caching",
"intervalUnit": "Hour",
"intervalValue": "1",
"logVerbosity": "1",
"enabled": "true",
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
}
Path Parameters
| Name | Description |
| jobId | The Id of the job you want to update. |
Payload Parameters
| Name | Description |
| jobType | The type of job that the user wants to run (Caching or ScheduledQuery). |
| intervalUnit | A string representing the time interval (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected frequency unit the job should wait before running again. |
| logVerbosity | An enum indicating the level of log verbosity (1-5). |
| enabled | A Boolean value indicating whether the job is enabled. The default value is true. |
| definedNextRun | An optional DateTime value that can be used to set the initial start time for the job. |
| params | An object containing different job details depending on if the job is a cache job or a scheduled query. See examples below. |
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Response
HTTP 200 OK
{
"jobs": [/*job information shown below*/]
}
| Name | Description |
| id | The job’s Id. |
| name | The job’s name. |
| enabled | A Boolean value indicating whether the job is enabled. |
| created | The date and time the job was created. |
| lastModified | The date and time the job was last modified. |
| nextRunTime | The date and time the job is scheduled to be run next. |
| intervalUnit | A string representing the interval unit for the job (Hour/Day/Week/Month). |
| intervalValue | An integer that represents how many of the selected interval unit the job should wait before running again. |
| logVerbosity | A number indicating the level of log verbosity (1-5). |
| lastRun | The last run metrics for the job, including the date and time, duration, status, rows affected, and next run time. See example below. |
| params | An object containing different job details, depending on whether the job is a cache job or a scheduled query. See examples below. |
lastRun example:
"lastRun": {
"dateTime": "0001-01-01T00:00:00Z",
"duration": 63894847975,
"status": "JOB_QUEUED",
"rowsAffected": 0,
"nextRunTime": "0001-01-01T00:00:00Z"
}
Cache jobs params example:
"params": {
"timeCheckColumn": "",
"autoTruncateStrings": "false",
"sourceConnection": "f6f3cfe6-72e2-4edb-914f-4409c01c1418",
"sourceConnectionName": "MailChimp1",
"sourceName": "MailChimp",
"sourceSchema": "MailChimp",
"sourceTable": "Conversations"
}
Scheduled query params example:
"params": {
"name": "test-name",
"query": "Select * from [MailChimp1].[MailChimp].[Conversations]",
"destinationWriteScheme": "Overwrite",
"destinationConnection": "421437d4-19c8-4288-89d7-c71c9dc64658",
"destinationConnectionName": "PostgreSQL5",
"destinationSchema": "public",
"destinationTable": "test",
}
Delete Job
Administrators, impersonating a service user, can use this call to delete a specified job.
Request
DELETE https://cloud.cdata.com/api/job/{jobId}/delete
Path Parameters
| Name | Description |
| jobId | The Id of the job you want to delete. |
Response
HTTP 200 OK
Run Job
Administrators, impersonating a service user, can use this call to put the specified job in the queue to be run.
Request
POST https://cloud.cdata.com/api/job/{jobId}/run
Path Parameters
| Name | Description |
| jobId | The Id of the job you want to put in the queue to be run. |
Response
HTTP 200 OK
Stop Job
Administrators, impersonating a service user, can use this call to stop the specified job.
Request
POST https://cloud.cdata.com/api/job/{jobId}/stop
Path Parameters
| Name | Description |
| jobId | The Id of the job you want to stop. |
Response
HTTP 200 OK