Update an attachment

patch

/crmRestApi/resources/11.13.18.05/serviceRequests/{SrNumber}/child/Attachment/{AttachmentUniqID}

Request

Path Parameters
  • This is the hash key of the attributes which make up the composite key for the Attachments resource and used to uniquely identify an instance of Attachments. The client should not generate the hash key value. Instead, the client should query on the Attachments collection resource in order to navigate to a specific instance of Attachments to get the hash key.
  • The unique number that is used to identify a service request. You can configure the service request number to a format that is best suitable to your organizational requirements. For example, service request may have the formats service request0000012345, service request_000_12345, 12345_00_service request, and so on depending on your requirements.
Header Parameters
  • 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".
  • 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
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : AttachmentsDFFVL
Type: array
Show Source
Nested Schema : Attachments Preview
Type: array
Title: Attachments Preview
The attachments preview resource is used to preview the attachment pages.
Show Source
Nested Schema : serviceRequests-Attachment-AttachmentsDFFVL-item-patch-request
Type: object
Show Source
Nested Schema : serviceRequests-Attachment-AttachmentsPreview-item-patch-request
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • 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".
  • 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.
Body ()
Root Schema : serviceRequests-Attachment-item-response
Type: object
Show Source
Nested Schema : AttachmentsDFFVL
Type: array
Show Source
Nested Schema : Attachments Preview
Type: array
Title: Attachments Preview
The attachments preview resource is used to preview the attachment pages.
Show Source
Nested Schema : serviceRequests-Attachment-AttachmentsDFFVL-item-response
Type: object
Show Source
Nested Schema : serviceRequests-Attachment-AttachmentsPreview-item-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to update an attachment by submitting a PATCH request on the REST resource.

Example of Request Header

The following shows an example of the request header.

PATCH /crmRestApi/resources/11.13.18.05/serviceRequests/SR0000066002/child/Attachment/00020000000EACED00057708000110F07F66E0BD0000000EACED00057708000110F07F66E0BC HTTP/1.1
HOST: servername.fa.us2.oraclecloud.com
authorization: Basic U0FMRVNfQURNSU46V2VsY29tZTE=
content-type: application/vnd.oracle.adf.resourceitem+json

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
"Url": "http://www.google.com"
}

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200: OK
Date: Thu, 06 Oct 2016 10:35:19 GMT
Server: Oracle-HTTP-Server-11g
Content-Type: application/vnd.oracle.adf.resourceitem+json
Content-Language: en

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
"LastUpdateDate": "2016-09-13T15:38:13-07:00"
"LastUpdatedBy": "SALES_ADMIN"
"DatatypeCode": "WEB_PAGE"
"FileName": null
"DmFolderPath": null
"Url": "http://www.google.com"
"CategoryName": "MISC"
"UserName": "Miscellaneous"
"Uri": null
"FileUrl": null
"UploadedText": null
"UploadedFileContentType": null
"UploadedFileLength": null
"UploadedFileName": null
"ContentRepositoryFileShared": "false"
"Title": "http://www.oracle.com"
"Description": ""
"ErrorStatusCode": null
"ErrorStatusMessage": null
"CreatedBy": "SALES_ADMIN"
"CreationDate": "2016-09-13T15:37:36-07:00"
"ExpirationDate": null
"links": 
[
4]
0:  
{
"rel": "self"
"href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceRequests/SR0000066002/child/Attachment/00020000000EACED00057708000110F07F66E0BD0000000EACED00057708000110F07F66E0BC"
"name": "Attachment"
"kind": "item"
}
-
1:  
{
"rel": "canonical"
"href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceRequests/SR0000066002/child/Attachment/00020000000EACED00057708000110F07F66E0BD0000000EACED00057708000110F07F66E0BC"
"name": "Attachment"
"kind": "item"
}
-
2:  
{
"rel": "parent"
"href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceRequests/SR0000066002"
"name": "serviceRequests"
"kind": "item"
}
-
3:  
{
"rel": "enclosure"
"href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceRequests/SR0000066002/child/Attachment/00020000000EACED00057708000110F07F66E0BD0000000EACED00057708000110F07F66E0BC/enclosure/FileContents"
"name": "FileContents"
"kind": "other"
}
-
-
}
Back to Top