Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
title5.4.0

A pass-through API to ServiceScheduling Scheduling (when configured) which allows the ServiceSchedulingScheduling's "Cancel Job" API to be called.

Description

Cancelling a job in ServiceOptimizer causes the the job to be completely removed from the system, although, if activated, an audit trail for the job will remain.

Info

In this context, the ServiceScheduling "Scheduling Cancel Job " API is the the sp:JobCancelRequest API API.  



Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

On this page:

Table of Contents
maxLevel2

Related pages:


Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Pass Through Call to ServiceSchedulingScheduling's "Cancel Job" API

PUT /up/v5/rest/scheduling/CancelJob

Include Page
_Default HTTP Headers
_Default HTTP Headers


API Specifics


.

string

SS: JobID (string)
Panel
borderColor#D3D3D3

Pass Through Call to

ServiceScheduling

Scheduling's "Cancel Job" API

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

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /up/v5/rest/scheduling/CancelJob

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 ServiceScheduling the Scheduling "Cancel Job" APi.

CancelJob Object Format

Code Block
languagejs
titleCancelJob JSON
collapsetrue
{
	"Id": "Dep-1306",
	"CancelReason": {
		"cancelReasonId": 1,
    	"cancelReasonDesc": ""
	}
}

CancelJob Object Properties (Bold property names indicate the field is required)

PropertyTypeLengthDescriptionReq?
Id
Mapping Field: Service Scheduling
Id

string

SS: 50

Pass through parameter to

the ServiceScheduling "Cancel Job" API

the Scheduling Cancel Job API

Yes

SS Field:

jobID

Yes

CancelReasonobject

Pass through parameter to

the ServiceScheduling "

the Scheduling Cancel Dependency Group

Jobs"

Jobs API. 

SS Field: cancelReason

PropertyTypeLengthDescription

Req?CancelReasonId

string

SS: CancelReasonId (integer)

Cancellation reason ID

SS Field: cancelReason.cancelReasonId

No

CancelReasonDesc

string

SS: CancelDescriptionStr (string)

SS: 500

Free-form text reason for cancellation

SS Field: cancelReason.cancelDescription

NoNo


No

see cancelReason.objects


Info

Cancellation reason details were added to the ServiceScheduling Scheduling "Cancel Job" API in version 11.3. When cancellation reason details are provided in a call to the ServiceBroker CancelJob RESTified API endpoint, and the ServiceScheduling Scheduling version in use is prior to 11.3, the cancellation details will not be passed through to the underlying ServiceScheduling Scheduling instance.


HTTP Response

Success

On success, a JSON-formatted version of the ServiceScheduling Scheduling "Cancel Job" API response will be returned.

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

Error

On error, a JSON-formatted version of the ServiceScheduling Scheduling "Cancel Job" API response will be returned.

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

Return Codes

In addition

to

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

Expand
  • SP_OK (0)
  • SP_JOBID_INVALID (1)