/
UpdateJobFinishTime RESTified API

UpdateJobFinishTime RESTified API

5.4.0

A pass-through API to Scheduling (when configured) which allows the Scheduling's "Update Job Finish Time" API to be called.  

Description

Subject to the rules for the options, changes to the job’s start time, arrival time and finish time, as well as any changes to its dispatch status, will be dispatched and, if the job is in jeopardy, the jeopardy conditions will appear on the Gantt jeopardy report in the normal way. For example: if a job is earmarked, its start time is changed by JobChangeStartTimeRequest (with SP_OptJobSetStatusBack set) so that it then falls outside the inform lead time, the job will subsequently be unearmarked. Alternatively, if a job’s completion time is made later in time and if it then overlaps another job, this will be reported as being in jeopardy.

Changes to the job’s start time, arrival time and finish time, as well as any changes to its dispatch status will subsequently become visible on the Gantt chart.

In this context, the Scheduling "Update Job Finish Time" API is the sp:JobChangeFinishTimeRequest API.

On this page:

Related pages:

Resource URL Summary

Pass Through Call to Scheduling's "Update Job Finish Time" API

PUT /up/v5/rest/scheduling/ChangeJobFinishTime

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

Pass Through Call to Scheduling's "Update Job Finish Time" API

This RESTified API will perform a pass-through call to the Scheduling sub-system's "Update Job Finish Time" API (when configured).

URL

PUT /up/v5/rest/scheduling/ChangeJobFinishTime

HTTP Request Body

This request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the Scheduling "Update Job Finish Time" APi.

UpdateJobFinishTime Object Format

UpdateJobFinishTime JSON
{
    "Id": "JobId",
    "ChangeTime": "DateTime",
    "Options": {
        "SetStatusBack": false
    }
}

UpdateJobFinishTime Object Properties

PropertyTypeLengthDescriptionReq?Field Mapping: Scheduling
Id

string

SS: 50

Pass through parameter to the Scheduling Update Job Arrival Time API.   

The identifier of the job to be updated. The error SP_JOBID_INVALID (1) will be returned if the supplied JobID does not exist in the ServicePower database.

Yes

jobID

ChangeTime

string

SS: spDateTime (string)

SS: 16

Pass through parameter to the Scheduling Update Job Arrival Time API.  

The job's new finish date-time.

Example: "2023-03-30T14:15"

Yes

finishTime

Optionsobject

Pass through parameter to the Scheduling Update Job Arrival Time API.  See UpdateJobFinishTime Options Object.


No

See UpdateJobFinishTime Options Object.



HTTP Response

Success

On success, a JSON-formatted version of the Scheduling "Update Job Finish Time" API response will be returned.

{
	"Success": true,
	"Code": "0",
	"Message": "",
	"Payload": {
    	"result": {
      		"type": "OK",
      		"code": "0"
    	}
  	}
}

Error

On error, a JSON-formatted version of the Scheduling "Update Job Finish Time" API response will be returned.

{
    "Success": false,
    "Code": 9,
    "Payload": {
        "returnCode": {
            "type": "Error",
            "code": "SCH Error Code"
        }
    }
}

Return Codes

In addition to the  Standard Return Codes, and the Scheduling Error codes, the possible Return Codes from this API are:

 Click here to expand...
  • SP_OK (0)
  • SP_JOBID_INVALID (1)
  • SP_DURATION_INVALID (12)
  • SP_END_NOT_GT_START_TIME (31)
  • SP_OUTSIDE_HORIZON (53)
  • SP_OPTIONS_INVALID (80)
  • SP_UNRESOURCED_JOB (148)
  • SP_OUTSIDE_FRU_POSTING (264)
  • SP_OK_WITH_OVERLAPS (373)
  • SP_WOULD_SPAN_DAYS (374)
  • SP_DST_TIME_INVALID (379)
  • SP_START_MOVED_TOO_FAR (386)
  • SP_ARRIVES_ON_ANOTHER_DAY (387)
  • SP_JOB_TOO_LONG (388)
  • SP_DATETIME_INVALID (538)

Note:

SP_DURATION_INVALID (12) is returned if the job’s new Finish time would be the same as or before its Arrival time.

SP_END_NOT_GT_START_TIME (31) is returned if:

    • the job’s Arrival time would be earlier than its Start time, or
    • the job’s Finish time would be earlier than its Start time

Related content

UpdateJobArrivalTime RESTified API
UpdateJobArrivalTime RESTified API
More like this
UpdateJobStartTime RESTified API
UpdateJobStartTime RESTified API
More like this
Update Job Finish Time SOAP API
Update Job Finish Time SOAP API
More like this
Update Job Finish Time SOAP API
Update Job Finish Time SOAP API
More like this
Update Job Start Time SOAP API
Update Job Start Time SOAP API
More like this