Deactivate a resource route
post
/rest/ofscCore/v1/resources/{resourceId}/routes/{date}/custom-actions/deactivate
This operation deactivates the specified resource's route only for the current date.
Note:If the Overnight work field is set to a non-zero value in the Configuration, Business rules screen, then it is possible to deactivate the resource's route on the previous day.
Request
Path Parameters
-
date(required): string
The date on which the resource's route has to be deactivated. Specify the date in YYYY-MM-DD format.
-
resourceId(required): string
The unique identifier of the resource in Oracle Field Service.
Root Schema : schema
Type:
Show Source
object
-
time:
string
Title:
Time
The time when the resource's route is deactivated. Specify the time in YYYY-MM-DD HH:MM:SS format and in the time zone of the resource to which the route is assigned. The default value is the current time.
Response
Supported Media Types
- application/json
204 Response
This section describes the 204 status response for this operation.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to deactivate resource route by submitting a POST request on the REST resource using cURL.
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \ -H 'Accept: application/json' \ -X POST \ --data-binary '{"time": "2016-04-25 19:14:20"}' \ 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/33011/routes/2016-01-25/custom-actions/deactivate'
Example of Request Header
The following shows an example of the resquest header.
POST /rest/ofscCore/v1/resources/33011/routes/2016-01-25/custom-actions/deactivate HTTP/1.0 Authorization: Basic c29hcEB5YW1hdG86MQ== Host: <instance_name>.fs.ocs.oraclecloud.com Accept: */* Content-Type: application/json; charset=utf-8 Content-Length: 31
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "time": "2016-04-25 19:14:20" }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No Content Server: nginx/1.2.7 Date: Mon, 25 Apr 2016 12:14:22 GMT Content-Type: application/json; charset=utf-8 Connection: close