Interacting with my API Functions

ENDPOINT

Cloud Backend API creates a route for every function you create based on this system 😎:

- https://yourcustomdomainname.com/api/[FOLDERNAME]/[FUNCTIONNAME]
and / or
- https://yourprojectname.appdrag.com/api/[FOLDERNAME]/[FUNCTIONNAME]




The route is given at the top-left corner of your function editing page, as well as in the provided documentation.



 




PARAMETERS

Parameters must be passed as :

  • POST parameters when the method is set to POST
  • PUT parameters when the method is set to PUT
  • PATCH parameters when the method is set to PATCH
  • DELETE parameters when the method is set to DELETE 
  • Query string parameters when the method is set to GET
In some instances, you don't want your API function to be public, in which case, you can check the "Require APIKey" checkbox found in the security section of your function's edition panel.  Every call made to this function will now require the APIKey parameter.


 



RESPONSE CONTENT AND TYPE

Since your function's purpose may vary, we provide you several types of responses.  This example is a returned JSON Object :

  • status : Did your function execute successfully
  • execTime : Time it took for your function to execute (in milliseconds)
  • billedTime : Time debited from your plan
  • payload : Your function's response
  • logs : Gets filled if an error occurs

 
📘  NoteAnother way to recieve your response is in the RAW format.  This method generates only what your function returns.  It's ideal if what you're looking for is to return HTML content, for example.