Get activity travel statistics

get

/rest/ofscStatistics/v1/activityTravelStats

This operation retrieves a collection of activity travel statistics at the company level. The maximum number of records that can be retrieved in a single response is 10000. If there are more than 10000 records, the remaining records can be accessed using the 'next' link available at the bottom of the response.

This operation can be used only when the following conditions are satisfied:

  • The customer must have a subscription to Oracle Field Service Professional or Enterprise Cloud Service.
  • The required application must have permission to access the Statistics API. To grant the permission, navigate to Configuration > Applications screen. For the required application, in the API access section, click Add new and select Statistics API.

Request

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation. The response contains the collection of activity travel statistics. If any of the listed request parameters are not specified, all the available records are returned.
Body ()
Root Schema : activityTravelsList
Type: object
The array of items containing the activity travel statistics.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Activity Travel
Type: object
Title: Activity Travel
Show Source
  • Title: Average
    The average value of the estimated travel duration.
    Example: 10
  • Title: Count
    The number of travels considered for the travel duration estimation.
    Example: 100
  • Title: Deviation
    The deviation with respect to the estimated travel duration value.
    Example: 10
  • Title: From Key
    The travel key value corresponding to the starting location of the travel. For example, 'SRT D3'.
  • Title: Override
    The override value for the activity travel duration that is set for the 'fkey' and 'tkey' combination.
    Example: 100
  • Title: Region Label
    The label for the region. For example, 'xyz_enterprise'.
  • Title: To Key
    The travel key value corresponding to the destination of the travel. For example, '11 AY'.

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 retrieve a collection of activity travel statistics at the company level by submitting a GET request on the REST resource using cURL:

cURL Command Example

curl -s -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -X GET 'https://<instance_name>.etadirect.com/rest/ofscStatistics/v1/activityTravelStats?tkey=79764&fkey=79763&region=xyz_enterprise'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx/1.2.7
Date: Mon, 18 Dec 2017 02:20:33 GMT
Content-Type: application/json; charset=utf-8

Response Body Example

The following shows an example of the response body in JSON format.

{
    "totalResults": "1",
    "limit": 10000,
    "offset": 0,
    "items": [
        {
            "tkey": "79764",
            "fkey": "79763",
            "override": 10,
            "avg": 11,
            "dev": 1,
            "count": 5,
            "region": "xyz_enterprise"
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscStatistics/v1/activityTravelStats?tkey=79764&fkey=79763&region=xyz_enterprise"
        },
        {
            "rel": "describedby",
         "href":"https://<instance_name>.etadirect.com/rest/ofscStatistics/v1/activityTravelStats"
        }
    ]
}
Back to Top