web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Is custom web service MUST be a POST method and why ?

(0) ShareShare
ReportReport
Posted on by 596
hi guys,
 
Just being told that when we create custom Web Service, it should be for a POST method ? may I know if that is true ?
For example if I create custom web service for retrieve PO status, and the response is will tell use the PO status and each of PO line statuses, should that be a POST method also ?
Actually I want to know also where exactly we tell system that it is for GET or POST ?
I only know that if the service is for update something in F&O, I will choose POST in Postman and for retrieve I will choose GET, so this has no relation to any setting in F&O, is it not ?
Kindly help to make me better understanding.
 
Thanks.
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Is custom web service MUST be a POST method and why ?
    Regarding "where exactly we tell system that it is for GET or POST", you have no such a choice when creating a custom service in F&O. The decision was done by Microsoft. You use POST to call a custom service and GET to get description of the service (see Discovery of JSON-based custom services in AX 7).
  • Voltes Profile Picture
    596 on at
    Is custom web service MUST be a POST method and why ?
    Hi Martin,
     
    Thank you for this information.
    "The decision was done by Microsoft", may I know the reason behind this "rule" ?
     
    So, can I confirmed that:
    1. for using custom service, it will always POST method.
    2. for using data entity, it will be GET method ?
     
    Thanks.
  • Verified answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Is custom web service MUST be a POST method and why ?
    You'd need to ask Microsoft why they chose a different design than what you'd like.
     
    I guess you mean OData services when saying "or using data entity". That's using OData protocol, which is a completely different thing. There you use GET to get data, and POST, PATCH and DELETE to change data. If you're interested in details, refer to OData documentation.
  • Voltes Profile Picture
    596 on at
    Is custom web service MUST be a POST method and why ?
    Hi Martin,
     
    Yes, what I mean by data entity is OData.
     
    But, for the "why", I just want to know the reason, although I'm quite happy to just follow what has been defined. I'm not here for doing what I like, basically :D

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,100

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 890 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 633 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans