Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 12


Summary

Methods
%ClassIsLatestVersion %ClassName %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Extends %GetParameter %IsA
%New %OriginalNamespace %PackageName %SetModified
AcceptsContentType AccessCheck AccessibleNamespaces ConvertParameter
Decrypt DispatchRequest DrawCSS3STYLE DrawHEAD
DrawSTHEAD DrawSTTitle DrawSTYLE DrawTitle
DrawTitleSection Encrypt Error EscapeHTML
EscapeURL GetAuthChallenge 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 RewriteURL
SQLCODEToHttpStatus ServeXml SetClientServerHash SetResponseHeaderIfEmpty
ShowError StartTimer StatusToJSON StatusToProxyObject
StopTimer SupportedVerbs ThrowError UnescapeHTML
UnescapeURL exceptionToHttpResponse exceptionToHttpStatus getRequestBody

Subclasses
%Api.DocDB %Api.DocDB.v1

Parameters

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

Methods

• 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


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.