Activity Log

Use this resource to request log information for completed jobs from the Monitor service. You can also request error logs and session logs.

GET Request

You can request all of the log information or filter the log response. To request information from the log, use the following URI:

/api/v2/activity/activityLog

To request information for a specific log ID, use the following URI:

/api/v2/activity/activityLog/<id>

To request information for a specific run ID, use the following URI:

/api/v2/activity/activityLog?runId=<runId>

To request information for a specific task, include the task ID in the following URI:

/api/v2/activity/activityLog?taskId=<taskId>

To specify the number of rows to skip, use the following URI:

/api/v2/activity/activityLog?offset=<offset>

To specify a row limit, use the following URI:

/api/v2/activity/activityLog?rowLimit=<rowLimit>

You can use any combination of these options. For example, you can use the following URI:

/api/v2/activity/activityLog?offset=<offset>&rowLimit=<rowLimit>&taskId=<taskId>&runId=<runId>

You can also use the activityLog resource to get a session log. To get a session log, use the following URI:

/api/v2/activity/activityLog//<id>/sessionLog

You can use the following optional attributes in the activityLog GET URI:

FieldDescription
idLog entry ID.
Include this attribute if you want to receive information for a specific ID.
runIdJob ID associated with the log entry ID.
taskIdTask ID associated with the log entry ID. If taskId is not specified, all activityLog entries for all tasks are returned.
offsetThe number of rows to skip. For example, you might want to skip the first three rows.
rowLimitThe maximum number of rows to return. The maximum number you can specify is 1000.
If you omit this attribute, the activityLog returns all available rows, up to a maximum of 200 rows.

GET Response

Returns an activityLogEntry object for each row in the log or returns an activityLogEntry object for the specified ID. Returns the error object if errors occur.
When you request information for each row in the log, the activityLogEntry object includes the following attributes

FieldTypeDescription
idStringLog entry ID.
typeStringThe type of task. For Data Integration, returns one of the following codes:

DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task.
WORKFLOW. Linear taskflow
objectIdStringTask ID.
objectNameStringName of the task.
runIdLongID for the task run.
agentIdStringAgent that runs the task.
runtimeEnvironmentIdStringRuntime environment where the task runs.
startTimeDate/timeStart time for the task or linear taskflow. Uses Eastern Time Zone (ET).
endTimeDate/timeEnd time for the task or linear taskflow. Uses Eastern Time Zone (ET).
startTimeUtcDate/timeStart time for the task or linear taskflow. Uses Coordinated Universal Time (UTC).
endTimeUtcDate/timeEnd time for the task or linear taskflow. Uses Coordinated Universal Time (UTC).
stateStringWhether the task completed successfully. Returns one of the following codes:

1. The task completed successfully.
2. The task completed with errors.
3. The task failed to complete.
failedSourceRowsLongNumber of rows that were not read from the source.
successSourceRowsLongNumber of rows that are successfully read from the source.
failedTargetRowsLongNumber of rows that were not written to the target.
successTargetRowsLongNumber of rows that were successfully written to the target.
errorMsgStringError message associated with the job.
startedByStringUser who started the task.
runContextTypeStringMethod through which the task was initiated. Includes the following values:

UI. Task was initiated through the user interface.
SCHEDULER. Task was initiated through the task scheduler.
REST-API. Task was initiated through the REST API.
OUTBOUND MESSAGE. Task was initiated through an outbound message
scheduleNameStringSchedule name, if task was initiated by a schedule.
entriesIndicates the start of information for a child object.

When you request log information for a specific ID, the activityLogEntry object includes the following attributes:

FieldTypeDescription
idStringLog entry ID.
typeStringThe type of task. For Data Integration, returns one of the following codes:

DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task.
WORKFLOW. Linear taskflow
objectIdStringTask ID.
objectNameStringName of the task.
runIdStringID for the task run.
agentIdStringAgent that runs the task.
runtimeEnvironmentIdStringRuntime environment where the task runs.
startTimeDate/timeStart time for the task or linear taskflow. Uses Eastern Time Zone (ET).
endTimeDate/timeEnd time for the task or linear taskflow. Uses Eastern Time Zone (ET).
startTimeUtcDate/timeStart time for the task or linear taskflow. Uses Coordinated Universal Time (UTC).
endTimeUtcDate/timeStart time for the task or linear taskflow. Uses Coordinated Universal Time (UTC).
stateStringWhether the task completed successfully. Returns one of the following codes:

1. The task completed successfully.
2. The task completed with errors.
3. The task failed to complete.
4. The task has not started.
failedSourceRowsLongNumber of rows that were not read from the source.
successSourceRowsLongNumber of rows that are successfully read from the source.
failedTargetRowsLongNumber of rows that were not written to the target.
successTargetRowsLongNumber of rows that were successfully written to the target.
errorMsgStringError message associated with the job.
startedByStringUser who started the task.
runContextTypeStringMethod through which the task was initiated. Includes the following values:

UI. Task was initiated through the user interface.
SCHEDULER. Task was initiated through the task scheduler.
REST-API. Task was initiated through the REST API.
OUTBOUND MESSAGE. Task was initiated through an outbound message.
scheduleNameStringSchedule name, if task was initiated by a schedule.
orgIdStringOrganization ID.
totalSuccessRowsLongTotal number of rows that were successfully read from the source and written to the target.
totalFailedRowsLongTotal number of rows that were not read from the source and written to the target.
logFilenameStringThe name of the generated log file.
errorFilenameStringThe name of the generated error file.
errorFileDirStringThe location of the error file on the Secure Agent machine.
connTypeStringConnection type.
stopOnErrorBooleanDetermines the runtime environment action to take when an nonfatal error occurs. Includes the following values:

True. The linear taskflow stops when an error occurs.
False. The linear taskflow continues to process when an error occurs.
items Includes an activityLogEntryItem object for each task.
typeStringIncluded in the activityLogEntryItem object.
The type of task. For Data Integration, returns one of the following codes:

DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task.
WORKFLOW. Linear taskflow.
objectIdStringIncluded in the activityLogEntryItem object.
Task ID.
objectNameStringIncluded in the activityLogEntryItem object.
Name of the task.
runIdStringIncluded in the activityLogEntryItem object.
ID for the task run.
agentIdStringIncluded in the activityLogEntryItem object.
Agent that ran the task.
runtimeEnvironmentIdStringIncluded in the activityLogEntryItem object.
Runtime environment where the task ran.
startTimeDate/timeIncluded in the activityLogEntryItem object.
Start time for the task or linear taskflow. Uses Eastern Time Zone (ET).
endTimeDate/timeIncluded in the activityLogEntryItem object.End time for the task or linear taskflow. Uses Eastern Time Zone (ET).
stateStringIncluded in the activityLogEntryItem object.Whether the task completed successfully. Returns one of the following codes:

1. The task completed successfully.
2. The task completed with errors.
3. The task failed to complete.
errorMsgStringIncluded in the activityLogEntryItem object.
Error message associated with the job.
connTypeStringIncluded in the activityLogEntryItem object.
Connection type.
childrenStringIncluded in the activityLogEntryItem object.
Returns an activityLogEntryItem object for each table in the linear taskflow.
startedByStringUser who started the task.
runContextTypeStringMethod through which the task was initiated. Includes the following values:

