Update a property

patch

/rest/ofscMetadata/v1/properties/{label}

This operation updates an existing property.

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

Path Parameters
  • Minimum Length: 1
    Maximum Length: 40
    The label of the property that needs to be updated.
Body ()
The property object that needs to be updated.
Root Schema : Property
Type: object
Title: Property
Show Source
  • 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.

  • 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'.

  • 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.

  • 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.

  • 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.

  • Title: GUI
    Allowed Values: [ "text", "checkbox", "combobox", "radiogroup", "file", "signature", "image", "url", "phone", "email", "capture", "geo" ]
    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'.

  • 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.

  • 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 Cloud.

    This field is present for all the types of properties. The label cannot be changed for an existing property.

  • 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.

  • 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.
  • 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.
  • 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'.

  • 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.

  • Title: Template
    The template of the property. This field is optional and is present only for the properties of type 'integer' and 'string'.
  • 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
    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.

  • Title: Type
    Allowed Values: [ "integer", "string", "enumeration", "file" ]
    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.

Nested Schema : Mime Types
Type: array
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'.

Show Source
Nested Schema : Transformation
Type: object
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'.
Show Source
  • 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.
  • The XSLT document used to transform the source text (after processing with regExpLines) to display the property value.
Nested Schema : Translations
Type: array
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.

Show Source
Nested Schema : regExpLines
Type: array
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.
Show Source
Nested Schema : Translation
Type: object
Show Source
  • 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.
  • 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)
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Property
Type: object
Title: Property
Show Source
  • 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.

  • 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'.

  • 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.

  • 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.

  • 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.

  • Title: GUI
    Allowed Values: [ "text", "checkbox", "combobox", "radiogroup", "file", "signature", "image", "url", "phone", "email", "capture", "geo" ]
    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'.

  • 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.

  • 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 Cloud.

    This field is present for all the types of properties. The label cannot be changed for an existing property.

  • 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.

  • 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.
  • 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.
  • 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'.

  • 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.

  • Title: Template
    The template of the property. This field is optional and is present only for the properties of type 'integer' and 'string'.
  • 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
    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.

  • Title: Type
    Allowed Values: [ "field", "integer", "string", "enumeration", "file" ]
    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.

Nested Schema : Mime Types
Type: array
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'.

Show Source
Nested Schema : Transformation
Type: object
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'.
Show Source
  • 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.
  • The XSLT document used to transform the source text (after processing with regExpLines) to display the property value.
Nested Schema : Translations
Type: array
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.

Show Source
Nested Schema : regExpLines
Type: array
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.
Show Source
Nested Schema : Translation
Type: object
Show Source
  • 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.
  • 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)

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 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>.etadirect.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>.etadirect.com/rest/ofscMetadata/v1/properties/new_property_label"
        },
        { 
            "rel":"describedby",
            "href":"https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/properties"
        }
    ]
}
Back to Top