Get work plans for a resource
get
/rest/ofscCore/v1/resources/{resourceId}/plans
This operation retrieves the list of work plans assigned to 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
Supported Media Types
- application/x-www-form-urlencoded
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.
Query Parameters
-
dateFrom(required): string
The work plans assigned to the resource from the specified date are retrieved. Specify the date in YYYY-MM-DD format.
-
dateTo(required): string
The work plans assigned to the resource till the specified date are retrieved. Specify the date in YYYY-MM-DD format.
Response
Supported Media Types
- application/json
204 Response
This section describes the 204 status response for this operation.
Root Schema : Work plans
Type:
objectTitle:
Work plansThe collection of work plans assigned to the resource.
Show Source
-
items:
array Items
Title:
ItemsThe array of items containing the details of the work plans assigned to the resource. -
totalResults:
integer
Title:
Total ResultsThe total number of results returned.
Nested Schema : Items
Type:
arrayTitle:
ItemsThe array of items containing the details of the work plans assigned to the resource.
Show Source
-
Array of:
object Work Plan
Title:
Work PlanThe work plan for the resource.
Nested Schema : Work Plan
Type:
objectTitle:
Work PlanThe work plan for the resource.
Show Source
-
date:
string
Title:
DateThe date when the work plan is assigned to the resource. Specify the date in YYYY-MM-DD format. -
measure:
string
Title:
MeasureAllowed Values:[ "man_hours", "points", "scheduled", "FTE" ]The type of measure used for the work plan. -
value:
number
Title:
ValueMinimum Value:0Maximum Value:65535The value of the measure.
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 get work plans for resource by submitting a GET request on the REST resource.
Example of Request Header
The following shows an example of the request header.
GET /rest/ofscCore/v1/resources/44035/plans?dateFrom=2015-10-28&dateTo=2015-12-01 HTTP/1.0 Authorization: Basic c29hcEB5YW1hdG86MQ== Host: <instance_name>.fs.ocs.oraclecloud.com Accept: */*
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Fri, 24 Jul 2015 08:35:48 GMT Content-Type: application/json; charset=utf-8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"items": [
{
"resourceId": "44035",
"measure": "points",
"date": "2015-11-27",
"value": "340",
}
],
"totalResults": 1,
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/44035/plans"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/resources"
}
]
}