/
CancelDependencyGroupJobs RESTified API

CancelDependencyGroupJobs RESTified API

5.4.0

A pass-through API to Scheduling (when configured) which allows the Scheduling's "Cancel Dependency Group Jobs" API to be called.

Description

The sp:CancelDependencyGroupRequest API method allows:

to be cancelled, via the supplied MultiJobID or JobID. Logged on, logged off and/or cleared jobs can optionally be left uncancelled.   

Please Note:

When jobs in a dependency group are cancelled, the dependencies between any uncancelled jobs will be removed (i.e. the MultiJobID will be removed from any remaining uncancelled jobs).

However, when long-duration job s in a split dependency group are cancelled, the dependencies between any uncancelled jobs will not be removed (i,.e. the MultiJobID will not be removed from any remaining uncancelled jobs, even if there is only one remaining job).

This API must be used to cancel appointments that have been booked as split/fragmented jobs.

This API should be used to cancel longer duration jobs.

In this context, the Scheduling "Cancel Dependency Group Jobs" API is the sp:CancelDependencyGroupRequest API.

On this page:

Related pages:

Resource URL Summary

Pass Through Call to Scheduling's "Cancel Dependency Group Jobs" API

PUT /up/v5/rest/scheduling/CancelDependencyGroup

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

Pass Through Call to Scheduling's "Cancel Dependency Group Jobs" API

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

URL

PUT /up/v5/rest/scheduling/CancelDependencyGroup

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 "Cancel Dependency Group Jobs" APi.

CancelDependencyGroupJobs Object Format

CancelDependencyGroupJobs JSON
{
 	"Id": "Dep-1306",
 	"CancelOptions": {
    	"DontCancelCleared": "true",
    	"DontCancelLoggedOff": "true",
    	"IsJobID": "true"
  	},
  	"CancelReason": {
    	"CancelReasonId": 1,
    	"CancelReasonDesc": ""
  	}
}

CancelDependencyGroupJobs Object Properties

PropertyTypeLengthDescriptionReq?Mapping Field: Service Scheduling
Id

string

SS: JobID

SS: 50

Pass through parameter to the Scheduling Cancel Dependency Group Jobs API. 

MultiJobID is normally the unique identifier of the dependency group, but, if IsJobID is set, it can alternatively be the JobID of any of the jobs in a dependency group.

Yes

multiJobID

CancelOptionsobject

Pass through parameter to the Scheduling Cancel Dependency Group Jobs API. 


No

See: CancelOption.objects

CancelReasonobject

Pass through parameter to the Scheduling Cancel Dependency Group Jobs API. 


No

See: CancelReason.objects

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


HTTP Response

Success

On success, a JSON-formatted version of the Scheduling "Cancel Dependency Group Jobs" 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 "Cancel Dependency Group Jobs" 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_OPTIONS_INVALID (80)
  • SP_MULTIJOBID_INVALID (563)
  • SP_MULTIJOBID_DOES_NOT_EXIST (622)
  • SP_JOBID_DOES_NOT_EXIST (623)
  • SP_JOBID_NOT_IN_DG (624)

Please Note:

Note: If MultiJobID is empty or is longer than JobID size, SP_MULTIJOBID_INVALID (563) is returned if IsJobID is not set, and SP_JOBID_INVALID (1) is returned if IsJobID is set.

Note: If MultiJobID does not exist in the ServiceOptimizer memory horizon as a Dependency Group identifier and IsJobID is not set, SP_MULTIJOBID_DOES_NOT_EXIST (622) is returned.

Note: If MultiJobID does not exist in the ServiceOptimizer memory horizon as a Job identifier (JobID) and IsJobID is set, SP_JOBID_DOES_NOT_EXIST (623) is returned.

           If MultiJobID does exist as a Job identifier (JobID) and IsJobID is set but the Job it identifies is not in a Dependency Group, SP_JOBID_NOT_IN_DG (624) is returned.

Important:

If there are any jobs in the Dependency Group that are outside the ServiceOptimizer memory horizon, all references to them through dependencies are removed and the sp:CancelDependencyGroupRequest call will succeed, but those jobs themselves aren’t removed from the database by this call.

Related content

Cancel Dependency Group Jobs SOAP API
Cancel Dependency Group Jobs SOAP API
More like this
Cancel Dependency Group Jobs SOAP API
Cancel Dependency Group Jobs SOAP API
More like this
Integration ServiceOptimizer Cancel Dependency Group Jobs SOAP API
Integration ServiceOptimizer Cancel Dependency Group Jobs SOAP API
More like this