Activities: List of Tasks

You can perform the following tasks using the Activities resource:

Task Task Type URI Description

Create new activity

POST

/rest/ofscCore/v1/activities

This operation will create a new activity.

The new activity will have a 'pending' status.

Delete activity

DELETE

/rest/ofscCore/v1/activities/{activityId}

This operation deletes the specified activity when the following conditions are met:
  • The activity status is 'pending.'

  • The activity date must not be in the past.

  • The route must not be started.

Note:

If the activity is 'started', the Cancel action must be used

Get activities

GET

/rest/ofscCore/v1/activities

This operation returns a list of activities matching a specified criteria.

Get activity

GET

/rest/ofscCore/v1/activities/{activityId}

This operation retrieves activity properties for the specified activity.

Update activity

PATCH

/rest/ofscCore/v1/activities/{activityId}

This operation updates the properties of the specified activity.

The properties that can't be updated include date, status, resourceId, activityId, positionInRoute, and custom properties of type 'file'.

Where is my technician

GET

/rest/ofscCore/v1/whereIsMyTech

This operation provides integrators a unified method to retrieve activity status and technician information in a single request. This API can be used only when the following conditions are satisfied:

  • Customer must have a subscription to Oracle Field Service Customer communication Cloud Service
  • Permission to access Core API for Activity is granted in the Configuration > Applications > API access section of the required application.

If either of the conditions are not satisfied, the response will return a '403 Forbidden' error message.

Delete file property

DELETE

/rest/ofscCore/v1/activities/{activityId}/{propertyLabel}

This operation deletes the specified 'file' property for the specific activity.

Get file property

GET

/rest/ofscCore/v1/activities/{activityId}/{propertyLabel}

This operation gets the specified 'file' property for the specific activity.

You can resume an incomplete download by identifying the offset in the range header. For example, "Range: bytes=1000-" means that downloading starts from offset 1000 bytes up to the end of the file.

Set file property

PUT

/rest/ofscCore/v1activities/{activityId}/{propertyLabel}

This operation creates the specified 'file' property for the specific activity.

Cancel activity

POST

/rest/ofscCore/v1activities/{activityId}/custom-actions/cancel

This operation sets the status of a specified pending activity to 'cancelled'.

The operation fails if the specified activity has status other than 'pending', or if the activity has 'date' in the past.

complete activity

POST

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

This operation sets the activity status to 'completed'.

The operation fails if the specified activity has status other than 'started' or if the activity has 'date' in the past.

Move activity

POST

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

This operation moves the activity according to specified parameters.
  • If the setDate parameter is specified, the activity is moved to the specified date.

  • If the setResource parameter is specified, the activity is reassigned to another resource.

  • If the setPositionInRoute parameter is specified, the activity order is changed.

It's possible to combine these three parameters into a single request where the actions are performed simultaneously.

NotDone activity

POST

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

This operation sets the activity status to 'notDone'.

The operation fails if the specified activity has a status other than 'started' or if the activity has 'date' in the past.

Search for activities

GET

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

This operation returns all activities matching the search criteria.

Start activity

POST

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

This operation is used to set the activity status to 'started'.

The operation fails if the specified activity has a status other than 'pending', or if the activity has 'date' in the past.

Suspend activity

POST

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

This operation suspends the specified activity. This is available when the activity is in a 'started' or 'pending' status. This method works as follows:
  • For started activities, this method changes the activity status to 'pending', making it not-ordered and creates a new 'suspended' activity duplicating the original one. The 'end_time' of the 'suspended' activity is set to the time when the activity was suspended. If the end time is specified in the request, then the activity properties are updated for both activities.

  • For pending activities, this method makes the activity not-ordered but doesn't create a new activity.

Get customer inventories

GET

/rest/ofscCore/v1/activities/{activityId}/customerInventories

This operation retrieves data about the inventories in the customer's install and deinstall pools of the specified activity.

Get deinstalled inventories

GET

/rest/ofscCore/v1/activities/{activityId}/deinstalledInventories

