@host = http://localhost:4004 @auth = Basic YWxpY2U6d29uZGVybGFuZA== // Send the requests sequentially to avoid any conflicts ### Get list of all incidents # @name incidents GET {{host}}/odata/v4/admin/Incidents Authorization: {{auth}} ### Creating attachment (metadata request) @incidentsID = {{incidents.response.body.value[2].ID}} # @name createAttachment POST {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments Authorization: {{auth}} Content-Type: application/json { "filename": "sample-1.jpg" } ### Put attachment content (content request) @attachmentsID = {{createAttachment.response.body.ID}} PUT {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}})/content Authorization: {{auth}} Content-Type: image/jpeg < ./integration/content/sample-1.jpg ### Test if we can overwrite attachment content PUT {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}})/content Authorization: {{auth}} Content-Type: application/pdf < ./integration/content/sample.pdf ### Get newly created attachment metadata GET {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}}) Authorization: {{auth}} ### Fetching newly created attachment content GET {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}})/content Authorization: {{auth}} ### Get list of attachments for a particular incident # @name attachments GET {{host}}/odata/v4/admin/Incidents(ID={{incidentsID}})/attachments Authorization: {{auth}} ### Get attachments content GET {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}})/content Authorization: {{auth}} ### Get attachments content with up__ID included GET {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(up__ID={{incidentsID}},ID={{attachmentsID}})/content Authorization: {{auth}} ### Put attachment content (content request) with up__ID included PUT {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(up__ID={{incidentsID}},ID={{attachmentsID}})/content Authorization: {{auth}} Content-Type: image/jpeg < ./integration/content/sample-1.jpg ### Delete attachment DELETE {{host}}/odata/v4/admin/Incidents({{incidentsID}})/attachments(ID={{attachmentsID}}) Authorization: {{auth}}