Get resource preferences of an activity
get
/rest/ofscCore/v1/activities/{activityId}/resourcePreferences
This operation retrieves the resource preferences for the specified activity. Resource preferences identify whether a resource should be assigned to the activity or not.
Request
Path Parameters
-
activityId(required): string
The unique identifier of the activity in Oracle Field Service.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Resource Preferences
Type:
object
Title:
Resource Preferences
The collection of resource preferences that can be assigned to an activity.
Show Source
-
items:
array Items
Title:
Items
The array of required preferences for the specified activity.
Nested Schema : Items
Type:
array
Title:
Items
The array of required preferences for the specified activity.
Show Source
-
Array of:
object Resource Preference
Title:
Resource Preference
The resource preference of an activity.
Nested Schema : Resource Preference
Type:
object
Title:
Resource Preference
The resource preference of an activity.
Show Source
-
preferenceType(required):
string
Title:
Preference Type
Allowed Values:[ "required", "preferred", "forbidden", "warehouse" ]
The type of resource preference for the activity.- preferred - the resource is preferred while routing.
- required - the activity can only be assigned to a required resource.
- forbidden - the activity cannot be assigned to the specified resource.
- warehouse - inventory may be installed from the specified resource
-
resourceId:
string
Title:
Resource ID
The unique identifier of the resource in Oracle Field Service.
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 resource preferences of an activity by submitting a GET request on the REST resource using cURL.
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \ -H 'Accept: application/json' \ 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225269/resourcePreferences'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.2.7 Date: Fri, 18 Mar 2016 02:20:16 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": [ ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore//v1/activities/4225269/resourcePreferences" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore//v1/metadata-catalog/activities#definitions/resourcePreferences" } ] }