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 Details

    • list

      Lists all attachments for the current account.

      Maps to GET /v1/attachments (getAttachments).

      Returns:
      a paginated list of attachments
    • list

      PaginatedList<Attachment> list(List<String> attachmentIds)
      Lists attachments for the current account filtered to the supplied attachment ids.

      Maps to GET /v1/attachments (getAttachments) with the attachmentIds query parameter.

      Parameters:
      attachmentIds - the attachment ids to filter by, or null/empty for all
      Returns:
      a paginated list of matching attachments
    • getByUuid

      Attachment getByUuid(String attachmentId)
      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

      byte[] download(String attachmentId)
      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

      Attachment upload(byte[] fileBytes, String fileName, AttachmentPurpose purpose)
      Uploads a file as a new attachment.

      Maps to POST /v1/attachments/file (createAttachment). The file is sent as a multipart/form-data uploadFile part and the purpose is supplied as a query parameter.

      Parameters:
      fileBytes - the raw file content (sent as the required uploadFile part)
      fileName - the file name to advertise for the uploaded file
      purpose - the purpose of the upload (LOA or PO_DOCUMENT)
      Returns:
      the created attachment