status RESTful API - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
kmo1482331935137.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

Overview

The status RESTful API displays the status of an executed job using the following URL and method:

Item Description
URL /datamover/executedJobs/[executed-job-name]

/datamover/executingJobs/[executed-job-name]

Method GET

Request Parameters

outputLevel
URL: /datamover/executingJobs/[executed-job-name]?outputLevel=<value>
URL: /datamover/executedJobs/[executed-job-name]?outputLevel=<value>
Description: Specifies output level of the job status. The output level options are defined in the following table:
Output Level Description
1 Overall job status (default)
2 Status of each job step
3 Status of each job task
4 Detailed log information
If the outputLevel parameter is not specified, then it defaults to output_level 1.
Required: No

Response Parameters

jobName
Description: Job name (maximum characters: 237)
JSON Data Type: String
Nullable: No
Output Level: 1
jobExecutionName
Description: Job execution name
JSON Data Type: String
Nullable: No
Output Level: 1
startTime
Description: Start time if job has been executed, null if never executed
JSON Data Type: Long
Nullable: No
Output Level: 1
status
Description: Status of the job (maximum characters: 12), where possible values are listed in the status description for Request Parameters
JSON Data Type: String
Nullable: No
Output Level: 1
steps
Description: Lists all the last steps the job ran
JSON Array: stepType Object
Nullable: No
Output Level: 2
taskStatus
Description: Lists all the individual tasks for each object
JSON Array: taskStatus Object
Nullable: No
Output Level: 3
streamInfo
Description: Lists streams, if available
JSON Array: streamInfo Object
Nullable: Yes
Output Level: 3
log
Description: Displays the utility log output
JSON Data Type: String
Nullable: Yes
Output Level: 4

Status Codes

If the command executes without error, the API returns status code 200 in the response header and nothing in the response body.

If an error occurs during execution, the API returns a non-200 status code in the response header and an error message in JSON format in the response body.

If the job execution completes and the client calls /executingJobs/[executed-job-name], then the REST server responds with the HTTP status code 301 with the location header set to /datamover/executedJobs/[executed-job-name].

Response Example

This example shows an array of job executions with the most common status. The links generated depend on job status.
{
    "jobName": "dmsmptodmsmp2createtest",
    "jobExecutionName": "dmsmptodmsmp2createtest-20141219094827",
    "startTime": 1419011314588,
    "status": "RUNNING",
    "links" : [
        {
            "rel": "self"
            "href": "http://server/datamover/executingJobs/dmsmptodmsmp2createtest-20141219094827"
        },
        {
            "rel": "executed_status"
            "href": "http://server/datamover/executedJobs/dmsmptodmsmp2createtest-20141219094827"
        }
    ]
}
{
    "jobName": "dmsmptodmsmp2createtest",
    "jobExecutionName": "dmsmptodmsmp2createtest-20141219094827",
    "startTime": 1419011314588,
    "status": "RUNNING",
    "steps":
    [
        {
            "id": 1,
            "type": "VERIFY_JOB_OBJECTS",
            "startTime": 1419011317674,
            "endTime": 1419011331750,
            "durationTime": 14,
            "status": "COMPLETED"
        },
        {
            "type": "MOVE_TABLE_DATA",
            "startTime": 1419011332324,
            "endTime": 1419011373457,
            "status": "COMPLETED",
            "durationTime": 41
        }
    ],
    "taskStatus":
    [
        {
            "id": 15,
            "parentName": "dmintegrationtestuser",
            "objectName": "test1",
            "objectType": "table",
            "movePhase": "MOVING_DATA",
            "status": "ARCHIVE",
            "totalRowsProcessed": 1002,
            "totalBytesProcessed": 32558,
            "timeStamp": 1419011343828,
            "agentName": "Agent2",
            "utility": "ARC",
            "sessionsSpecified": 2,
            "sessionsUsed": "2"
            "dataStreams": 1
        }
    ],
    "streamInfo":
    [
        {
            "utility": "ARC",
            "operator": "Archive",
            "agentName": "Agent2",
            "taskID": 15,
            "streamID": 1,
            "bytesProcessed": 97674,
            "processSpeed": 49033,
            "timestamp": 1419011349791,
            "objectName": "dmintegrationtestuser.test3"
        }
    ],
    "log": "Step 1 is complete",
    "links" : [
        {
            "rel": "self"
            "href": "http://server/datamover/executingJobs/dmsmptodmsmp2createtest-20141219094827"
        },
        {
            "rel": "executed_status"
            "href": "http://server/datamover/executedJobs/dmsmptodmsmp2createtest-20141219094827"
        }
    ]
}