addAttachedFile


SoftLayer_Ticket::addAttachedFile

Attach a file to a ticket.

Description

Attach the given file to a SoftLayer ticket. A file attachment is a convenient way to submit non-textual error reports to SoftLayer employees in a ticket. File attachments to tickets must have a unique name.

Parameters

Name Type Description
fileAttachment SoftLayer_Container_Utility_File_Attachment The file to attach

Required Headers

Optional Headers

Return Values

Error Handling

  • Throw the exception “Unable to attach a null file to this ticket.” if an empty SoftLayer_Container_File_Attachment is provided.
  • Throw the exception “Unable to attach a file with no file name to this ticket.” if the given file attachment has no file name.
  • Throw the exception “Unable to attach a file with no contents to this ticket.” if the given file attachment has no contents.
  • Throw the exception “A file named {filename} is already attached to this ticket.” if the a file with the same name is already attached to this ticket.
  • Throw the exception “Unable to attach file to this ticket.” if the API is unable to attach the given file to this ticket.

Associated Methods

curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [SoftLayer_Container_Utility_File_Attachment]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_Ticket/{SoftLayer_TicketID}/addAttachedFile'