- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 04:41 AM
When I try to raise an incident using rest api ,I
tried to attach a file but the incident is raised but file is not attached
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 02:58 AM
Hi Neha,
I was able to do this successfully.
You should change sys_id to table_sys_id and also check the post query string checkbox. Please try and let me know
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 05:49 AM
Hi
You need to first create the incident and save the returned sys_id.
Then you have to use the attachment API to add the attachment after the incident record has been created
Video: How to Make REST Attachment API Requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 05:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 02:44 AM
In your screenshot you are using the Table API - this cannot be used to upload files.
The url to the attachment api would look like this
https://developer.servicenow.com/app.do#!/rest_api_doc?v=helsinki&id=r_AttachmentAPI-POST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2017 12:11 AM