Rest APIs for beginners
I'm really not that familiar with Rest APIs in Ensemble and came across one while investigating some issues.
I got the below code which I'm guessing that is a Rest API that provide services that can be accessed providing url and would like to understand it and my question is, does this url http://52.24.106.151:80/Csp/Upload/CreateRoute/Bmc means that someone use it to run cmCreateRouteBmcDev classmethod for example and does POST means we can send a request or we can receive a request (a post), this MSDS.BluMicello.InterfaceServices class has a list of class methods and cmCreateRouteBmcDev is one of them?
this API is used by one of our clients to send data to us and we've given them a URL in the past to be able to do so but they can't remember the url and I'm not that familiar with this, so normally does the url should be just the route url eg. http://52.24.106.151:80/Csp/Upload or do they nedd the exact call to a specific method be able to send data eg.http://52.24.106.151:80/Csp/Upload/CreateRoute/Bmc ?
Include MSDSInclude
// Provide a REST interface to the document server service
Class MSDS.BluMicello.InterfaceServices Extends %CSP.REST
{
// http://localhost:57772/Csp/Upload/LocEquipUpload
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/LocEquipUpload" Method="POST" Call="cmCreateRoute"/>
<Route Url="/CreateRoute/BmcDev" Method="POST" Call="cmCreateRouteBmcDev"/>
<Route Url="/CreateRoute/BmcPlayGround" Method="POST" Call="cmCreateRouteBmcPlayGround"/>
<Route Url="/CreateRoute/BmcTesting" Method="POST" Call="cmCreateRouteBmcTesting"/>
any info will be helpfull
Thanks Guys