This operation retrieves the list of the inventories deinstalled during the specified activity. Such inventories have a status of deinstalled.

Get installed inventories

GET

/rest/ofscCore/v1/activities/{activityId}/installedInventories

This operation retrieves the list of inventories installed during the specified activity. Such inventories have a status of installed.

Create activity link

POST

/rest/ofscCore/v1/activities/{activityId}/linkedActivities

This operation creates a new link for the specified activity.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Delete all activity links

DELETE

/rest/ofscCore/v1/activities/{activityId}/linkedActivities

This operation removes all the links for the specified activity.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Get activity links

GET

/rest/ofscCore/v1/activities/{activityId}/linkedActivities

This operation returns a list of links for the specified activity.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Delete activity link

DELETE

/rest/ofscCore/v1/activities/{activityId}/linkedActivities/{linkedActivityId}/linkTypes/{linkType}

This operation removes the link between two specified activities.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Get activity link details

GET

/rest/ofscCore/v1/activities/{activityId}/linkedActivities/{linkedActivityId}/linkTypes/{linkType}

This operation returns a single link between two specified activities.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Replace activity link

PUT

/rest/ofscCore/v1/activities/{activityId}/linkedActivities/{linkedActivityId}/linkTypes/{linkType}

This operation creates or replaces a link between two specified activities.

Links can be used to identify the dependency between activities. For example, Activity B must be started at the same time as Activity A. Activity A must be complete before Activity B can start.

Get segments of multiday activity

GET

/rest/ofscCore/v1/activities/{activityId}/multidaySegments

This operation returns the segments related to the specified multiday activity.

A multiday activity can span across multiple days and be assigned to one or more resources.

This is done by dividing the activity into segments; each segment is an activity that can be assigned a status (that is, started, completed, ...).

All activity segments have the following settings:
  • "recordType" set "multiday_activity_segment"

  • "masterActivityId" set to the ID of the parent multiday activity.

Delete Required Inventories of activity

DELETE

/rest/ofscCore/v1/activities/{activityId}/requiredInventories

This operation deletes any existing required inventories assigned to the specified activity.

Get Required Inventories of activity

GET

/rest/ofscCore/v1/activities/{activityId}/requiredInventories

This operation returns the required inventories of the specified activity.

Set Required Inventories of activity

PUT

/rest/ofscCore/v1/activities/{activityId}/requiredInventories

This operation sets the required inventories for the specified activity.

If the specified activity already contains required inventories, this operation updates them with the information specified in the request.

Delete Resource Preferences of activity

DELETE

/rest/ofscCore/v1/activities/{activityId}/resourcePreferences

This operation deletes any existing required inventories for the activity.

Get Resource Preferences of activity

GET

/rest/ofscCore/v1/activities/{activityId}/resourcePreferences

This operation returns the resource preferences for the specified activity.

Resource preferences identify if certain resources are preferred/required or forbidden from being assigned to the activity.

Set Resource Preferences of activity

PUT

/rest/ofscCore/v1/activities/{activityId}/resourcePreferences

This operation sets the resource preferences for the specified activity.

Resource preferences identify if certain resources are preferred/required or forbidden from being assigned to the activity.

If the specified activity already contains resource preferences, this operation replaces them with the values specified in the request.

Bulk update activities

POST

/rest/ofscCore/v1/activities/custom-actions/bulkUpdate

This operation creates or updates multiple activities at once.

This operation is intended for use when synchronizing data from an external system to Oracle Field Service.

The operation performs the following:
  1. It attempts to find a matching activity in Oracle Field Service based on the key fields provided in request.

  2. It creates a new activity if no match is found or update the existing activity if a match is found.

  3. It updates related objects of this activity if they're present in the request. Related objects include, customer inventories, required inventories, resource preferences, and activity links.

Updates are executed in the same order as activity items appear in request.

This operation isn't executed as a single transaction, it's executed as multiple transactions each of which may succeed or fail.

The response contains a list of results including the success or failure of each update and why it failed.