Open Exchange
Global Masters
Home / Class Reference / %SYS namespace / %REST.Impl
Private  Storage   


class %REST.Impl extends

Abstract superclass for REST implementation classes generated from OpenAPI specifications.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 12


%AddToSaveSet %CheckAccepts %ClassIsLatestVersion %ClassName
%ConstructClone %DeleteHeader %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Extends %GetContentType %GetHeader
%GetParameter %IsA %IsModified %LogError
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %ReportRESTError %SerializeObject
%SetContentType %SetHeader %SetHeaderIfEmpty %SetModified
%SetStatusCode %ValidateObject %WriteResponse

%Api.IAM.v1.impl %Api.Mgmnt.v2.impl


• parameter ExposeServerExceptions = 0;
If ExposeServerExceptions is overridden as true, then details of internal errors will be exposed.


• classmethod %CheckAccepts(produces As %String) as %Boolean
Check that the ACCEPT request header is included in the produces list.
• classmethod %DeleteHeader(name As %String)
Remove a header from the response. Note that name is not case sensitive
• classmethod %GetContentType()
Get the content-type header of the request
• classmethod %GetHeader(name As %String) as %String
Return the value of the name request header. Note that name is not case sensitive
• classmethod %LogError(methodName As %String, error As %String, data As %String)
Log an API Management error
• classmethod %ReportRESTError(statusCode As %String, sc As %Status, exposeServerExceptions As %Boolean = 0)
Report an error when processing a request. The implementation class may contain an override of %ReportRESTError in order to format the error response as required by the REST application. The override should use the %WriteResponse method to return the error response.
• classmethod %SetContentType(contentType As %String)
Set the content-type header of the response
• classmethod %SetHeader(name As %String, value As %String)
Sets a custom HTTP header into the reply. If you set the same header twice it will append the information to the first with a ',' between them. Note that name is not case sensitive, however we will remember the case of the header when sending this to the client.
• classmethod %SetHeaderIfEmpty(name As %String, value As %String) as %Boolean
Helper method that sets a header if it is currently empty, if it already has a value it does nothing. Returns true if the header was set and false if it did nothing.
• classmethod %SetStatusCode(statusCode As %String)
The HTTP Status code to be sent back in the response. The HTTP status codes are defined in RFC 2068.

• classmethod %WriteResponse(response)
%WriteResponse is used by the dispatch class to write the response to this request.
An error occurred with the web application.

It has been logged to system error log (System Operation>System Logs>Application Error Log).