API Rest Message Attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 01:39 AM - edited 07-29-2023 01:48 AM
I have a doubt in API Rest Message Attachment, I am not able to see the attachment not getting reflected in instance A when I attach it in instance B, But I can able to see attachment getting reflected in instance B when I am attaching in instance A. below mentioning the endpoint which I have kept in instance B POST rest message;
https://<instance-name>.service-now.com/api/now/attachment/file
Note: Instance A is ServiceNow Instance
Instance B is non-ServiceNow Instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 04:21 AM
Hi @Govind Bysani ,
The issue you are facing could be due to various reasons, such as authentication or permissions.
Here are some possible reasons and steps to troubleshoot the issue:
Authentication: Ensure that you have provided the correct authentication details in the REST message on Instance B. You might need to use basic authentication or OAuth tokens depending on the security settings of Instance A.
Cross-Origin Resource Sharing (CORS): Check if Instance A has CORS enabled to allow requests from Instance B. If CORS is not enabled, the request from Instance B might be blocked by the browser.
Request Format: Ensure that the request from Instance B is formatted correctly with the necessary headers and data to attach the file.
Permissions: Check if the user making the API request from Instance B has the necessary permissions to attach files to records in Instance A.
Error Handling: Check the response received from Instance A when making the API call from Instance B. It might contain helpful error messages indicating why the attachment is not getting reflected.
Instance A Settings: Review the settings and configurations of Instance A related to attachments, including file size limits, file types, etc.
If you have verified all these aspects and still encounter issues, it might be helpful to check the ServiceNow instance logs and monitor the network requests to see if there are any specific errors or issues occurring during the attachment process.
Additionally, consider testing the API call using tools like Postman or cURL to isolate any potential issues with the REST message configuration or the request itself.
Thanks,
Ratnakar