Get a file property

get

/rest/ofscCore/v1/resources/{resourceId}/{propertyLabel}

This operation retrieves the file property for the specified resource.

Request

Path Parameters
  • The label of a custom property. This custom property must be of type 'file'.
  • The unique identifier of the resource in Oracle Field Service Cloud. This maps to the resource field 'external_id' and is not necessarily set for all resources. The resources without this parameter are not visible to the operation.
Header Parameters
  • The request must contain the Accept header to retrieve the file contents. The header must have either of the following:

    • The actual content type (for example, application/pdf for pdf documents).
    • The special value 'application/octet-stream', when you don't know the content type.

    If the request doesn't have the Accept header, the response contains only the file metadata in JSON format.

  • The Range header can be specified to resume an incomplete download from an offset in a file. For example, if the value of the Range parameter is bytes=1000-, then the download starts from 1000 bytes and continues until the end of the file.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : File
Type: string(binary)
Title: File
The contents of the file. This is usually binary data.

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 get a file property of a resource by submitting a GET request on the REST resource using cURL.

curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -H 'Accept: application/octet-stream' 'https://<instance_name>.etadirect.com/rest/ofscCore/v1/resources/john.smith/uploadedPic' > filename.jpeg

Example of Response

In this example, response is written directly to file.

Back to Top