Create a resource
/rest/ofscCore/v1/resources/{resourceId}
The specified resource must be assigned to one or more users in Oracle Field Service.
All custom properties (except file properties) can be sent in the request in the same way as the built-in properties. The maximum character length for custom properties of type 'string' is 65535 characters. If the character length exceeds the limit, then only the first 65535 characters are saved and the rest are ignored.
Request
-
resourceId(required): string
The unique identifier of the resource in Oracle Field Service.
objectResourceNote: This resource is not the same as a REST resource.
-
dateFormat:
string
Title:
Date FormatThe date format for the resource. Allowed Values: ["dd/mm/yy", "mm/dd/yy","dd.mm.yy","yyyy/mm/dd"]. -
durationStatisticsInitialPeriod:
integer
Title:
Duration Statistics Initial PeriodThe number of days the initial ratio is used after a new resource is created. After the specified number of days, the reported duration starts impacting the company estimations. This field is used only if the 'Use durations reported to enhance company-wide estimations' option is selected in the Manage application screen 'Configuration -> Resource Types'. The default value is 5. -
durationStatisticsInitialRatio:
number
Title:
Duration Statistics Initial RatioThe ratio applied over the company estimations if the user hasn't performed any activity. All modifications to the personal profile ratio are done using this value as the starting point. The default value is 1. -
email:
string
Title:
EmailThe email ID of the resource. The maximum character length of this field is 255 characters. If more than 255 characters are specified, then only the first 255 characters are saved and the rest are ignored. -
language:
string
Title:
LanguageThe preferred language of the resource. This field accepts the language codes listed on: Supported Language Codes. -
name:
string
Title:
NameMinimum Length:1The name of the resource. The maximum character length of this field is 40 characters. If more than 40 characters are specified, then only the first 40 characters are saved and the rest are ignored. -
organization:
string
Title:
OrganizationThe label of an organization of the resource. -
parentResourceId:
string
Title:
Parent Resource IDThe unique identifier of the parent resource. -
phone:
string
Title:
PhoneThe phone number of the resource. The maximum character length of this field is 16 characters. If more than 16 characters are specified, then only the first 16 characters are saved and the rest are ignored.
Note: The phone number is saved in Oracle Field Service with the '+' symbol and all other non-digit characters are removed. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342.
-
resourceType:
string
Title:
Resource TypeThe type of the resource. -
status:
string
Title:
StatusAllowed Values:[ "active", "inactive" ]The status of the resource. -
timeFormat:
string
Title:
Time FormatThe time format of the resource. Allowed Values: [ "12-hour", "24-hour" ]. -
timeZone:
string
Title:
Time ZoneThe name of the resource's time zone. This field accepts both Oracle Field Service time zone names (for example, Eastern) and IANA standard time zone names (for example, America/New_York). It is recommended that you specify IANA names. In the response, this field contains the Oracle Field Service time zone name, while the field 'timeZoneIANA' contains the IANA time zone name. For a list of supported time zones, see Supported Time Zones.
Response
- application/json
200 Response
objectResourceNote: This resource is not the same as a REST resource.
-
avatar:
object Avatar
Title:
AvatarThe profile picture of the user.If an Oracle Field Service user has a profile picture uploaded (into the 'user.avatar' field) and the specified resource is the user's main resource, then the profile picture can be obtained directly from the resource. This helps to avoid multiple API calls that are otherwise required to find the appropriate user and retrieve the user's profile picture from the 'avatar' field. In order to upload the picture it is necessary to use the "Set a file property" function for appropriate user (using 'avatar' property label).
-
dateFormat:
string
Title:
Date FormatThe date format for the resource. Allowed Values: ["dd/mm/yy", "mm/dd/yy","dd.mm.yy","yyyy/mm/dd"]. -
durationStatisticsInitialPeriod:
integer
Title:
Duration Statistics Initial PeriodThe number of days the initial ratio is used after a new resource is created. After the specified number of days, the reported duration starts impacting the company estimations. This field is used only if the 'Use durations reported to enhance company-wide estimations' option is selected in the Manage application screen 'Configuration -> Resource Types'. The default value is 5. -
durationStatisticsInitialRatio:
number
Title:
Duration Statistics Initial RatioThe ratio applied over the company estimations if the user hasn't performed any activity. All modifications to the personal profile ratio are done using this value as the starting point. The default value is 1. -
email:
string
Title:
EmailThe email ID of the resource. The maximum character length of this field is 255 characters. If more than 255 characters are specified, then only the first 255 characters are saved and the rest are ignored. -
language(required):
string
Title:
LanguageThe preferred language of the resource. This field accepts the language codes listed on: Supported Language Codes. -
name(required):
string
Title:
NameMinimum Length:1The name of the resource. The maximum character length of this field is 40 characters. If more than 40 characters are specified, then only the first 40 characters are saved and the rest are ignored. -
organization:
string
Title:
OrganizationThe label of an organization of the resource. -
parentResourceId:
string
Title:
Parent Resource IDThe unique identifier of the parent resource. -
phone:
string
Title:
PhoneThe phone number of the resource. The maximum character length of this field is 16 characters. If more than 16 characters are specified, then only the first 16 characters are saved and the rest are ignored.
Note: The phone number is saved in Oracle Field Service with the '+' symbol and all other non-digit characters are removed. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342.
-
resourceId:
string
Title:
Resource IDThe identifier of the resource in the external system. The maximum character length of this field is 32 characters. If more than 32 characters are specified, the operation fails with HTTP status 400 error. -
resourceInternalId:
integer
Title:
Resource Internal IDThe unique identifier of the resource in Oracle Field Service. This is a read-only field. -
resourceType:
string
Title:
Resource TypeThe type of the resource. -
status:
string
Title:
StatusAllowed Values:[ "active", "inactive" ]The status of the resource. -
timeFormat:
string
Title:
Time FormatThe time format of the resource. Allowed Values: [ "12-hour", "24-hour" ]. -
timeZone(required):
string
Title:
Time ZoneThe name of the resource's time zone. This field accepts both Oracle Field Service time zone names (for example, Eastern) and IANA standard time zone names (for example, America/New_York). It is recommended that you specify IANA names. In the response, this field contains the Oracle Field Service time zone name, while the field 'timeZoneIANA' contains the IANA time zone name. For a list of supported time zones, see Supported Time Zones. -
timeZoneDiff:
integer
Title:
Time Zone DiffThe difference between UTC and the resource's local time, displayed in minutes. For example, -180 means that the resource time is 3 hours behind UTC. -
timeZoneIANA:
string
Title:
Time Zone IANA NameThe IANA name of the resource's time zone (for example, America/New_York). For the list of IANA time zone names, see IANA Time ZonesThis is a read-only field and is only returned in responses.
objectAvatarIf an Oracle Field Service user has a profile picture uploaded (into the 'user.avatar' field) and the specified resource is the user's main resource, then the profile picture can be obtained directly from the resource. This helps to avoid multiple API calls that are otherwise required to find the appropriate user and retrieve the user's profile picture from the 'avatar' field. In order to upload the picture it is necessary to use the "Set a file property" function for appropriate user (using 'avatar' property label).
201 Response
objectResourceNote: This resource is not the same as a REST resource.
-
avatar:
object Avatar
Title:
AvatarThe profile picture of the user.If an Oracle Field Service user has a profile picture uploaded (into the 'user.avatar' field) and the specified resource is the user's main resource, then the profile picture can be obtained directly from the resource. This helps to avoid multiple API calls that are otherwise required to find the appropriate user and retrieve the user's profile picture from the 'avatar' field. In order to upload the picture it is necessary to use the "Set a file property" function for appropriate user (using 'avatar' property label).
-
dateFormat:
string
Title:
Date FormatThe date format for the resource. Allowed Values: ["dd/mm/yy", "mm/dd/yy","dd.mm.yy","yyyy/mm/dd"]. -
durationStatisticsInitialPeriod:
integer
Title:
Duration Statistics Initial PeriodThe number of days the initial ratio is used after a new resource is created. After the specified number of days, the reported duration starts impacting the company estimations. This field is used only if the 'Use durations reported to enhance company-wide estimations' option is selected in the Manage application screen 'Configuration -> Resource Types'. The default value is 5. -
durationStatisticsInitialRatio:
number
Title:
Duration Statistics Initial RatioThe ratio applied over the company estimations if the user hasn't performed any activity. All modifications to the personal profile ratio are done using this value as the starting point. The default value is 1. -
email:
string
Title:
EmailThe email ID of the resource. The maximum character length of this field is 255 characters. If more than 255 characters are specified, then only the first 255 characters are saved and the rest are ignored. -
language(required):
string
Title:
LanguageThe preferred language of the resource. This field accepts the language codes listed on: Supported Language Codes. -
name(required):
string
Title:
NameMinimum Length:1The name of the resource. The maximum character length of this field is 40 characters. If more than 40 characters are specified, then only the first 40 characters are saved and the rest are ignored. -
organization:
string
Title:
OrganizationThe label of an organization of the resource. -
parentResourceId:
string
Title:
Parent Resource IDThe unique identifier of the parent resource. -
phone:
string
Title:
PhoneThe phone number of the resource. The maximum character length of this field is 16 characters. If more than 16 characters are specified, then only the first 16 characters are saved and the rest are ignored.
Note: The phone number is saved in Oracle Field Service with the '+' symbol and all other non-digit characters are removed. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342.
-
resourceId:
string
Title:
Resource IDThe identifier of the resource in the external system. The maximum character length of this field is 32 characters. If more than 32 characters are specified, the operation fails with HTTP status 400 error. -
resourceInternalId:
integer
Title:
Resource Internal IDThe unique identifier of the resource in Oracle Field Service. This is a read-only field. -
resourceType:
string
Title:
Resource TypeThe type of the resource. -
status:
string
Title:
StatusAllowed Values:[ "active", "inactive" ]The status of the resource. -
timeFormat:
string
Title:
Time FormatThe time format of the resource. Allowed Values: [ "12-hour", "24-hour" ]. -
timeZone(required):
string
Title:
Time ZoneThe name of the resource's time zone. This field accepts both Oracle Field Service time zone names (for example, Eastern) and IANA standard time zone names (for example, America/New_York). It is recommended that you specify IANA names. In the response, this field contains the Oracle Field Service time zone name, while the field 'timeZoneIANA' contains the IANA time zone name. For a list of supported time zones, see Supported Time Zones. -
timeZoneDiff:
integer
Title:
Time Zone DiffThe difference between UTC and the resource's local time, displayed in minutes. For example, -180 means that the resource time is 3 hours behind UTC. -
timeZoneIANA:
string
Title:
Time Zone IANA NameThe IANA name of the resource's time zone (for example, America/New_York). For the list of IANA time zone names, see IANA Time ZonesThis is a read-only field and is only returned in responses.
objectAvatarIf an Oracle Field Service user has a profile picture uploaded (into the 'user.avatar' field) and the specified resource is the user's main resource, then the profile picture can be obtained directly from the resource. This helps to avoid multiple API calls that are otherwise required to find the appropriate user and retrieve the user's profile picture from the 'avatar' field. In order to upload the picture it is necessary to use the "Set a file property" function for appropriate user (using 'avatar' property label).
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
The following example shows how to create resource by submitting a PUT request on the REST resource using cURL.
curl -X 'PUT' \
-u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
-H 'Content-Type: application/json' \
--data-binary '{
"parentResourceId": "22",
"resourceType": "BK",
"name": "John Bucket testApiPermissions_IGTETSZH",
"email": "john.bucket@sunrise.demo",
"phone": "555001100000",
"language": "en",
"timeZone": "Eastern",
"status": "active"
}' \
'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/testApiPermissions_IGTETSZHOHN'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 201 Created Server: nginx/1.2.7 Date: Fri, 18 Mar 2016 02:20:43 GMT Content-Type: application/json; charset=utf-8 Connection: close