Get activity types
/rest/ofscMetadata/v1/activityTypes
Request
-
language: string
The translation language code. Based on the value of this parameter, the translation for the name of the activity type is returned in the 'name' field.
- If the value is specified, then the translated value is returned in the 'name' field and the 'translations' field is not returned in the response.
- If translation for the specified language does not exist, then the value in the 'name' field is returned in English.
- If the value is not specified, then the 'translations' field is returned in the response and contains the translations to every language in the system.
For the list of supported language codes, see Supported Language Codes.
-
limit: integer
The number of activity type records to be returned in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is zero, greater than 100, or if no value is specified, then it defaults to 100.
-
offset: integer
The record number from which the retrieval starts. The default value is zero. If no value is specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
Response
- application/json
- application/schema+json
200 Response
object
-
hasMore:
boolean
Contains one of the following values: true or false.
If true, then there are more results that can be retrieved with successive paging requests.
If false or if the value is not present, then there are no more results or this is the final page. The default value is true.
-
items:
array items
-
limit:
integer
The limit value specified in the request. If the value is not specified in the request or if the specified value is not accepted, then it defaults to 100.
-
offset:
integer
The offset value specified in the request.
-
totalResults:
integer
The total number of activity type records in the collection.
array
-
Array of:
object Activity Type
Title:
Activity Type
The activity type object.
object
Activity Type
-
active(required):
boolean
Title:
Active
Contains one of the following values: true or false.If true, then the activity type is listed as a possible value in the 'Activity Type' drop-down list in Manage or Mobility apps while creating an activity. If false, then the activity type is not listed as a value in the drop-down list. The default value is true.
-
colors:
object Colors
Title:
Colors
The set of color values for the corresponding status of the activity. -
defaultDuration(required):
integer
Title:
Default Duration
The default duration of the activity type. It is used while creating an activity and when no statistics are available for the activity. -
features:
object Features
Title:
Features
The set of boolean attributes that define the active features for the activity type. -
groupLabel:
string
Title:
Group Label
The label of the activity type group. -
label(required):
string
Title:
Label
The unique label assigned to the activity type. For example, IN (Install). -
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:32
The translation for the name of the activity type.If the language parameter is specified, then the name is provided in that language.
If the language parameter is not specified, then the name is provided in English, unless the request is performed using an Oracle Field Service user account which is linked to an API application (in this case, the name is provided in the language of the user making the request).
-
segmentMaxDuration:
integer
Title:
Segment Max Duration
Allowed Values:[ "15", "30", "45", "60", "90", "120", "180", "240", "300", "360", "420", "480", "540", "600", "660", "720", "780", "840", "900" ]
The maximum total duration of segments created for a particular day, for segmentable activities, in minutes. It is returned if the value of isSegmentingEnabled is set to true.Allowed values are: 15,30,45,60,90,120,180,240,300,360,420,480,540,600,660,720,780,840,900
-
segmentMinDuration:
integer
Title:
Segment Min Duration
Allowed Values:[ "15", "30", "45", "60", "90", "120", "180", "240", "300", "360", "420", "480", "540", "600", "660", "720", "780", "840", "900" ]
The minimum duration of a single segment created for a particular day, for segmentable activities, in minutes. It is returned if the value of isSegmentingEnabled is set to true.Allowed values are: 15,30,45,60,90,120,180,240,300,360,420,480,540,600,660,720,780,840,900
-
timeSlots:
array Time Slot
Title:
Time Slot
The collection of time slots. -
translations(required):
array Translations
Title:
Translations
The list of translations associated with the name of the activity type. The list is only returned if the language parameter is not specified in the request.
object
Colors
-
cancelled:
string
Title:
Cancelled
The color of activity in cancelled status. -
completed:
string
Title:
Complete
The color of activity in complete status. -
notdone:
string
Title:
Not Done
The color of activity in not done status. -
notOrdered:
string
Title:
Not Ordered
The color of activity in not ordered status. -
pending:
string
Title:
Pending
The color of activity in pending status. -
started:
string
Title:
Started
The color of activity in started status. -
suspended:
string
Title:
Suspended
The color of activity in suspended status. -
warning:
string
Title:
Warning
The color of activity in warning status.
object
Features
-
allowCreationInBuckets:
boolean
Contains one of the following values: true or false. If true, then 'creation in buckets' feature is allowed. If false, then 'creation in buckets' feature is not allowed. The default value is false.
-
allowMassActivities:
boolean
Contains one of the following values: true or false. If true, then 'mass activities' feature is allowed. If false, then 'mass activities' feature is not allowed. The default value is false.
-
allowMoveBetweenResources:
boolean
Contains one of the following values: true or false. If true, then 'move between resources' feature is allowed. If false, then 'move between resources' feature is not allowed. The default value is false.
-
allowNonScheduled:
boolean
Contains one of the following values: true or false. If true, then 'non-scheduled' feature is allowed. If false, then 'non-scheduled' feature is not allowed. The default value is false.
-
allowRepeatingActivities:
boolean
Contains one of the following values: true or false. If true, then 'repeating activities' feature is allowed. If false, then 'repeating activities' feature is not allowed. The default value is false.
-
allowReschedule:
boolean
Contains one of the following values: true or false. If true, then 'reschedule' feature is allowed. If false, then 'reschedule' feature is not allowed. The default value is false.
-
allowToCreateFromIncomingInterface:
boolean
Contains one of the following values: true or false. If true, then 'create from incoming interface' feature is allowed. If false, then 'create from incoming interface' feature is not allowed. The default value is false.
-
allowToSearch:
boolean
Contains one of the following values: true or false. If true, then 'search' feature is allowed. If false, then 'search' feature is not allowed. The default value is false.
-
calculateActivityDurationUsingStatistics:
boolean
Contains one of the following values: true or false. If true, then 'calculate activity duration using statistics' feature is enabled. If false, then 'calculate activity duration using statistics' feature is not enabled. The default value is false.
-
calculateDeliveryWindow:
boolean
Contains one of the following values: true or false. If true, then 'calculate delivery window' feature is enabled. If false, then 'calculate delivery window' feature is not enabled. The default value is false.
-
calculateTravel:
boolean
Contains one of the following values: true or false. If true, then 'calculate travel' feature is enabled. If false, then 'calculate travel' feature is not enabled. The default value is false.
-
disableLocationTracking:
boolean
Contains one of the following values: true or false. If true, then 'location tracking' feature is disabled. If false, then 'location tracking' feature is enabled. The default value is false.
-
enableDayBeforeTrigger:
boolean
Contains one of the following values: true or false. If true, then 'day before trigger' feature is enabled. If false, then 'day before trigger' feature is not enabled. The default value is false.
-
enableNotStartedTrigger:
boolean
Contains one of the following values: true or false. If true, then 'not started trigger' feature is enabled. If false, then 'not started trigger' feature is not enabled. The default value is false.
-
enableReminderAndChangeTriggers:
boolean
Contains one of the following values: true or false. If true, then 'reminder and change triggers' feature is enabled. If false, then 'reminder and change triggers' feature is not enabled. The default value is false.
-
enableSwWarningTrigger:
boolean
Contains one of the following values: true or false. If true, then 'SW warning trigger' feature is enabled. If false, then 'SW warning trigger' feature is not enabled. The default value is false.
-
isSegmentingEnabled:
boolean
Contains one of the following values: true or false. If true, then 'segmenting of activity' feature is available. If false, then 'segmenting of activity' feature is not available. The default value is false.
-
isTeamworkAvailable:
boolean
Contains one of the following values: true or false. If true, then 'teamwork' feature is available. If false, then 'teamwork' feature is not available. The default value is false.
-
slaAndServiceWindowUseCustomerTimeZone:
boolean
Contains one of the following values: true or false. If true, then 'SLA and Service window use customer time zone (required for routing)' feature is enabled. If false, then 'SLA and Service window use customer time zone (required for routing)' feature is not enabled. The default value is false.
-
supportOfInventory:
boolean
Contains one of the following values: true or false. If true, then 'inventory' feature is supported. If false, then 'inventory' feature is not supported. The default value is false.
-
supportOfLinks:
boolean
Contains one of the following values: true or false. If true, then 'links' feature is supported. If false, then 'links' feature is not supported. The default value is false.
-
supportOfNotOrderedActivities:
boolean
Contains one of the following values: true or false. If true, then 'not-ordered activities' feature is supported. If false, then 'not-ordered activities' feature is not supported. The default value is false.
-
supportOfPreferredResources:
boolean
Contains one of the following values: true or false. If true, then 'preferred resources' feature is supported. If false, then 'preferred resources' feature is not supported. The default value is false.
-
supportOfRequiredInventory:
boolean
Contains one of the following values: true or false. If true, then 'required inventory' feature is supported. If false, then 'required inventory' feature is not supported. The default value is false.
-
supportOfTimeSlots:
boolean
Contains one of the following values: true or false. If true, then 'time slots' feature is supported. If false, then 'time slots' feature is not supported. The default value is false.
-
supportOfWorkSkills:
boolean
Contains one of the following values: true or false. If true, then 'work skills' feature is supported. If false, then 'work skills' feature is not supported. The default value is false.
-
supportOfWorkZones:
boolean
Contains one of the following values: true or false. If true, then 'work zones' feature is supported. If false, then 'work zones' feature is not supported. The default value is false.
array
Translations
object
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:32
The unique label assigned to the time slot.
object
-
language(required):
string
This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
-
languageISO:
string
This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)
-
name(required):
string
Default Response
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
Example 1
The following example shows how to obtain a collection of activity types by submitting a GET request on the REST resource using cURL.
Use the cURL command with the following syntax:
curl -u 'clientId@instanceName:clientSecret' --url 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes/?limit=2&offset=2'
Response Header Example
The following shows an example of the response header:
HTTP/1.1 200 OK Server: nginx Date: Mon, 14 Oct 2019 09:24:41 GMT Content-Type: application/json; charset=utf-8 Connection: close
Response Body Example
The following shows an example of the response body in JSON format:
{ "hasMore": true, "totalResults": 61, "limit": 2, "offset": 2, "items": [ { "label": "6", "name": "Phone Install/Upgrade", "active": true, "groupLabel": "customer", "defaultDuration": 48, "timeSlots": [ { "label": "08-10" }, { "label": "10-12" }, { "label": "13-15" }, { "label": "15-17" }, { "label": "all-day" } ], "colors": { "pending": "FFDE00", "started": "5DBE3F", "suspended": "99FFFF", "cancelled": "80FF80", "notdone": "60CECE", "notOrdered": "FFCC99", "warning": "FFAAAA", "completed": "79B6EB" }, "features": { "isTeamworkAvailable": false, "isSegmentingEnabled": false, "allowMoveBetweenResources": true, "allowCreationInBuckets": true, "allowReschedule": true, "supportOfNotOrderedActivities": true, "allowNonScheduled": true, "supportOfWorkZones": true, "supportOfWorkSkills": true, "supportOfTimeSlots": true, "supportOfInventory": true, "supportOfLinks": true, "supportOfPreferredResources": true, "allowMassActivities": false, "allowRepeatingActivities": false, "calculateTravel": true, "calculateActivityDurationUsingStatistics": true, "allowToSearch": true, "allowToCreateFromIncomingInterface": true, "enableDayBeforeTrigger": true, "enableReminderAndChangeTriggers": true, "enableNotStartedTrigger": true, "enableSwWarningTrigger": true, "calculateDeliveryWindow": true, "slaAndServiceWindowUseCustomerTimeZone": true, "supportOfRequiredInventory": true, "disableLocationTracking": false }, "translations": [ { "language": "en", "name": "Phone Install/Upgrade", "languageISO": "en-US" }, { "language": "es", "name": "Install/Upgrade: Teléfono", "languageISO": "es-ES" } ], "links": [ { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] }, { "label": "7", "name": "HSD / High Speed Data install", "active": true, "groupLabel": "customer", "defaultDuration": 48, "timeSlots": [ { "label": "08-10" }, { "label": "10-12" }, { "label": "13-15" }, { "label": "15-17" }, { "label": "all-day" } ], "colors": { "pending": "FFDE00", "started": "5DBE3F", "suspended": "99FFFF", "cancelled": "80FF80", "notdone": "60CECE", "notOrdered": "FFCC99", "warning": "FFAAAA", "completed": "79B6EB" }, "features": { "isTeamworkAvailable": false, "isSegmentingEnabled": false, "allowMoveBetweenResources": true, "allowCreationInBuckets": true, "allowReschedule": true, "supportOfNotOrderedActivities": true, "allowNonScheduled": true, "supportOfWorkZones": true, "supportOfWorkSkills": true, "supportOfTimeSlots": true, "supportOfInventory": true, "supportOfLinks": true, "supportOfPreferredResources": true, "allowMassActivities": false, "allowRepeatingActivities": false, "calculateTravel": true, "calculateActivityDurationUsingStatistics": true, "allowToSearch": true, "allowToCreateFromIncomingInterface": true, "enableDayBeforeTrigger": true, "enableReminderAndChangeTriggers": true, "enableNotStartedTrigger": true, "enableSwWarningTrigger": true, "calculateDeliveryWindow": true, "slaAndServiceWindowUseCustomerTimeZone": true, "supportOfRequiredInventory": true, "disableLocationTracking": false }, "translations": [ { "language": "en", "name": "HSD / High Speed Data install", "languageISO": "en-US" }, { "language": "es", "name": "HSD / Los datos de alta velocidad instalar", "languageISO": "es-ES" } ], "links": [ { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] } ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=2" }, { "rel": "prev", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=0" }, { "rel": "next", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=4" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] }
Example 2
The following example shows how to obtain a collection of activity types by using the language parameter with the GET request on the REST resource.
Use the cURL command with the following syntax:
curl -u 'clientId@instanceName:clientSecret' --url 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes/?language=en-US&limit=2&offset=2'
Response Header Example
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Mon, 14 Oct 2019 09:38:21 GMT Content-Type: application/json; charset=utf-8 Connection: close
Response Body Example
The following shows an example of the response body in JSON format:
{ "hasMore": true, "totalResults": 61, "limit": 2, "offset": 2, "items": [ { "label": "6", "name": "Phone Install/Upgrade", "active": true, "groupLabel": "customer", "defaultDuration": 48, "timeSlots": [ { "label": "08-10" }, { "label": "10-12" }, { "label": "13-15" }, { "label": "15-17" }, { "label": "all-day" } ], "colors": { "pending": "FFDE00", "started": "5DBE3F", "suspended": "99FFFF", "cancelled": "80FF80", "notdone": "60CECE", "notOrdered": "FFCC99", "warning": "FFAAAA", "completed": "79B6EB" }, "features": { "isTeamworkAvailable": false, "isSegmentingEnabled": false, "allowMoveBetweenResources": true, "allowCreationInBuckets": true, "allowReschedule": true, "supportOfNotOrderedActivities": true, "allowNonScheduled": true, "supportOfWorkZones": true, "supportOfWorkSkills": true, "supportOfTimeSlots": true, "supportOfInventory": true, "supportOfLinks": true, "supportOfPreferredResources": true, "allowMassActivities": false, "allowRepeatingActivities": false, "calculateTravel": true, "calculateActivityDurationUsingStatistics": true, "allowToSearch": true, "allowToCreateFromIncomingInterface": true, "enableDayBeforeTrigger": true, "enableReminderAndChangeTriggers": true, "enableNotStartedTrigger": true, "enableSwWarningTrigger": true, "calculateDeliveryWindow": true, "slaAndServiceWindowUseCustomerTimeZone": true, "supportOfRequiredInventory": true, "disableLocationTracking": false }, "links": [ { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] }, { "label": "7", "name": "HSD / High Speed Data install", "active": true, "groupLabel": "customer", "defaultDuration": 48, "timeSlots": [ { "label": "08-10" }, { "label": "10-12" }, { "label": "13-15" }, { "label": "15-17" }, { "label": "all-day" } ], "colors": { "pending": "FFDE00", "started": "5DBE3F", "suspended": "99FFFF", "cancelled": "80FF80", "notdone": "60CECE", "notOrdered": "FFCC99", "warning": "FFAAAA", "completed": "79B6EB" }, "features": { "isTeamworkAvailable": false, "isSegmentingEnabled": false, "allowMoveBetweenResources": true, "allowCreationInBuckets": true, "allowReschedule": true, "supportOfNotOrderedActivities": true, "allowNonScheduled": true, "supportOfWorkZones": true, "supportOfWorkSkills": true, "supportOfTimeSlots": true, "supportOfInventory": true, "supportOfLinks": true, "supportOfPreferredResources": true, "allowMassActivities": false, "allowRepeatingActivities": false, "calculateTravel": true, "calculateActivityDurationUsingStatistics": true, "allowToSearch": true, "allowToCreateFromIncomingInterface": true, "enableDayBeforeTrigger": true, "enableReminderAndChangeTriggers": true, "enableNotStartedTrigger": true, "enableSwWarningTrigger": true, "calculateDeliveryWindow": true, "slaAndServiceWindowUseCustomerTimeZone": true, "supportOfRequiredInventory": true, "disableLocationTracking": false }, "links": [ { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] } ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=2" }, { "rel": "prev", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=0" }, { "rel": "next", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=4" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes" } ] }