2.8.3 Acquisition of a history record
Function
Acquires the history record that has the specified ID.
Execution permissions
Admin role, Develop role, Modify role, Submit role
API version
v1
Request format
GET http://host:port/Automation/version/objects/TaskHistories/id
Status code
The following table describes the various status codes that can be returned as the response to a request.
Status code |
Message |
Description |
|---|---|---|
200 |
OK |
Processing has been successfully completed. |
401 |
Unauthorized |
The user does not have login permission. |
404 |
Not found |
The permission is invalid, or the resource does not exist. |
412 |
Precondition failed |
The server is not available. |
500 |
Server-side error |
A server processing error occurred. |
Response schema
The following shows the structure of the response body for a request.
{
"instanceID" : instance-id,
"name" : "task-name",
"submitter" : "submit-user-name",
"serviceName" : "service-name",
"tags" : "tags",
"scheduleType" : "type-of-schedule",
"scheduledStartTime" : "schedule-start-date-and-time",
"startTime" : "start-date-and-time",
"completionTime" : "completion-date-and-time",
"stepStartTime" : "step-start-time",
"recurrenceInterval" : "interval-type",
"recurrenceDayOfWeek" : "interval-of-weekly-job",
"recurrenceDayOfMonth" : "interval-of-monthly-job",
"recurrenceLastDayOfMonth" : {true|false},
"recurrenceTime" : "exec-time-of-day",
"archiveTime" : "removed-date-and-time",
"taskID" : task-id,
"submitTime" : "submit-date-and-time",
"recurrenceStartDate" : "recurrence-start-date-and-time",
"status" : "task-status",
"description" : "description",
"serviceState" : "service-state",
"toDo" : {true|false},
"notes" : "notes",
"serviceGroupName" : "service-group-name",
"serviceGroupID" : service-group-id
}
Usage example
In the following example, the API function acquires the history record whose instanceID is 4006.
Request header:
GET /Automation/v1/objects/TaskHistories/4006 HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.36.0
Host: 10.196.184.182:22015
Accept: application/json
Response header:
HTTP/1.1 200 OK
Date: Fri, 31 Jul 2015 06:24:06 GMT
Server Cosminexus HTTP Server is not blacklisted
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO 2615a636c3da92888fe355da9ca7d223e6e214_Vlo8Y30JdDBUB3ljJSVPaRtjBSA=_V0810
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, HEAD, OPTIONS
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json
Response body:
{
"instanceID" : 4006,
"name" : "Execute Remote Command_20150731105831",
"submitter" : "System",
"serviceName" : "Execute Remote Command",
"tags" : "Windows,Linux,Execute Script",
"scheduleType" : "schedule",
"scheduledStartTime" : "2015-07-31T11:30:00.000+09:00",
"startTime" : "2015-07-31T11:30:00.000+09:00",
"completionTime" : "2015-07-31T11:30:33.000+09:00",
"archiveTime" : "2015-07-31T15:22:21.000+09:00",
"taskID" : 3042,
"submitTime" : "2015-07-31T11:00:06.000+09:00",
"status" : "completed",
"description" : "",
"serviceState" : "release",
"toDo" : true,
"notes" : "Notes Test",
"serviceGroupName" : "DefaultServiceGroup",
"serviceGroupID" : 3
}