Home > Class Reference > %SYS namespace > %DocDB.REST


class %DocDB.REST extends %CSP.REST

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

Method Inventory (Including Private)


parameter DOMAIN = %DOCDB;
Inherited description: Login page localization domain

Methods (Including Private)

classmethod AccessibleNamespaces() [ Language = objectscript ]
This method returneds a list of accessible namespaces
classmethod Http500(pE As %Exception.AbstractException) as %Status [ Language = objectscript ]
Use our special format Http500 handler
classmethod Page(skipheader As %Boolean = 1) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
Render the three-part Response Body which contains an status, console, and a result part
classmethod ReportHttpStatusCode(httpStatus, status As %Status = $$$OK) as %Status [ Language = objectscript ]
User our special format handler for other status codes
classmethod SQLCODEToHttpStatus(SQLCODE As %Integer) as %String [ Language = objectscript ]
classmethod ServeXml(pDocName As %String, pStatus As %Status, pMsgArray As %DynamicArray, pStream As %Stream, pTimeStamp As %String = "") as %Status [ Language = objectscript ]
This private helper method server wraps the message and document and returns it to the caller
classmethod SetClientServerHash(pHash As %String) [ Language = objectscript ]
Set the clients version of the server hash
classmethod exceptionToHttpResponse(exception As %Exception.AbstractException) as %String [ Language = objectscript ]
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 [ Language = objectscript ]
Map an exception graph to an http status code
classmethod getRequestBody() as %DynamicAbstractObject [ Language = objectscript ]

Inherited Members

Inherited Methods (Including Private)