Get non-working reasons
/rest/ofscMetadata/v1/nonWorkingReasons
Request
-
language: string
The translation language code. Based on the value of this parameter, the translation for the name of the non-working reason 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 greater than 100, zero, 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 the non-working reason records in the collection.
array-
Array of:
object Non-Working Reason
Title:
Non-Working Reason
objectNon-Working Reason-
active(required):
boolean
Title:
ActiveContains one of the following values: true or false.If true, then the non-working reason is listed as a possible value in the 'Non-working Reason' drop-down list in Manage or Mobility apps while creating an activity. If false, then the value is not listed in the drop-down list. The default value is true.
-
label(required):
string
Title:
LabelThe unique label assigned to the non-working reason. For example, Illness. -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:40The translation for the name of the non-working reason.If the value of language parameter is specified, then the name is provided in the specified language.
If the value 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).
-
translations(required):
array Translations
Title:
TranslationsThe list of translations associated with the name of the non-working reason. The list is only returned if the language parameter is not specified in request.
arrayTranslationsobject-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
Default Response
object-
detail:
string
The detailed information about the error.
-
status:
string
The HTTP status code.
-
title:
string
The summary of the error message.
-
type:
string
The URL of the page containing the error details.
Examples
Use the cURL command with the following syntax to obtain the collection of non-working reasons:
curl -u 'clientId@instanceName:clientSecret' --url 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/nonWorkingReasons/?limit=2&offset=2'
Response Header Example
The following shows an example of the response header:
HTTP/1.1 200 OK Server: nginx Date: Wed, 24 Jan 2018 12:28:18 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": 10,
"limit": 2,
"offset": 2,
"items": [
{
"label": "HOLIDAY",
"name": "Holiday",
"active": true,
"translations": [
{
"language":"en",
"name": "Holiday"
},
{
"language":"es",
"name": "Festivo"
}
],
"links": [
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons"
}
]
},
{
"label": "ILLNESS",
"name": "Illness",
"active": true,
"translations": [
{
"language":"en",
"name": "Illness"
},
{
"language":"es",
"name": "Enfermedad"
}
],
"links": [
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons"
}
]
}
],
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons/?limit=2&offset=2"
},
{
"rel": "prev",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons/?limit=2&offset=0"
},
{
"rel": "next",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons/?limit=2&offset=4"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/nonWorkingReasons"
}
]
}