Samanage has a…unique API from any I have seen before. To upload an attachment, the following curl file works in Windows:
-H “X-Samanage-Authorization: Bearer ~TOKEN~”
-H “Content-Type: multipart/form-data”
However, when I save this as a file and import it to Postman, it creates the following, which results in a 500 error:
curl --location --request POST ‘https://api.samanage.com/attachments.json’
–header ‘X-Samanage-Authorization: Bearer ~token~’
–header ‘Content-Type: multipart/form-data’
The sample curl from the Samanage site is:
curl -H “X-Samanage-Authorization: Bearer TOKEN”
-H ‘Accept: application/vnd.samanage.v1.3+json’
-H ‘Content-Type: multipart/form-data’
-X POST https://api.samanage.com/attachments.json
I replaced TOKEN, incident ID and atachment location and ran this imported…still 500 error.
Has anyone seen anything like this before or have any clue how I might be able to get it into Postman, and then into RestSharp?