You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Sample web service (API) for contact resources.

Syntax

Response = HTTP_Contacts_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

ParameterDescription
RemaiiningURL

The remaining portion of the URL that follows the URL that launched this current service. 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

VariablesDescription

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.

Param1 - Param10

The proper use of the generic arguments are defined in the definition of each service above.

  • No labels