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
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Resource Preferences
Type: object
Title: Resource Preferences
The collection of resource preferences that can be assigned to an activity.
Show Source
Nested Schema : Items
Type: array
Title: Items
The array of required preferences for the specified activity.
Show Source
Nested Schema : Resource Preference
Type: object
Title: Resource Preference
The resource preference of an activity.
Show Source
  • Title: Preference Type
    Allowed Values: [ "required", "preferred", "forbidden" ]
    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.
  • Title: Resource ID
    The unique identifier of the resource in Oracle Field Service Cloud.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

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>.etadirect.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>.etadirect.com/rest/ofscCore//v1/activities/4225269/resourcePreferences"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscCore//v1/metadata-catalog/activities#definitions/resourcePreferences"
        }
    ]
}
Back to Top