Home > Class Reference > ENSLIB namespace > %DocDB.REST
Private  Storage   


class %DocDB.REST extends %CSP.REST

This class implements a custom response format and serves as the basis for all DocDB REST APIs


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 11


%ClassIsLatestVersion %ClassName %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Extends %GetParameter %IsA
%New %OriginalNamespace %PackageName %SetModified
AcceptsContentType AccessCheck AccessibleNamespaces ConvertParameter
Decrypt DispatchMap DispatchRequest DrawCSS3STYLE
DrawTitle DrawTitleSection Encrypt Error
EscapeHTML EscapeURL Http403 Http404
Http405 Http500 HyperEventCall HyperEventHead
Include InsertHiddenField InsertHiddenFields IsPrivate
Link Login OnErrorSetup OnHTTPHeader
OnHandleCorsRequest OnHandleOptionsRequest OnLoginPage OnPage
OnPageError OnPostHTTP OnPostHyperEvent OnPreDispatch
OnPreHTTP OnPreHyperEvent OnSecurityTokenPage Page
QuoteJS RenderResponseBody ReportHttpStatusCode ResolveTarget
RewriteURL SQLCODEToHttpStatus ServeXml SetClientServerHash
SetResponseHeaderIfEmpty ShowError StartTimer StatusToJSON
StatusToProxyObject StopTimer SupportedVerbs ThrowError
UnescapeHTML UnescapeURL exceptionToHttpResponse exceptionToHttpStatus

%Api.DocDB %Api.DocDB.v1


• parameter DOMAIN = "%DOCDB";
Login page localization domain


• classmethod AccessibleNamespaces()
This method returneds a list of accessible namespaces
• classmethod Http500(pE As %Exception.AbstractException) as %Status
Use our special format Http500 handler
• classmethod Page(skipheader As %Boolean = 1) as %Status
Sets the response's localization domain (something that %CSP.REST should do, in theory) and then invokes default super class behavior
• classmethod RenderResponseBody(httpStatus As %String = "", error As %DynamicAbstractObject = "", content As %DynamicAbstractObject = "") as %Status
Render the three-part Response Body which contains an status, console, and a result part
• classmethod ReportHttpStatusCode(httpStatus, status As %Status = $$$OK) as %Status
User our special format handler for other status codes
• classmethod SQLCODEToHttpStatus(SQLCODE As %Integer) as %String
• classmethod ServeXml(pDocName As %String, pStatus As %Status, pMsgArray As %DynamicArray, pStream As %Stream, pTimeStamp As %String = "") as %Status
This private helper method server wraps the message and document and returns it to the caller
• classmethod SetClientServerHash(pHash As %String)
Set the clients version of the server hash
• classmethod exceptionToHttpResponse(exception As %Exception.AbstractException) as %String
set status = exception.AsStatus() do ..StatusToJSON(status,.statusObject) All exceptions can have an inner exception Status exceptions can also have NextException, forming a linked list structure This can be normalized by converting the exception to a dynamic object and then we process the dynamic object
• classmethod exceptionToHttpStatus(exception As %Exception.AbstractException) as %Library.DynamicAbstractObject
Map an exception graph to an http status code
• classmethod getRequestBody() as %DynamicAbstractObject