Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

GET jobService/runhistory

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")

Since Product Version: 2.2

Resource Information

Rate Limiting?

No

Sorting?

No

Paging?

No

Filtering?

No

Group Filtering?

No

Aggregation?

No

Response Formats

xml

json

User Group

NBI Read

HTTP Methods

GET

Resource URL

/webacs/api/v4/op/jobService/runhistory

Unmodified

This resource has not been modified since the previous API version.

Request Parameters

Attribute Source Description

jobId String

query

Optional

A job id to uniquely identify a job

jobType String

query

Optional

A job type

jobName String

query

Optional

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

startTime String

query

Optional

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.

Response Parameters

Attribute Description

description String

The description of a job

jobId long

The id of a job to uniquely identify a job

jobName String

The name of a job. Job name and job type together should be unique.

jobStatus JobSpecState

The status of a job

  • SCHEDULED
  • COMPLETED
  • SUSPENDED
  • CANCELLED
  • PENDINGAPPROVAL
  • EXPIREDBEFOREAPPROVAL
  • UNDEFINED

jobType String

The type of a job

nextRunTime Date

The time when the job will be trigger next time

runInstances Arrow image RunInstance[]

A list of run instances of the job

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://localhost/webacs/api/v4/op/jobService/runhistory?jobType="Wireless System"

<?xml version="1.0" ?>
<mgmtResponse responseType="operation" requestUrl="https://localhost/webacs/api/v4/op/jobService/runhistory?jobType=&amp;quot;Wireless System&amp;quot;" rootUrl="https://localhost/webacs/api/v4/op">
  <job>
    <description>String value</description>
    <jobId>2</jobId>
    <jobName>String value</jobName>
    <jobStatus>SCHEDULED</jobStatus>
    <jobType>String value</jobType>
    <nextRunTime>1986-07-24T00:00:00Z</nextRunTime>
    <runInstances>
      <runInstance>
        <completionTime>1986-07-24T00:00:00Z</completionTime>
        <lastStartTime>1986-07-24T00:00:00Z</lastStartTime>
        <resultStatus>UNKNOWN</resultStatus>
        <results>
          <result>
            <property>String value</property>
            <value>String value</value>
          </result>
          <result>
            <property>Another string value</property>
            <value>Another string value</value>
          </result>
        </results>
        <runId>2</runId>
        <runStatus>UNKNOWN</runStatus>
      </runInstance>
      <runInstance>
        <completionTime>1991-01-11T00:00:00Z</completionTime>
        <lastStartTime>1991-01-11T00:00:00Z</lastStartTime>
        <resultStatus>SUCCESS</resultStatus>
        <results>
          <result>
            <property>String value</property>
            <value>String value</value>
          </result>
          <result>
            <property>Another string value</property>
            <value>Another string value</value>
          </result>
        </results>
        <runId>12</runId>
        <runStatus>CREATED</runStatus>
      </runInstance>
    </runInstances>
  </job>
  <job>
    <description>Another string value</description>
    <jobId>12</jobId>
    <jobName>Another string value</jobName>
    <jobStatus>COMPLETED</jobStatus>
    <jobType>Another string value</jobType>
    <nextRunTime>1991-01-11T00:00:00Z</nextRunTime>
    <runInstances>
      <runInstance>
        <completionTime>1986-07-24T00:00:00Z</completionTime>
        <lastStartTime>1986-07-24T00:00:00Z</lastStartTime>
        <resultStatus>UNKNOWN</resultStatus>
        <results>
          <result>
            <property>String value</property>
            <value>String value</value>
          </result>
          <result>
            <property>Another string value</property>
            <value>Another string value</value>
          </result>
        </results>
        <runId>2</runId>
        <runStatus>UNKNOWN</runStatus>
      </runInstance>
      <runInstance>
        <completionTime>1991-01-11T00:00:00Z</completionTime>
        <lastStartTime>1991-01-11T00:00:00Z</lastStartTime>
        <resultStatus>SUCCESS</resultStatus>
        <results>
          <result>
            <property>String value</property>
            <value>String value</value>
          </result>
          <result>
            <property>Another string value</property>
            <value>Another string value</value>
          </result>
        </results>
        <runId>12</runId>
        <runStatus>CREATED</runStatus>
      </runInstance>
    </runInstances>
  </job>
</mgmtResponse>

Sample JSON Response Payload

https://localhost/webacs/api/v4/op/jobService/runhistory.json?jobType="Wireless System"

{
  "mgmtResponse" : {
    "@requestUrl" : "https://localhost/webacs/api/v4/op/jobService/runhistory?jobType=&quot;Wireless System&quot;",
    "@responseType" : "operation",
    "@rootUrl" : "https://localhost/webacs/api/v4/op",
    "job" : [ {
      "description" : "String value",
      "jobId" : 2,
      "jobName" : "String value",
      "jobStatus" : "SCHEDULED",
      "jobType" : "String value",
      "nextRunTime" : "1986-07-24T00:00:00.000Z",
      "runInstances" : {
        "runInstance" : [ {
          "completionTime" : "1986-07-24T00:00:00.000Z",
          "lastStartTime" : "1986-07-24T00:00:00.000Z",
          "resultStatus" : "UNKNOWN",
          "results" : {
            "result" : [ {
              "property" : "String value",
              "value" : "String value"
            }, {
              "property" : "Another string value",
              "value" : "Another string value"
            } ]
          },
          "runId" : 2,
          "runStatus" : "UNKNOWN"
        }, {
          "completionTime" : "1991-01-11T00:00:00.000Z",
          "lastStartTime" : "1991-01-11T00:00:00.000Z",
          "resultStatus" : "SUCCESS",
          "results" : {
            "result" : [ {
              "property" : "String value",
              "value" : "String value"
            }, {
              "property" : "Another string value",
              "value" : "Another string value"
            } ]
          },
          "runId" : 12,
          "runStatus" : "CREATED"
        } ]
      }
    }, {
      "description" : "Another string value",
      "jobId" : 12,
      "jobName" : "Another string value",
      "jobStatus" : "COMPLETED",
      "jobType" : "Another string value",
      "nextRunTime" : "1991-01-11T00:00:00.000Z",
      "runInstances" : {
        "runInstance" : [ {
          "completionTime" : "1986-07-24T00:00:00.000Z",
          "lastStartTime" : "1986-07-24T00:00:00.000Z",
          "resultStatus" : "UNKNOWN",
          "results" : {
            "result" : [ {
              "property" : "String value",
              "value" : "String value"
            }, {
              "property" : "Another string value",
              "value" : "Another string value"
            } ]
          },
          "runId" : 2,
          "runStatus" : "UNKNOWN"
        }, {
          "completionTime" : "1991-01-11T00:00:00.000Z",
          "lastStartTime" : "1991-01-11T00:00:00.000Z",
          "resultStatus" : "SUCCESS",
          "results" : {
            "result" : [ {
              "property" : "String value",
              "value" : "String value"
            }, {
              "property" : "Another string value",
              "value" : "Another string value"
            } ]
          },
          "runId" : 12,
          "runStatus" : "CREATED"
        } ]
      }
    } ]
  }
}