I am trying to GET an attachment from Business Central through postman.
can you please give me a get example
Hi, just add a new solution.
Hope the following can give you some new hints.
Business Central 2022 wave 2 (BC21) new features: Power Apps and Power Automate support for media/image & document attachments
Thanks.
ZHU
Hi
To obtain an attachment from Business Central via Postman, perform these steps:
First, you must obtain an access token from Business Central using OAuth 2.0 authentication. See Microsoft documentation for instructions on how to obtain an access token.
Once you have obtained the access token, open Postman and create a new GET request.
In the URL field, enter the URL of the API endpoint that retrieves the attachments. For example, the URL could be api.businesscentral.dynamics.com/.../$value, where {tenant}, {companyid} and {attachmentid} are placeholders for the actual values.
On the Headers tab, add the following headers:
Authorisation: Bearer {access_token}, where {access_token} is the access token obtained in step 1.
Accept: application/octet-stream
Content type: application/octet-stream
Send the request and you should receive the attachment in the body of the response.
Note: replace {tenant}, {companyid} and {attachmentid} with the actual values of the URL.
DAniele
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156