Job Management API

/api/space/job-management/jobs/{id}

The following operations are supported on this resource:

GET /api/space/job-management/jobs/{id} (v2)


This API retrieves information about a single job specified by job ID. The API returns the information in a JobInfo transfer object.

Access Control

The following capabilities are required to access this API:
"JobMgr"


Example Usage

GET /api/space/job-management/jobs/{id}


Parameters

NameTypeURI TypeDescriptionRequired
job-instance-idIntegerPathThe job instance ID for the job whose information will be retrieved. Y

Data Notification

This API supports data notification.

See the following links for information about enabling data notifications changes to be received for this service:

  • Data Notification Usage.


Content Types

  • Produces content types:
    application/vnd.net.juniper.space.job-management.job+xml;version=2;q=0.02
    application/vnd.net.juniper.space.job-management.job+json;version=2;q=0.02


  • Sample Output XML:
    <job href="/api/space/job-management/jobs/{id}" uri="/api/space/job-management/jobs/{id}">
         <id>Integer</id>
         <name>String</name>
         <job-type>String</job-type>
         <detail-link>
               <name>String</name>
         </detail-link>
         <job-state>SCHEDULED</job-state>
         <job-status>UNDETERMINED</job-status>
         <percent-complete>Double</percent-complete>
         <scheduled-start-time>String</scheduled-start-time>
         <start-time>String</start-time>
         <end-time>String</end-time>
         <user>String</user>
         <summary>String</summary>
         <schedule-string>String</schedule-string>
         <cancel href="/api/space/job-management/jobs/{id}/cancel"/>
         <progress-update href="/api/space/job-management/jobs/{id}/progress-update"/>
    </job>


  • Sample Output JSON:
    {
       "job" : {
         "@href" : "/api/space/job-management/jobs/{id}" ,
         "@uri" : "/api/space/job-management/jobs/{id}" ,
         "id" : "Integer" ,
         "name" : "String" ,
         "job-type" : "String" ,
         "detail-link" : {
           "name" : "String"
         } ,
         "job-state" : "SCHEDULED" ,
         "job-status" : "UNDETERMINED" ,
         "percent-complete" : "Double" ,
         "scheduled-start-time" : "String" ,
         "start-time" : "String" ,
         "end-time" : "String" ,
         "user" : "String" ,
         "summary" : "String" ,
         "schedule-string" : "String" ,
         "cancel" : {
           "@href" : "/api/space/job-management/jobs/{id}/cancel"
         } ,
         "progress-update" : {
           "@href" : "/api/space/job-management/jobs/{id}/progress-update"
         }
       }
    }



    For the deprecated versions of this API, refer to :
  • version 1

DELETE /api/space/job-management/jobs/{id} (v1)


This API is used to cancel a job specified by job ID. Only root jobs can be cancelled. A job can be cancelled only if it is scheduled to run in the future and has not yet started. Running or completed jobs cannot be canceled.

Access Control

The following capabilities are required to access this API:
"CancelJob"


Example Usage

DELETE /api/space/job-management/jobs/{id}


Parameters

NameTypeURI TypeDescriptionRequired
idintPathThe job ID of the job to be cancelled. Y