Move an activity

post

/rest/ofscCore/v1/activities/{activityId}/custom-actions/move

This operation moves the activity according to specified parameters.

  • If the value of the setDate parameter is specified, then the activity is moved to the specified date.
  • If the value of the setResource parameter is specified, then the activity is reassigned to another resource.
  • If the value of the setPositionInRoute parameter is specified, then the order of the activity is changed.

These parameters can be combined into a single request when the actions have to be performed simultaneously.

The operation fails in the following instances:

  • The destination resource is a field resource and the specified date is not a working day for the resource.
  • The destination resource is a field resource and does not have a user account assigned.
  • The destination resource is inactive.
  • The destination date is greater than the value configured in the 'Future days limit' setting. The default value of the 'Future days limit' setting is 1098.
  • The destination date is in the past.
  • The destination resource does not exist or it cannot be assigned to activities.
  • The operation is disabled for the specified activity type.
  • The values specified in the request parameters are invalid.

Request

Path Parameters
Body ()
Root Schema : Custom Action Activity Move Schema
Type: object
Title: Custom Action Activity Move Schema
The schema of the request body object for this operation.
Show Source
Nested Schema : Set Date
Type: object
Title: Set Date
The activity is scheduled to the date specified in the 'date' parameter only if this object is available.
Show Source
  • Title: Date
    The activity is rescheduled to the specified date. Specify either the date in the 'YYYY-MM-DD' format or specify NULL.

    If NULL is specified and the setDate object is available, then the activity is considered as non-scheduled.

Nested Schema : Set Position in Route
Type: object
Title: Set Position in Route
The value of this element determines the position of the activity in the route. If this element is present then activity will be put to specified position in route. The parameter is optional, if it is absent then the value "position: byServiceWindow" is used.
Show Source
  • Title: Activity ID
    The unique identifier of the activity in Oracle Field Service Cloud. If the value of the parameter 'position' is 'afterActivity', then the other activity is scheduled after this activity.
  • Title: Position
    Allowed Values: [ "first", "last", "notOrdered", "byServiceWindow", "afterActivity" ]
    The position of the activity in the route.
Nested Schema : Set Resource
Type: object
Title: Set Resource
The activity is reassigned to the specified resource only if this object is available.
Show Source
Back to Top

Response

Supported Media Types

204 Response

This section describes the 204 status response for this operation. This response code indicates that the operation completed successfully.

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 move an activity by submitting a POST request on the REST resource using cURL.

curl -X 'POST' \
     -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
     -H 'Content-Type: application/json' \
     --data-binary '{
    "setDate": {
        "date": null
    }
}' \
     'https://<instance_name>.etadirect.com/rest/ofscCore/v1/activities/4225269/custom-actions/move'

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: Fri, 18 Mar 2016 02:26:50 GMT
Content-Type: application/json; charset=utf-8
Connection: close
Back to Top