Interface Attachments
- All Known Implementing Classes:
AttachmentsImpl
public interface Attachments
Client interface for managing file attachments in the Equinix Customer Portal.
Backed by the Attachments v1 API at /v1/attachments. Provides listing, retrieval,
upload, download and deletion of attachments referenced by orders, tickets and cases.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Downloads an attachment's file bytes.Retrieves a specific attachment's metadata by its identifier.list()Lists all attachments for the current account.Lists attachments for the current account filtered to the supplied attachment ids.upload(byte[] fileBytes, String fileName, AttachmentPurpose purpose) Uploads a file as a new attachment.
-
Method Details
-
list
PaginatedList<Attachment> list()Lists all attachments for the current account.Maps to
GET /v1/attachments(getAttachments).- Returns:
- a paginated list of attachments
-
list
Lists attachments for the current account filtered to the supplied attachment ids.Maps to
GET /v1/attachments(getAttachments) with theattachmentIdsquery parameter.- Parameters:
attachmentIds- the attachment ids to filter by, ornull/empty for all- Returns:
- a paginated list of matching attachments
-
getByUuid
Retrieves a specific attachment's metadata by its identifier.Maps to
GET /v1/attachments/{attachmentId}(getAttachment).- Parameters:
attachmentId- the identifier of the attachment- Returns:
- the matching attachment
-
download
Downloads an attachment's file bytes.Maps to
GET /v1/attachments/{attachmentId}/file(getAttachedFile).- Parameters:
attachmentId- the identifier of the attachment- Returns:
- the file bytes
-
upload
Uploads a file as a new attachment.Maps to
POST /v1/attachments/file(createAttachment). The file is sent as amultipart/form-datauploadFilepart and thepurposeis supplied as a query parameter.- Parameters:
fileBytes- the raw file content (sent as the requireduploadFilepart)fileName- the file name to advertise for the uploaded filepurpose- the purpose of the upload (LOAorPO_DOCUMENT)- Returns:
- the created attachment
-