Web Services Developer's Guide → Web Services API Reference → SBM Application Web Services → Application Calls → UpdateFileAttachment
This service updates an existing file attachment for a specified item.
Argument | Type | Description |
---|---|---|
auth (optional) | Auth | The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead. |
item (required) | ItemIdentifier | The item that contains the file attachment. |
attachmentContents (required) | FileAttachmentContents | The file attachment details and content, which are all
optional except for the attachment ID.
Note: attachmentContents is of type FileAttachmentContents, but
also includes attachment detail found in FileAttachment. The XML example below
shows the parameters from both FileAttachment and FileAttachmentContents. See
FileAttachment for more information.
|
options | Options | Holds name value pairing for future arguments. |
FileAttachment is returned. The newly updated file attachment details are returned (not the content itself). For more detail, see FileAttachment
The UpdateFileAttachment call provides a method to update a single attachment on an auxiliary or primary item, given the proper privileges. If the call fails, the file attachment will not be updated. To update multiple file attachments for a single item, UpdateFileAttachment must be called for each attachment. Any data that is provided is updated as appropriate. Attachment ID and modification time cannot be set.
The following XML is a snippet of the payload that is sent with UpdateFileAttachment.
<urn:UpdateFileAttachment> <urn:auth> <urn:userId>admin</urn:userId> <urn:password></urn:password> <urn:hostname>localhost</urn:hostname> </urn:auth> <urn:item> <urn:displayName></urn:displayName> <urn:id>109</urn:id> <urn:uuid></urn:uuid> <urn:tableId>1000</urn:tableId> <urn:tableIdItemId>1000:109</urn:tableIdItemId> <urn:issueId>BUG000173</urn:issueId> </urn:item> <urn:attachmentContents> <urn:id>51</urn:id> <urn:name>file attach updated MER00023!</urn:name> <urn:fileName>wslog.txt</urn:fileName> <urn:showAsImage>false</urn:showAsImage> <urn:modificationDateTime></urn:modificationDateTime> <urn:url></urn:url> <urn:accessType>ATTACHACCESS-RESTRICTED</urn:accessType> <urn:contentsBase64> <urn:data>cid:1155248127636</urn:data> </urn:contentsBase64> </urn:attachmentContents> </urn:UpdateFileAttachment>
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.