Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

GET jobService/runhistory

Resource Information

Rate Limiting?

Yes

Sorting?

No

Paging?

No

Filtering?

No

Response Formats

xml

json

User Group

NBI Read

HTTP Methods

GET

Query the past run instances of a job. All request parameters are optional.

If no parameters are specified, If no parameters are specified, no run instances will be returned.. NBI filtering can be applied to the parameters to customize the query. Please refer the filtering page for the details of how to use filtering

Examples :

  • get the run history of the job 123 --/jobService/runhistory?jobId=123
  • get the run history of job 123 and job 456 between 2013-04-26T14:00:00 and 2013-04-26T16:00:00 -- /jobService/runhistory?jobId=in(123,456)&startTime=between("2013-04-26T14:00:00","2013-04-26T16:00:00")
  • get all run history of jobs with job name starting with "BulkImport" -- jobService/runhistory?jobName=startsWith("BulkImport")

Resource URL

/webacs/api/v1/op/jobService/runhistory

Since : 2.2

Request Parameters

Type Attribute Name Source Description

String

jobId optional

query

A job id to uniquely identify a job

String

jobType optional

query

A job type

String

jobName optional

query

A job name. Note: the system ensures the uniqueness of the combinatoin of job name and job type. There may be jobs with the same job name and differnt job types. Querying by a job name may result in run instances of multiple jobs

String

startTime optional

query

The time when a job run instance starts. You must specify the date in in ISO-8601 format. Please refer the filtering page on how to using filtering based on dates.

Sample Payloads

Sample payloads are for information only. They are automatically generated and the values included may not be representative of actual valid data values.

Sample XML Response Payload

https://szier-m8-106.cisco.com/webacs/api/v1/op/jobService/runhistory

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mgmtResponse rootUrl="https://szier-m8-106.cisco.com/webacs/api/v1/op/" requestUrl="https://szier-m8-106.cisco.com/webacs/api/v1/op/jobService/runhistory" responseType="operation">
    <job>
        <description>String value</description>
        <jobId>2</jobId>
        <jobName>String value</jobName>
        <jobStatus>SCHEDULED</jobStatus>
        <jobType>String value</jobType>
        <nextRunTime>2014-12-04T10:16:38.059-08:00</nextRunTime>
        <runInstances>
            <runInstance>
                <completionTime>2014-12-04T10:16:38.062-08:00</completionTime>
                <lastStartTime>2014-12-04T10:16:38.062-08:00</lastStartTime>
                <resultStatus>UNKNOWN</resultStatus>
                <results>
                    <result>
                        <property>String value</property>
                        <value>String value</value>
                    </result>
                </results>
                <runId>2</runId>
                <runStatus>UNKNOWN</runStatus>
            </runInstance>
        </runInstances>
    </job>
</mgmtResponse>

Sample JSON Response Payload

https://szier-m8-106.cisco.com/webacs/api/v1/op/jobService/runhistory.json

{
  "mgmtResponse" : {
    "@rootUrl" : "https : \/\/szier-m8-106.cisco.com\/webacs\/api\/v1\/op\/",
    "@requestUrl" : "https : \/\/szier-m8-106.cisco.com\/webacs\/api\/v1\/op\/jobService\/runhistory",
    "@responseType" : "operation",
    "job" : {
      "description" : "String value",
      "jobId" : 2,
      "jobName" : "String value",
      "jobStatus" : "SCHEDULED",
      "jobType" : "String value",
      "nextRunTime" : "2014-12-04T10 : 16 : 38.067-08 : 00",
      "runInstances" : {
        "runInstance" : {
          "completionTime" : "2014-12-04T10 : 16 : 38.070-08 : 00",
          "lastStartTime" : "2014-12-04T10 : 16 : 38.070-08 : 00",
          "resultStatus" : "UNKNOWN",
          "results" : {
            "result" : {
              "property" : "String value",
              "value" : "String value"
            }
          },
          "runId" : 2,
          "runStatus" : "UNKNOWN"
        }
      }
    }
  }
}