Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %REST.Impl
Private  Storage   

%REST.Impl


class %REST.Impl extends
%RegisteredObject

Abstract superclass for REST implementation classes generated from OpenAPI specifications.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 12


Summary


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

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

Parameters


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

Methods


• classmethod %CheckAccepts(produces As %String) as %Boolean
Check that the ACCEPT request header is included in the produces list.
• classmethod %CheckUniqueArray(array As %ListOfDataTypes) as %Boolean
Check that all items of an array are unique.
• 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.

http://www.faqs.org/rfcs/rfc2068.html
• classmethod %WriteResponse(response)
%WriteResponse is used by the dispatch class to write the response to this request.