Attachments

Use the Attachement API operation to upload any file in rackspace enviornment .

Post attachments

POST /attachment
Content-Type: multipart/form-data
Accept: multipart/form-data

Upload a new file within Rackspace.

Users with the following roles are allowed to consume this endpoint: - identity:user-admin - ticketing:admin - dedicated:default

These roles can be managed within the my.rackspace.com portal.

Sending a POST request returns an upload URL and a file UUID upon success. The file must be uploaded to the URL within 10 minutes or the URL expires. The UUID then must be submitted along with a ticket update (a new comment) to associate the uploaded file with the ticket.

The following file extensions are not allowed in the filename:

ade, adp, app, asp, bas, bat, cer, chm, cla, class, cmd, cnt, com, cpl, crt, csh, der, exe, fxp, gadget, grp, hlp, hpj, hta, inf, ins, isp, its, jar, js, jse, ksh, lnk, mad, maf, mag, mam, maq, mar, mas, mat, mau, mav, maw, mcf, mda, mdb, mde, mdt, mdw, mdz, msc, msh, msh1, msh1xml, msh2, msh2xml, mshxml, msi, msp, mst, ocx, ops, osd, pcd, pif, pl, plg, prf, prg, ps1, ps1xml, ps2, ps2xml, psc1, psc2, pst, reg, scf, scr, sct, shb, shs, tmp, url, vb, vbe, vbp, vbs, vsmacros, vsw, ws, wsc, wsf, wsh, xbap, xnk

Request parameters

The request has the following body parameters:

NameTypeDescription
filenamefile (Required)File which you need to upload in the system (for example ````).

Request example

The following example shows the JSON request for creating a ticket:

curl –location –request POST $URL
–form ‘filename=@”/path/to/file”’

Response parameters

The response has the following body parameters:

NameTypeDescription
attachment_dataObjectProvide details of uploaded file
attachment_data.expiresIntegerexpiry date for uploaded file.
attachment_data.max_file_countIntegerNumber of file uploaded.
attachment_data.max_file_sizeIntegerSize of uploaded file.
attachment_data.signatureStringSignature of uploaded files.
attachment_data.redirect_urlStringredirect url.
attachment_data.urlStringpath where file uploaded.
attachment_data.uuidStringUUID of attachment.

Response example

The following example shows the JSON response for the request:

{
  "attachment_data": {
      "expires": 1525465224,
      "max_file_count": 1,
      "max_file_size": 20000000,
      "signature": "0b61f160f876dc93138ca5907f22a239685edd8e",
      "redirect_url": "",
      "url": "https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_9872494b-6265-40fe-a03b-502f2caca50d/320a/320a4542-4fd0-11e8-9f27-0050561a016e",
      "uuid": "320a4542-4fd0-11e8-9f27-0050561a016e"
  }
}

Response codes

This operation can have the following response codes:

CodeNameDescription
200SuccessThe request succeeded.
429Too Many RequestsThe application has a built-in rate limit of 1 request per minute. If you exceed this limit, you receive a 429 status code response until the cool off period has elapsed.