Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Save request and repones from API

Posted on by 7
Hi all,
I am looking for some examples or documentation.
When you are receiving a Rest API request and send a response is there a way to save both of them in a table, probably a blob field, and then do some action?
 
I'm not sure if I can create an API page and somehow save the request and response.
Or should I create a Codeunit as a web service? But then again if I use web services can I get a JSON as a parameter?
 
Not sure what is possible in Business Central's latest version, or what is the best approach.
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 12,167 Most Valuable Professional on at
    Save request and repones from API
  • Save request and repones from API
    Hi HeinKruger
    Just to clarify you saying that I can see the body of the request and response in temelerty?

     
  • HeinKruger Profile Picture
    HeinKruger 40 on at
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 17,965 Super User 2024 Season 2 on at
    Save request and repones from API
    Hi,
     
    Yes, if you want to store them in a blob or you can read the response using Json objects and then pick values of fields that you need and then store in a table records.
     
     
    Regards,
    Saurav Dhyani

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans