changes.mady.by.user Sergio Vieira
Saved on Nov 09, 2020
changes.mady.by.user Roy Mehmood
Saved on Nov 10, 2022
...
Get an attachment
parameter
type
description
attachmentId
- id of the attachment to get.
curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token" https://xray.cloud.xpand-itgetxray.comapp/api/v1/attachments/7e0073ec-cc9a-44fa-a2da-9d8c163caeae
200 OK : octet/stream : Successful. The attachment is retrieved.
400 BAD_REQUEST : application/json : The attachment could not be retrieved.Example Output
{
"error": "No such file"
}
401 UNAUTHORIZED: application/json: The API token is invalid.
Add attachment
Example
curl -H "Content-Type: multipart/form-data" -X POST -F attachment=@report.pdf -H "Authorization: Bearer $token" https://xray.cloud.xpand-itgetxray.comapp/api/v1/attachments
200 OK : application/json : Successful. The attachment was added.
{ "id": "7e0073ec-cc9a-44fa-a2da-9d8c163caeae", "filename": "report.pdf", "created": "2020-06-28T16:59:33.051Z", "size": 123446 }
400 BAD_REQUEST : application/json : The attachment information was not provided.
{ "error": "No file found." }
401 UNAUTHORIZED : application/json : The Xray license is not valid.