Sample web service (API) for user resources.
Syntax
Response = HTTP_Users_Services(RemainingURL)
Returns
The meaning of the response value depends on the HTTP request. Responses are strictly for debugging purposes only since web service routines should be using the services in the HTTP_Service routine.
Parameters
Parameter | Description |
---|---|
RemaiiningURL | The remaining portion of the URL that follows the URL that launched this current service. If this is empty, it implies that the URL has reached the end point. See the remarks section below. Required. |
Remarks
Web services are designed to process HTTP requests. In order to do this properly, they need to have access to specific information such as the HTTP method, entry point URL, and end point, URL. These commonly needed data points are assigned to several variables in the HTTP_Service_Setup insert.
Setup Variables
Variables | Description |
---|---|
APIURL | The base URL for the API entry point (e.g., api.mysite.com/v1). |
FullEndPointURL | The URL submitted by the client. |
HTTPMethod | The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.) |
SelfURL | The URL path representing the current service. |
NextSegment | The URL segment immediately following the SelfURL (if any). This could contain the name of the next service or it could contain the Item ID for the current service (aka resource). |
CurrentServiceHandler | The name of the currently running BASIC+ stored procedure. |