Set a file property
put
/rest/ofscCore/v1/activities/{activityId}/{propertyLabel}
This operation creates the specified file property for the specified activity.
Note: The maximum size of the file that can be uploaded is 5 MB.
Request
Supported Media Types
- application/octet-stream
Path Parameters
-
activityId: integer
The unique identifier of the activity in Oracle Field Service.
-
propertyLabel: string
The label of a custom property. This custom property must be of type 'file'.
Header Parameters
-
Content-Disposition(optional): string
The custom filename for the property. For example, Content-Disposition: attachment; filename="photo-of-the-door.jpg" sets the filename for the property to 'photo-of-the-door.jpg'.
-
Content-Type(optional): string
The media type of the property. For file properties of type 'image' having content-type as 'image/png', 'image/jpeg', or 'image/gif', Oracle Field Service generates a preview thumbnail that appears in Manage/Mobility.
Root Schema : File
Type:
string(binary)
Title:
File
The contents of the file. This is usually binary data.
Response
Supported Media Types
- application/json
- application/schema+json
204 Response
This section describes the 204 status response for this operation.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
The detailed description of this error.
-
status(optional):
string
The HTTP status code of this error.
-
title:
string
The brief description of this error.
-
type:
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to set a file property of an activity by submitting a PUT request on the REST resource using cURL.
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -X PUT --data-binary @filename.jpeg 'https://<instance_name>.etadirect.com/rest/ofscCore/v1/activities/4225269/uploadedPic'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No Content