UI. Task was initiated through the user interface.
SCHEDULER. Task was initiated through the task scheduler.
REST-API. Task was initiated through the REST API.
OUTBOUND MESSAGE. Task was initiated through an outbound message.
scheduleNameStringSchedule name, if task was initiated by a schedule.
transformationEntries Includes information in a transformationLogEntry object for each transformation.
idStringIncluded in the transformationLogEntry object.
Transformation ID.
txNameStringIncluded in the transformationLogEntry object.
Transformation name.
txTypeStringIncluded in the transformationLogEntry object.
Transformation type.
successRowsLongIncluded in the transformationLogEntry object.
Number of successful rows for the transformation.
failedRowsLongIncluded in the transformationLogEntry object.
Number of failed rows for the transformation.
sequenceValues Returns information generated from a task that includes the sequence generator transformation. Includes a sequenceValueLogEntry object for each transformation.
txNameStringIncluded in the sequenceValueLogEntry object.
Transformation name.
nextValueStringIncluded in the sequenceValueLogEntry object.
The last value generated by the task.
inOutParameterValues StringThe in-out parameter values used in the task. Includes an inOutParameterValueLogEntry for each parameter.
nameStringIncluded in the inOutParameterValueLogEntry object.
Parameter name.
valueStringIncluded in the inOutParameterValueLogEntry object.
Parameter value.

GET Example

To request 20 rows of information returned from the log in JSON format, you might use the following request:

GET <serverUrl>/api/v2/activity/activityLog?rowLimit=20 HTTP/1.0
Accept:application/json
icSessionId: <icSessionId>

A successful request returns a list: an activityLogEntry object for each entry returned from the log.
The following text is a sample return in JSON:

[
    {
        "@type": "activityLogEntry",
        "id": "000001C100000000000C",
        "type": "DRS",
        "objectName": "drstask1",
        "runId": 1,
        "runtimeEnvironmentId": "00000C25000000000002",
	       "startTime": "2012-07-30T13:30:30.000Z",
        "endTime": "2012-07-30T13:32:30.000Z",
        "state": 1,
        "failedSourceRows": 0,
        "successSourceRows": 39,
        "failedTargetRows": 0,
        "successTargetRows": 39,
        "errorMsg": null,
        "entries": [
            {
                "@type": "activityLogEntry",
                "id": "128964732",
                "type": "DRS",
                "objectName": "Contact",
                "runId": 0,
                "runtimeEnvironmentId": "00000C25000000000002",
                "agentId: "01000008000000000006",
                "startTime": "2012-07-30T13:32:31.000Z",
                "endTime": "2012-07-30T13:35:31.000Z",
                "state": 1,
                "failedSourceRows": 0,
                "successSourceRows": 39,
                "failedTargetRows": 0,
                "successTargetRows": 39,
                "errorMsg": "No errors encountered.",
                "entries": []
            },
        ]
    },
    {
        "@type": "activityLogEntry",
        "id": "010000C1000000000PGP",
        "type": "MTT_TEST",
        "objectId": "0100000Z00000000001N",
        "objectName": "Mapping-MultiSource",
        "runId": 12,
        "startTime": "2020-03-27T08:05:56.000Z",
        "endTime": "2020-03-27T08:06:07.000Z",
        "startTimeUtc": "2020-03-27T12:05:56.000Z",
        "endTimeUtc": "2020-03-27T12:06:07.000Z",
        "state": 2,
        "failedSourceRows": 0,
        "successSourceRows": 800,
        "failedTargetRows": 200,
        "successTargetRows": 600,
        "startedBy": "[email protected]",
        "runContextType": "ICS_UI",
        "entries": [
            {
                "@type": "activityLogEntry",
                "id": "118964723",
                "type": "MTT_TEST",
                "objectName": "",
                "runId": 12,
                "agentId": "01000008000000000004",
                "runtimeEnvironmentId": "01000025000000000004",
                "startTime": "2020-03-27T08:05:56.000Z",
                "endTime": "2020-03-27T08:06:07.000Z",
                "startTimeUtc": "2020-03-27T12:05:56.000Z",
                "endTimeUtc": "2020-03-27T12:06:07.000Z",
                "state": 2,
                "failedSourceRows": 0,
                "successSourceRows": 800,
                "failedTargetRows": 200,
                "successTargetRows": 600,
                "errorMsg": null,
                "startedBy": "[email protected]",
                "runContextType": "ICS_UI",
                "entries": [],
                "subTaskEntries": [],
                "logEntryItemAttrs": {
                    "IS_SERVER_LESS": "false",
                    "Session Log File Name": "s_mtt_0Sr7LdcbAG2ldG33Lp8koQ_2.log"
                },
                "totalSuccessRows": 0,
                "totalFailedRows": 0,
                "stopOnError": false,
                "hasStopOnErrorRecord": false,
                "contextExternalId": "0100000Z00000000001N",
                "transformationEntries": [
                    {
                        "@type": "transformationLogEntry",
                        "id": "141332309",
                        "txName": "FFSource2",
                        "txType": "SOURCE",
                        "successRows": 600,
                        "failedRows": 0
                    },
                    {
                        "@type": "transformationLogEntry",
                        "id": "141332310",
                        "txName": "FFSource1",
                        "txType": "SOURCE",
                        "successRows": 200,
                        "failedRows": 0
                    },
                    {
                        "@type": "transformationLogEntry",
                        "id": "141332311",
                        "txName": "FFTarget",
                        "txType": "TARGET",
                        "successRows": 600,
                        "failedRows": 0
                    },
                    {
                        "@type": "transformationLogEntry",
                        "id": "141332312",
                        "txName": "MYSQLTarget",
                        "txType": "TARGET",
                        "successRows": 0,
                        "failedRows": 200
                    }
                ]
            }
        ]
    }
]

