Add multiple attachments to a change order
/fscmRestApi/resources/11.13.18.05/productChangeOrdersV2/{productChangeOrdersV2UniqID}/child/changeOrderAttachments
Request
-
productChangeOrdersV2UniqID(required): string
This is the hash key of the attributes which make up the composite key for the Product Change Orders Version 2 resource and used to uniquely identify an instance of Product Change Orders Version 2. The client should not generate the hash key value. Instead, the client should query on the Product Change Orders Version 2 collection resource in order to navigate to a specific instance of Product Change Orders Version 2 to get the hash key.
-
Metadata-Context: string
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: string
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.
-
Upsert-Mode: string
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
- application/json
object-
AttachedDocumentId: integer
(int64)
Title:
Attached Document IdThe unique identifier of the attached document. -
CategoryName: string
Title:
CategoryMaximum Length:30Category name of a change-order attachment. - ContentRepositoryFileShared: boolean
-
DatatypeCode: string
Title:
TypeMaximum Length:30Default Value:FILEUnique identifier of the datatype of the attachment. -
DataTypeName: string
Data type of the change order attachment, such as file, text, URL, repository file, or repository folder.
-
Description: string
Title:
DescriptionMaximum Length:255An attribute value that represents the description of the attachment. -
DmDocumentId: string
Maximum Length:
255Unique identifier of the document in the repository. -
DmFolderPath: string
Title:
Dm Folder PathMaximum Length:1000Attribute value that represents the repository folder path of the attachment. -
DmVersionNumber: string
Maximum Length:
255Attribute value that represents the version number of the attachment in the repository. -
DownloadInfo: string
Title:
DownloadInfoJSON object represented as a string containing information used to programmatically retrieve a file attachment. -
ErrorStatusCode: string
Title:
Error Status CodeError status code for the change-order attachment upload. -
ErrorStatusMessage: string
Title:
Error Status MessageError status message for the change-order attachment upload. -
ExpirationDate: string
(date-time)
Title:
Expiration DateAttachment expiration date of the change order. -
FileContents: string
(byte)
Title:
File ContentsThe contents of the attachment. -
FileName: string
Title:
File NameMaximum Length:2048File name of the change-order attachment. -
FileUrl: string
Title:
File UrlFile URL of the change-order attachment. -
Title: string
Title:
TitleAttribute value that represents the title of a change-order attachment. -
UploadedFileContentType: string
Title:
Uploaded File Content TypeContent type of the uploaded change-order attachment. -
UploadedFileLength: integer
Title:
File SizeFile length of the uploaded change-order attachment. -
UploadedFileName: string
Title:
Uploaded File NameFile name of the uploaded change-order attachment. -
UploadedText: string
Title:
Uploaded TextContents of attached text file. -
Uri: string
Title:
UriMaximum Length:4000An attribute value that represents the URI for the attachment. -
Url: string
Title:
UrlMaximum Length:4000An attribute value that represents the URL for the attachment.
Response
- application/json
Default Response
-
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.
object-
AttachedDocumentId: integer
(int64)
Title:
Attached Document IdThe unique identifier of the attached document. -
CategoryName: string
Title:
CategoryMaximum Length:30Category name of a change-order attachment. - ContentRepositoryFileShared: boolean
-
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:255User who created the change-order attachment. -
CreatedByUserName: string
Title:
Created By User NameRead Only:trueName of the user who created the change-order attachment. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueDate when the change object was created. -
DatatypeCode: string
Title:
TypeMaximum Length:30Default Value:FILEUnique identifier of the datatype of the attachment. -
DataTypeName: string
Data type of the change order attachment, such as file, text, URL, repository file, or repository folder.
-
Description: string
Title:
DescriptionMaximum Length:255An attribute value that represents the description of the attachment. -
DmDocumentId: string
Maximum Length:
255Unique identifier of the document in the repository. -
DmFolderPath: string
Title:
Dm Folder PathMaximum Length:1000Attribute value that represents the repository folder path of the attachment. -
DmVersionNumber: string
Maximum Length:
255Attribute value that represents the version number of the attachment in the repository. -
DocumentPreviewURL: string
Read Only:
trueMaximum Length:255URL that identifies the change order document preview. -
DownloadInfo: string
Title:
DownloadInfoJSON object represented as a string containing information used to programmatically retrieve a file attachment. -
ErrorStatusCode: string
Title:
Error Status CodeError status code for the change-order attachment upload. -
ErrorStatusMessage: string
Title:
Error Status MessageError status message for the change-order attachment upload. -
ExpirationDate: string
(date-time)
Title:
Expiration DateAttachment expiration date of the change order. -
FileContents: string
(byte)
Title:
File ContentsThe contents of the attachment. -
FileName: string
Title:
File NameMaximum Length:2048File name of the change-order attachment. -
FileUrl: string
Title:
File UrlFile URL of the change-order attachment. -
LastUpdateDate: string
(date-time)
Title:
Last Update DateRead Only:trueAttribute that indicates the date and time of the last update of the attachment. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:255User who last updated the change-order attachment. -
LastUpdatedByUserName: string
Title:
Last Updated By UserRead Only:trueName of the user who last updated the change-order attachment. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
Title: string
Title:
TitleAttribute value that represents the title of a change-order attachment. -
UploadedFileContentType: string
Title:
Uploaded File Content TypeContent type of the uploaded change-order attachment. -
UploadedFileLength: integer
Title:
File SizeFile length of the uploaded change-order attachment. -
UploadedFileName: string
Title:
Uploaded File NameFile name of the uploaded change-order attachment. -
UploadedText: string
Title:
Uploaded TextContents of attached text file. -
Uri: string
Title:
UriMaximum Length:4000An attribute value that represents the URI for the attachment. -
Url: string
Title:
UrlMaximum Length:4000An attribute value that represents the URL for the attachment. -
UserName: string
Title:
User NameRead Only:trueMaximum Length:255Attribute value that represents the name of user who uploaded the attachment.
arrayLinksobject-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
- cancelCheckOut
-
Parameters:
- changeOrderAttachmentsUniqID:
$request.path.changeOrderAttachmentsUniqID - productChangeOrdersV2UniqID:
$request.path.productChangeOrdersV2UniqID
Cancels the checkout and makes the change order attachment available to other users. - changeOrderAttachmentsUniqID:
- checkIn
-
Parameters:
- changeOrderAttachmentsUniqID:
$request.path.changeOrderAttachmentsUniqID - productChangeOrdersV2UniqID:
$request.path.productChangeOrdersV2UniqID
Marks the change order attachment as temporarily unavailable to other users, until the item attachment is checked in or another user undoes the checkout. - changeOrderAttachmentsUniqID:
- checkOut
-
Parameters:
- changeOrderAttachmentsUniqID:
$request.path.changeOrderAttachmentsUniqID - productChangeOrdersV2UniqID:
$request.path.productChangeOrdersV2UniqID
Checks out the change order attachment and marks it as locked for other users. - changeOrderAttachmentsUniqID:
Examples
This example describes how to add an attachment by specifying the attachment category.
Example cURL Command
Use the following cURL command to submit a request on the REST resource.
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/productChangeOrdersV2UniqID/child/changeOrderAttachments"
For example:
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/300100618383864/child/changeOrderAttachments"
Example Request Body
The following example includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it updates.
{
"FileName": "DesignDocument.doc",
"DmVersionNumber":"262642",
"CategoryName": "Restricted Category"
}
Example Response Body
The following example includes the contents of the response body in JSON format:
{
"items": [
{
"LastUpdateDate": "2023-10-25T17:09:01.256+00:00",
"LastUpdatedBy": "PLM_AUTO",
"DatatypeCode": "FILE",
"FileName": "Add_Attachment_RestAPI.png",
"DmFolderPath": null,
"DmDocumentId": "UCMFA00263017",
"DmVersionNumber": "262624",
"Url": null,
"CategoryName": "Restricted Category",
"UserName": "Restricted Category",
"Uri": null,
"FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID:262624?download&XFND_SCHEME_ID=1&XFND_CERT_FP=BB804CFF433E0576F755D856D92743710CEEC8E2&XFND_RANDOM=619398465360565685&XFND_EXPIRES=1698254372658&XFND_SIGNATURE=PBvH9dhz17IQUpXuhjh5CEqaPo1MzyZWngof56yU8CUtwlZ7ocAL1IMuWCKMR4getdjLUnK1nGOgC74YyDECHFA3ethtKa2NX5FLFusjVPx8H2WW12IBUYCcxeslf2fn-9ZFMybwFI0vYsstxJ596u-fmJu9AD~0GMkDqATfrkaIe0vH5OVUxz9rGe99PKLuer-WxP2jeoEBjJCiVnvYky2GEi-5Sz6yRhLW7X3FcO-EsM7yjSqqzrSn60Si46SH0wGNc-V3L-5UfFsfH7E449cXBuX4i3aKc21CJMoMpl4FbAJaG3pGcMpEv~KVvuGHVavxqer8opKKAlZBOi52Dw__&Id=262624",
"UploadedText": null,
"UploadedFileContentType": "image/png",
"UploadedFileLength": 98558,
"UploadedFileName": null,
"ContentRepositoryFileShared": "false",
"Title": "Add_Attachment_RestAPI.png",
"Description": "",
"ErrorStatusCode": null,
"ErrorStatusMessage": null,
"CreatedBy": "PLM_AUTO",
"CreationDate": "2023-10-25T17:08:57.852+00:00",
"ExpirationDate": null,
"LastUpdatedByUserName": "AUTO PLM",
"CreatedByUserName": "AUTO PLM",
"DownloadInfo": "{\"XFND_EXPIRES\":\"1698254372661\",\"XFND_SCHEME_ID\":\"1\",\"XFND_CERT_FP\":\"BB804CFF433E0576F755D856D92743710CEEC8E2\",\"XFND_SIGNATURE\":\"q8TlT2Am9v-Dy6414FsD6zwKL6tG872CDkXNUpseW7SX7h3tEKblzfEIYdMKI~gQDQW7xSFeor0p8v6uYFZG0D7bINTMdM2t42Me97QAnPBwscC3gOXrE8mJCMXVA3WjO0uZoafPpREpgEKUDTNK3AIM05r9ETLVaAlHENpvWMac1YroaZ53e4KiT5LlhwW6F3RxF4nxYZHAxPn3J6dbsyNS6T~kXNt8u~m5NaL31acf2NOlXMEbUsxPbHE4LIuFduBX36Ntf2srFPdLjLUcUOHMww9PzyOKB6HqiQG93BJsrWFKgCzZZfe33oBFgDMPFABDCXqMJWMNDioOYbAaVg__\",\"XFND_RANDOM\":\"1130312062905091595\"}",
"links": [
{
"rel": "self",
"href": "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/300100618383864/child/changeOrderAttachments/00020000000EACED00057708000110F09EC172120000000EACED00057708000110F09EC17211",
"name": "changeOrderAttachments",
"kind": "item"
},
{
"rel": "canonical",
"href": "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/300100618383864/child/changeOrderAttachments/00020000000EACED00057708000110F09EC172120000000EACED00057708000110F09EC17211",
"name": "changeOrderAttachments",
"kind": "item"
},
{
"rel": "parent",
"href": "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/300100618383864",
"name": "productChangeOrdersV2",
"kind": "item"
}
]
}
],
"count": 1,
"hasMore": false,
"limit": 25,
"offset": 0,
"links": [
{
"rel": "self",
"href": "https://servername/fscmRestApi/resources/version/productChangeOrdersV2/300100618383864/child/changeOrderAttachments",
"name": "changeOrderAttachments",
"kind": "collection"
}
]
}