attachment API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 07:36 PM
Hi
We have created attachment API for incident by using rest API explorer it is attaching the document from my local storage to incident but the content in document is missing can anyone suggest how to achieve this how to attach all type of documents to the incident without missing the content in the document sharing screen shots for reference
API :
https://dev187065.service-now.com/api/now/attachment/file?table_name=incident&table_sys_id=ba1814384...
JSON BODY
{
"contentType": "(*/*)"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 08:39 PM
Hi @Shabbir1
in your screenshot it is not visible what the body is. You have to select "Binary" and then pick a file. Did you do this?
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:39 PM
Hi maik
Thank you for your reply yes I have selected the option binary and chosen the file it is working but how can I check this with postman & what will be the JSON body ? and how it will pickup the document from my local storage .I tried with the API and JSON which I have mentioned above from postman it is adding the document but the content in the document is missing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 12:11 AM
Hi @Shabbir1
you are mixing apples with oranges. JSON is a text-based format for structured data used to exchange data between systems. A binary file is something completely different. But there is a way to transform binary data to text data for including it in a JSON-based body. But this depends on the requirements which are given by the recipient API.
And regarding postman: Why don't you search in the internet. A simple Google search would provide for example the following documentation: https://www.postman.com/postman/workspace/postman-answers/documentation/13455110-00378d5c-5b08-4813-...
Maik
And re
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 08:45 PM
Remove bracket and then try: