Update a property
/rest/ofscMetadata/v1/properties/{label}
The operation updates only the values that are specified in the request.
Note: The 'type' property with the value 'field' and the 'country_code' property cannot be created or updated. Only the 'translations' field can be created or updated.Request
-
label(required): string
Minimum Length:
1
Maximum Length:40
The label of the property that needs to be updated.
object
Property
-
allowDraw:
boolean
Title:
Allow Draw
Contains one of the following values: true or false. If true, then the user can draw on the captured image using a stylus. If false, then the user cannot draw on the captured image using a stylus.This field is optional and is present only for the file properties that have the GUI Image element.
-
attachmentCategory:
string
Title:
Fusion Attachment Category
A label of the Fusion Attachment Category. This attribute is applicable for properties of type 'attachments' with a Fusion configured storage.
Maximum Length: 30 -
businessObject:
string
Title:
Fusion Business Object
A business object type (Service Work Order or Maintenance Work Order) to which the attachment is related. Allowed values : [ serviceWorkOrder, maintenanceWorkOrder ]. This attribute is applicable for properties of type 'attachments' with a Fusion configured storage.
-
cloneFlag:
boolean
Title:
Clone Flag
Contains one of the following values: true or false. If true, then the property is duplicated while reopening an activity or applying pre-work for a new activity. If false, then you cannot duplicate the property.This field is optional and present for all the property types except 'field'. It is not set for the entity 'resource'.
-
entity:
string
Title:
Entity
Allowed Values:[ "activity", "inventory", "resource", "service request", "user" ]
The entity of the property.This field is present for all property types. It is required in a PUT operation and is optional in a PATCH operation. This field cannot be changed for an existing property.
-
fileSizeLimit:
string
Title:
File Size Limit
Allowed Values:[ "0.5MB", "1MB", "2MB", "3MB", "5MB" ]
The maximum file size allowed for 'file' elements. The default and the maximum size allowed is 5 MB.This field is optional and is present only for the file properties with the GUI file element.
-
getGeolocation:
boolean
Title:
Get Geolocation
Contains one of the following values: true or false. If true, then the location information is saved on the map. If false, then the location information is not saved on the map.This field is optional and is present only for the file properties with the GUI image element.
-
gui:
string
Title:
GUI
Allowed Values:[ "text", "checkbox", "combobox", "radiogroup", "file", "signature", "image", "url", "phone", "email", "capture", "geo", "attachments" ]
The GUI of the property. It defines how the property is displayed to the users.This field is present for all property types. It is required in a PUT operation and optional in a PATCH operation. It cannot be changed for a property of type 'field'.
-
hint:
string
Title:
Hint
The hint of the property name in the user's language.This field is present for all the types of properties. It is returned only by using a GET operation and is ignored in PUT and PATCH operations.
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:40
The label of the property. It is the unique identifier of the property in Oracle Field Service.This field is present for all the types of properties. The label cannot be changed for an existing property.
-
lines:
integer
Title:
Lines
Minimum Value:1
Maximum Value:9
The number of lines that the property displays in the Activity Details form.This field is optional and is present only for the properties of type 'string'. The value can be set only to 1 for all GUI elements except for the 'text' element.
-
maxHeight:
integer
Title:
Max Height
Minimum Value:10
Maximum Value:5000
The maximum height of the property. This field is optional and is present only for the file properties with the GUI image element. -
maxWidth:
integer
Title:
Max Width
Minimum Value:10
Maximum Value:5000
The maximum width of the property. This field is optional and is present only for the file properties with the GUI image element. -
mimeTypes:
array Mime Types
Title:
Mime Types
An array of MIME types. This is an optional field and is present only for properties of type 'file'.
This field is required in a PUT operation and is optional in a PATCH operation. It is ignored for a property with the gui 'image'.
-
name:
string
Title:
Name
The name of the property in user's language.This field is present for all types of properties. It is returned only by using a GET operation and is ignored in PUT and PATCH operations.
-
storageApplication:
string
Title:
Storage Application
Application label of configured "Oracle Storage" application.
It is optional for the properties of the "attachments" type and ignored for all other properties.
-
template:
string
Title:
Template
The template of the property. This field is optional and is present only for the properties of type 'integer' and 'string'. -
transformation:
object Transformation
Title:
Transformation
The array of transformation objects. This field is optional and is present only for the properties of type 'string' with the gui 'text'. -
translations:
array Translations
Title:
Translations
The list of associated translations returned for the name the property. The list is returned only if the language parameter is not specified in request.This field is present for all the property types. It is required in a PUT operation and optional in a PATCH operation. For the default language, specify the value of the 'name' parameter.
-
type:
string
Title:
Type
Allowed Values:[ "integer", "string", "enumeration", "file", "attachments" ]
The type of the property.This field is present for all the property types. It is required in a PUT operation and is optional in a PATCH operation. The property type cannot be changed for an existing property.
-
watermark:
boolean
Title:
Watermark images with coordinates and datetime
The parameter is supported for properties with the 'type' = file and ''gui' = 'image'.
Default:
false
.
array
Mime Types
An array of MIME types. This is an optional field and is present only for properties of type 'file'.
This field is required in a PUT operation and is optional in a PATCH operation. It is ignored for a property with the gui 'image'.
object
Transformation
-
regExpLines(required):
array regExpLines
The array of Perl Compatible Regular Expression (PCRE) lines. Each line contains a regular expression rule in the format:
= . For example, the following line copies the entire text: /^.*$/m = $0. Lines in the array are applied to the source text successively. -
xslt(required):
string
The XSLT document used to transform the source text (after processing with regExpLines) to display the property value.
array
Translations
This field is present for all the property types. It is required in a PUT operation and optional in a PATCH operation. For the default language, specify the value of the 'name' parameter.
array
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
Response
- application/json
- application/schema+json
200 Response
object
Property
-
allowDraw:
boolean
Title:
Allow Draw
Contains one of the following values: true or false. If true, then the user can draw on the captured image using a stylus. If false, then the user cannot draw on the captured image using a stylus.This field is optional and is present only for the file properties that have the GUI Image element.
-
attachmentCategory:
string
Title:
Fusion Attachment Category
A label of the Fusion Attachment Category. This attribute is applicable for properties of type 'attachments' with a Fusion configured storage.
Maximum Length: 30 -
businessObject:
string
Title:
Fusion Business Object
A business object type (Service Work Order or Maintenance Work Order) to which the attachment is related. Allowed values : [ serviceWorkOrder, maintenanceWorkOrder ]. This attribute is applicable for properties of type 'attachments' with a Fusion configured storage.
-
cloneFlag:
boolean
Title:
Clone Flag
Contains one of the following values: true or false. If true, then the property is duplicated while reopening an activity or applying pre-work for a new activity. If false, then you cannot duplicate the property.This field is optional and present for all the property types except 'field'. It is not set for the entity 'resource'.
-
entity:
string
Title:
Entity
Allowed Values:[ "activity", "inventory", "resource", "service request", "user" ]
The entity of the property.This field is present for all property types. It is required in a PUT operation and is optional in a PATCH operation. This field cannot be changed for an existing property.
-
fileSizeLimit:
string
Title:
File Size Limit
Allowed Values:[ "0.5MB", "1MB", "2MB", "3MB", "5MB" ]
The maximum file size allowed for 'file' elements. The default and the maximum size allowed is 5 MB.This field is optional and is present only for the file properties with the GUI file element.
-
getGeolocation:
boolean
Title:
Get Geolocation
Contains one of the following values: true or false. If true, then the location information is saved on the map. If false, then the location information is not saved on the map.This field is optional and is present only for the file properties with the GUI image element.
-
gui:
string
Title:
GUI
Allowed Values:[ "text", "checkbox", "combobox", "radiogroup", "file", "signature", "image", "url", "phone", "email", "capture", "geo", "attachments" ]
The GUI of the property. It defines how the property is displayed to the users.This field is present for all property types. It is required in a PUT operation and optional in a PATCH operation. It cannot be changed for a property of type 'field'.
-
hint:
string
Title:
Hint
The hint of the property name in the user's language.This field is present for all the types of properties. It is returned only by using a GET operation and is ignored in PUT and PATCH operations.
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:40
The label of the property. It is the unique identifier of the property in Oracle Field Service.This field is present for all the types of properties. The label cannot be changed for an existing property.
-
lines:
integer
Title:
Lines
Minimum Value:1
Maximum Value:9
The number of lines that the property displays in the Activity Details form.This field is optional and is present only for the properties of type 'string'. The value can be set only to 1 for all GUI elements except for the 'text' element.
-
maxHeight:
integer
Title:
Max Height
Minimum Value:10
Maximum Value:5000
The maximum height of the property. This field is optional and is present only for the file properties with the GUI image element. -
maxWidth:
integer
Title:
Max Width
Minimum Value:10
Maximum Value:5000
The maximum width of the property. This field is optional and is present only for the file properties with the GUI image element. -
mimeTypes:
array Mime Types
Title:
Mime Types
An array of MIME types. This is an optional field and is present only for properties of type 'file'.
This field is required in a PUT operation and is optional in a PATCH operation. It is ignored for a property with the gui 'image'.
-
name:
string
Title:
Name
The name of the property in user's language.This field is present for all types of properties. It is returned only by using a GET operation and is ignored in PUT and PATCH operations.
-
storageApplication:
string
Title:
Storage Application
Application label of configured "Oracle Storage" application.
It is optional for the properties of the "attachments" type and ignored for all other properties.
-
template:
string
Title:
Template
The template of the property. This field is optional and is present only for the properties of type 'integer' and 'string'. -
transformation:
object Transformation
Title:
Transformation
The array of transformation objects. This field is optional and is present only for the properties of type 'string' with the gui 'text'. -
translations:
array Translations
Title:
Translations
The list of associated translations returned for the name the property. The list is returned only if the language parameter is not specified in request.This field is present for all the property types. It is required in a PUT operation and optional in a PATCH operation. For the default language, specify the value of the 'name' parameter.
-
type:
string
Title:
Type
Allowed Values:[ "field", "integer", "string", "enumeration", "file", "attachments" ]
The type of the property.This field is present for all the property types. It is required in a PUT operation and is optional in a PATCH operation. The property type cannot be changed for an existing property.
-
watermark:
boolean
Title:
Watermark images with coordinates and datetime
The parameter is supported for properties with the 'type' = file and ''gui' = 'image'.
Default:
false
.
array
Mime Types
An array of MIME types. This is an optional field and is present only for properties of type 'file'.
This field is required in a PUT operation and is optional in a PATCH operation. It is ignored for a property with the gui 'image'.
object
Transformation
-
regExpLines(required):
array regExpLines
The array of Perl Compatible Regular Expression (PCRE) lines. Each line contains a regular expression rule in the format:
= . For example, the following line copies the entire text: /^.*$/m = $0. Lines in the array are applied to the source text successively. -
xslt(required):
string
The XSLT document used to transform the source text (after processing with regExpLines) to display the property value.
array
Translations
This field is present for all the property types. It is required in a PUT operation and optional in a PATCH operation. For the default language, specify the value of the 'name' parameter.
array
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
The following example shows how to update a property by submitting a PATCH request on the REST resource.
Example of Request Header
The following shows an example of the request header.
PATCH /rest/ofscMetadata/v1/properties/new_property_label HTTP/1.0 Host: <instance_name>.fs.ocs.oraclecloud.com Authorization: Basic c29hcEBwZXRyb2xpYXNoZXZ5Y2gucmVzdDox Accept: */* Content-Length: 228
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "cloneFlag":false, }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Fri, 24 Jul 2015 08:54:08 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "label":"new_property_label", "type":"integer", "name":"New Integer Property", "hint":"", "entity":"activity", "gui":"checkbox", "cloneFlag":false, "translations":[ { "language":"es", "name":"New Integer Property" }, { "language":"en", "name":"New Integer Property" } }, "links":[ { "rel":"canonical", "href":"https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/properties/new_property_label" }, { "rel":"describedby", "href":"https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/properties" } ] }