Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / EnsLib.REST.Service
Private  Storage   


abstract class EnsLib.REST.Service extends
EnsLib.HTTP.Service, %CSP.REST, Ens.Util.JSON

REST Service class. Can use an HTTP InboundAdapter listener, or the standard CSP Service mechanism, or both. In order for the CSP mechanism to work, HTTP Services using this class must be configured with the invoking URL including ?CfgItem= giving the config item name. (Configured Services exposed using the HTTP Inbound Adapter may also be invoked with this URL parameter but because each configured Inbound Adapter listens on its own TCP/IP port this parameter is just a safety check for them.)


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 2


This is a Business Service class.

The associated Adapter class is EnsLib.HTTP.InboundAdapter.

%AlertStartTime %ConfigName %ConfigQueueName
%LastActionTime %LastHandledTime %LastReportedError
%OutsideCreated %PreserveSession %ProcessInputCalled
%QuitTask %RequestHeader %SessionId
%SuperSession %SuperSessionCreatedBeforeSession %WaitForNextCallInterval
%WarnedLatest %isShadow Adapter
AlertGracePeriod AlertGroups AlertOnError
ArchiveIO BusinessPartner CSPNoCharSetConvert
EnableStandardRequests GenerateSuperSessionID IOLogEntry
InactivityTimeout ThrottleDelay

%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AcceptsContentType
AccessCheck AdapterName AssignOneSetting CloseIOLogEntry
ConvertParameter Decrypt DispatchMap DispatchRequest
DrawSTYLE DrawTitle DrawTitleSection Encrypt
EnumerateSettingsClose EnumerateSettingsExecute EnumerateSettingsFetch Error
EscapeHTML EscapeURL ForceSessionId GenerateSuperSession
GetDeferredResponseToken GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetSettings GetShadowInstance Http403 Http404
Http405 Http500 HyperEventCall HyperEventHead
Include InsertHiddenField InsertHiddenFields IsPrivate
JSONStreamToObject JSONStreamToObjectArray Link Login
NewIOLogEntry ObjectToJSONStream OnAdapterHTTPResponse OnError
OnErrorSetup OnErrorStream OnGenerateSuperSession OnGetConnections
OnHTTPHeader OnHandleCorsRequest OnHandleOptionsRequest OnInit
OnKeepalive OnLoginPage OnMonitor OnPageError
OnPostHyperEvent OnPreDispatch OnPreHTTP OnPreHyperEvent
OnProcessInput OnProductionStart OnProductionStop OnSecurityTokenPage
OnTearDown Page PopulateSuperSession QueueName
QuoteJS ReportHttpStatusCode ResolveTarget RewriteURL
SaveIOLogEntry SendAlert SendDeferredResponse SendRequestAsync
SendRequestSync SetResponseHeaderIfEmpty ShowError StartTimer
StatusToJSON StatusToProxyObject StopTimer SupportedVerbs
ThrowError UnescapeHTML UnescapeURL findDataNotInQuery
restoreFormEncoded restoreMultipart


• parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";
Name of the adapter class - override this to "" if you want to use only the regular HTTP mechanism and not the custom-port HTTP InboundAdapter.
• parameter EnsServicePrefix;
This prefix will be removed from the beginning of the actual URL before matching it against the UrlMap. If this prefix begins with '^' then the CSP Application will also be removed from the beginning of the URL if this service is being invoked via the CSP gateway. If this prefix begins with '|' then the Config Name for this service will be removed from the beginning of the URL, as well as the CSP Application if this service is being invoked via the CSP gateway.


• method OnProcessInput(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object = $$$NULLOREF) as %Status
Override OnProcessInput() this in your subclass if you want to handle dispatching yourself
• final classmethod Page(skipheader As %Boolean = 1) as %Status
This method matches the request and method and calls the dispatcher