Create work plan for a resource
post
/rest/ofscCore/v1/resources/{resourceId}/plans
This operation creates a work plan for the specified group resource.
A field manager can use work plans in the Oracle Field Service Mobility application to measure the planned amount of working time of a group resource for a particular day.
Request
Path Parameters
-
resourceId(required): string
The unique identifier of the resource in Oracle Field Service. This maps to the resource field 'external_id' and is not necessarily set for all resources. The resources without this parameter are not visible to the operation.
Root Schema : Work Plan
Type:
object
Title:
Work Plan
The work plan for the resource.
Show Source
-
date:
string
Title:
Date
The date when the work plan is assigned to the resource. Specify the date in YYYY-MM-DD format. -
measure:
string
Title:
Measure
Allowed Values:[ "man_hours", "points", "scheduled", "FTE" ]
The type of measure used for the work plan. -
value:
number
Title:
Value
Minimum Value:0
Maximum Value:65535
The value of the measure.
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 create work plan for resource by submitting a POST request on the REST resource.
Example of Request Header
The following shows an example of the request header.
POST /rest/ofscCore/v1/resources/44035/plans HTTP/1.0 Authorization: Basic c29hcEB5YW1hdG86MQ== Host: <instance_name>.fs.ocs.oraclecloud.com Accept: */*
Example of Request Body
The following shows an example of the request body in JSON format.
{ "measure": "points", "date": "2015-11-27", "value": "340" }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 OK Server: nginx/1.6.2 Date: Tue, 28 Jul 2015 10:06:02 GMT Content-Type: application/json; charset=utf-8