Update a photo
patch
/hcmRestApi/resources/11.13.18.05/emps/{empsUniqID}/child/photo/{ImageId}
Request
Path Parameters
-
ImageId(required): integer(int64)
The value of this parameter could be a hash of the key that is used to uniquely identify the resource item. The client should not generate the hash key value. Instead, the client should query on the collection resource with a filter to navigate to a specific resource item. For example: products?q=InventoryItemId=
-
empsUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Employees resource and used to uniquely identify an instance of Employees. The client should not generate the hash key value. Instead, the client should query on the Employees collection resource in order to navigate to a specific instance of Employees to get the hash key.
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
Image: string
(byte)
Title:
Image
Unique location of the image. Encrypted version of the file. -
ImageName: string
Title:
Photo Name
Maximum Length:240
Name of the image. -
ObjectVersionNumber: integer
(int32)
Used to implement optimistic locking. This number is incremented every time a row is updated. The number is compared at the start and end of a transaction to detect whether another session has updated the row since it was queried.
-
PrimaryFlag: boolean
Title:
Primary
Maximum Length:30
Default Value:false
Indicates whether the image is primary.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : emps-photo-item-response
Type:
Show Source
object
-
Image: string
(byte)
Title:
Image
Unique location of the image. Encrypted version of the file. -
ImageId: integer
(int64)
Title:
Photo ID
Primary key autogenerated by the application. -
ImageName: string
Title:
Photo Name
Maximum Length:240
Name of the image. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ObjectVersionNumber: integer
(int32)
Used to implement optimistic locking. This number is incremented every time a row is updated. The number is compared at the start and end of a transaction to detect whether another session has updated the row since it was queried.
-
PersonId: integer
(int64)
Person associated with the image. Foreign key to PER_ALL_PEOPLE_F.
-
PrimaryFlag: boolean
Title:
Primary
Maximum Length:30
Default Value:false
Indicates whether the image is primary.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
The following example shows how to update an employee photo by submitting a PATCH request on the REST resource using cURL.
curl -X PATCH -H "<username>:<password>" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d <payload> "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/emps/000200000069ACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B597419030000787200106A6176612E6C616E672E4F626A656374000000000000000000000078707708000000E80CEBE980780000000EACED0005770800005AF310F6AAA1/child/photo/100000018659715"
Note:
- Always execute PATCH operations against the self link returned in the GET response.
- Use any third-party tool to convert the image into an encrypted file (base 64) and provide the encrypted version in the payload.
Example of Payload
The following shows an example of the payload
{ "ImageName" : "Image-2", "PrimaryFlag" : "Y", "Image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc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nslbR24hW8v7kfu7cnChP4n9OBwOv2kcCt5GtJorlf8AEikVx6YOas3ykbNajqb3W11o73ejyRJK8rsFaI+VSirzKjA4+p7ZNvooKWu2mhawViu7b2ZcS4Xw3cPbvns5xuf9hj1qDq2i7JLarqM+09iWzgWcD+LnHTy5P5etVXZvYvXdoUzplg7Ip87uwAXtnJojtPsJr+y9lDd6kkEsMj7u9FJveGeYDZAAzx/WhqEYvkgryyceLHrbaW3KPDaWcsaKh3JHAAOByx0qgv4rtJLKp3pSWPqSc0ZSbMRWVBGrZBUqd4ih4O/vJnJjYrnuByNMPK5Lf0B4pGltbyb65kaPPUc6LpH5cFiT3NQM70qDoFqZDJvLg/OHOsuTJQ54LdCD8azSDUqvmyUMSbjcnIrMcmMBiCBUDxCKzv8ArVUWTpbgEEZruvyO6ol1sesEhBMMhUg9v7g156ZjXQvkh1RoJr2y3j5sOB935ffWoR5OjMnWzvlo1vBEEt0SNB9FRgUP2gtrTWtMuLK9UPbzDcYdfePUHB+FB4L2Xw249a1lvXQIGPXNE+BmfkOObebCy7KmOY3MMlncSFISmRK5AySwxgY9DVPhSND5Rir18setPe6pp9lk7trAzkert+iD7a5+klCca0EuyXu4OQcdKdjRUXy9eZ71EEvCt1nwDngKqiEuDzFyOABxSqNFPuxjPXjSrNkGFbKg1knjTUTc1Nbk0QyImi2yeoezdoLWYnCOfCf3Hl9+KEE1oxOOBweh7VFKnZD0lYsJoCw5E/lWLsDy5HX8qEbC6gNR0aKcHO+oJ9DyI+0Gn9qb39h0K+vTw8OJ90/W3SB9+KftVYvWziG1d/7S2hv7pWyjTFUP1V8o+4ZoWtaenatwaRYwZzWsjHG73ramGOWzVMhu0h70qaJpVmzQ6nz6c6VmlVlMxWrdaVKqIdM+TX/RT/O341O29/2jN/yJ/wChSpUx+oJ+xyA1sKVKlwpk8qaHWlSqERilSpVRZ//Z" }
Example of Response Header
The following shows an example of the response header.
Status: HTTP/1.1 200 OK Content-Type : application/json
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "ImageName" : "Image-2", "PrimaryFlag" : "Y", "ImageId" : 100000018659715, "PersonId" : 100000008153761, "ObjectVersionNumber" : 2, "links" : [4] 0: {... ...} }