Page 1 of 1

Post issues with attachment into mantis through RestAPI

Posted: Jul 09, 2018 2:33 am
by shanthini
I am trying to post an issue with attachment through Rest API.
The issue gets created but the file attachments are not posted.
Please let me know how to solve this.

Below is my request details:
"method": "POST",
"transformRequest": [
"transformResponse": [
"url": "http://db3:81/bugtracker/api/rest/issues",
"headers": {
"Authorization": "aWjAGERB07B9kFgkw8mTm-YIMeDdweJ5",
"Content-Type": "application/json",
"Accept": "application/json, text/plain, */*"
"data": "{\n \"summary\": \"Sample REST issue-test\",\n \"description\": \"Description for sample REST issue.\",\n \"project\": { \"id\": 215 },\n \"category\": {\"id\": 6},\n \"files\":[\n{\n \"name\":\"test.txt\",\n\"content\":\"dGhpcyBpcyBhIHRlc3QgZmlsZQ0KdGhpcyBpcyB0byB0ZXN0IGF0dGFjaG1lbnRzDQohIyQhQCQhQCQhQCMlI0AhJSNAISUhIyUNCkVuZCBvZiBGaWxl\" \n}\n]\n}",
"timeout": {}