Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

DocAPI.v1.REST

To use this REST API, create a web application named /api/docbook, and Copy the definition from /csp/docbook. Edit the Dispatch Class to be DocAPI.v1.REST. Then you can invoke the API via URLs like the following example:

http://localhost:57772/api/docbook/key/alock

This REST API provides the following calls for obtaining content:

It also provides the following calls for use in searching:

To use the default value for product, book, tags, searchType, or operator, specify 0 for that parameter. E.g. /search/findthisphrase/1/0/0/SQL finds the first page of results for the phrase findthisphrase, filtered to topics tagged with SQL.

Method Inventory

Parameters

parameter CHARSET = utf-8;
Specifies the default character set for the page. This can be overriden using the <CSP:CONTENT CHARSET=> tag, or by setting the %response.CharSet property in the OnPreHTTP() method. If this parameter is not specified, then for the default charset is utf-8.
parameter CONTENTTYPE = application/json;
Specifies the default content type for the page. This can be overriden using the <CSP:CONTENT TYPE=> tag, or by setting the %response.ContentType property in the OnPreHTTP() method. The default value if this parameter is not set is text/html.
parameter HandleCorsRequest = 1;
Inherited description: This parameter influences the CORS support. The default is an empty string meaning 'not specified'. If set to true (1) then CORS processing is ON. If set to false (0) then CORS processing is OFF. If left unset "" then the decision to process CORS is delegated to the setting on the URL map route.

Methods

classmethod %ErrorHandler(pSC As %Status, ByRef pContinue As %Boolean) as %Status
classmethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) as %Status
Inherited description: This method Gets called prior to dispatch of the request. Put any common code here that you want to be executed for EVERY request. If pContinue is set to 0, the request will NOT be dispatched according to the UrlMap. If this case it's the responsibility of the user to return a response.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab