Documentation forSolarWinds Service Desk

Attachments

Create a new attachment:

curl -H "X-Samanage-Authorization: Bearer TOKEN"
-F "file[attachable_type]=PARENT_OBJECT_TYPE"
-F "file[attachable_id]=PARENT_OBJECT_ID"
-F "file[attachment]=@/PATH/TO/FILE"
-H 'Accept: application/vnd.samanage.v1.3+xml'
-H 'Content-Type: multipart/form-data'
-X POST https://api.samanage.com/attachments.xml

Required fields:

  1. file[attachment] - The attachment file.

  2. file[attachable_type] - The attachment’s parent object type (e.g. Incident, Hardware, OtherAsset, Contracts::Contract)

  3. file[attachable_id] - The attachment’s parent object id (NOT its `number`).

Example:

curl -H "X-Samanage-Authorization: Bearer TOKEN"
-F "file[attachable_type]=Incident"
-F "file[attachable_id]=12345678"
-F "file[attachment]=@/tmp/example.png"
-H 'Accept: application/vnd.samanage.v1.3+json'
-H 'Content-Type: multipart/form-data'
-X POST https://api.samanage.com/attachments.json