Error Log Requests

You can request an error log from the server.
To request an error log from the server for a specific log ID, use the following URI:

/api/v2/activity/errorLog/id

To retrieve an error log from the server, you might use the following request:

GET <server URL>/api/v2/activity/errorLog/000002C10000000002BG  HTTP/1.0
Accept:application/json
icSessionId: <icSessionId>

The server returns the error log as a string, as shown in the following example:

"Col1","Col2","Error"

"05/11/2015 00:00:00.000000000","05/11/2015 00:00:00.000000000","ERROR: Target table [test] has no keys specified."

"05/11/2015 00:00:00.000000000","05/11/2015 00:00:00.000000000","ERROR: Target table [test] has no keys specified."

"05/11/2015 00:00:00.000000000","05/11/2015 00:00:00.000000000","ERROR: Target table [test] has no keys specified."

"05/11/2015 00:00:00.000000000","05/11/2015 00:00:00.000000000","ERROR: Target table [test] has no keys specified."

"05/11/2015 00:00:00.000000000","05/11/2015 00:00:00.000000000","ERROR: Target table [test] has no keys specified."

Session Log Requests

You can download session logs for all task types using the sessionLog API. For tasks that have subtasks such as replication tasks and linear taskflows, you can download a ZIP file that contains all of the session logs in the hierarchy. For replication tasks, which have two levels of tasks, you can specify an itemId to return a session log for a subtask if you do not want all of the session logs. For linear taskflows, which have three levels of tasks, you can specify an itemId or childItemId to return a session log for a particular subtask.

Use the following URI to download session logs:

/saas/api/v2/activity/activityLog/<Top_Level_Log_Entry_Id>/sessionLog?itemId=<child-log-entry-item-id>&childItemId=<child-log-entry-item-id>

The following example requests include a request for a specific session log and requests for session logs for subtasks:

  • To request a session log, which may return a ZIP file if the task is a replication task or linear taskflow, you might use the following request: 
    
/saas/api/v2/activity/activityLog/000001C1000000000591/sessionLog
  • To request a session log for a particular subtask for a replication task or linear taskflow, you might use the following request:
/saas/api/v2/activity/activityLog/000001C1000000000591/sessionLog?itemId=233

To request a session log for a sub-subtask in a linear taskflow, you might use the following request:

/saas/api/v2/activity/activityLog/000001C1000000000591/sessionLog?itemId=233&childItemId=234