Trying to set up simple api - Having Issues
I am using the api manager and trying to set up a simple api like this:
<cfcomponent rest="true" restpath="restapi">
<cffunction name="sayHello" restpath="sayHello" access="remote" returntype="String" httpmethod="GET">
<cfset rest = "Hello World">
<cfreturn rest>
</cffunction>
</cfcomponent>
My questions are:
What do I name this file?
Where do I save the file in my site? Is there a certain path or folder structure needed?
In the API manager Can I name the api anything?
What would the endpoint be?
Under resources what would the resource name be specified as?
Right now I have the endpoint as mysite.com/restapi. The resource is a get for sayHello but it is returning an error when I try to test it:
"error": "There was some error while invoking the API.Verify and try again"
Any info is appreciated.
