Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%iKnow] >  [REST] >  [Base]
Private  Storage   

deprecatedabstract class %iKnow.REST.Base extends %CSP.REST

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 10


Summary

Methods
%ClassIsLatestVersion %ClassName %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %ErrorHandler %Extends %GetParameter
%IsA %New %OriginalNamespace %PackageName
%SetModified AcceptsContentType AccessCheck ConvertParameter
CreateDomainAPI 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 ParseFilter ParseHighlight ParseList
ParseStringArray QuoteJS ReportHttpStatusCode ResolveDomainId
RewriteURL SetResponseHeaderIfEmpty ShowError StartTimer
StatusToJSON StatusToProxyObject StopTimer SupportedVerbs
ThrowError UnescapeHTML UnescapeURL

Subclasses
%iKnow.REST.v1 %iKnow.REST.v1dot1

Parameters

• parameter CHARSET = "utf-8";
Specifies the default character set for the page. This can be overriden using the <CSP:CONTENT CHARSET=> tag, or by setting the %response.CharSet property in the OnPreHTTP method. If this parameter is not specified, then for the default charset is utf-8.
• parameter CONTENTTYPE = "application/json";
Specifies the default content type for the page. This can be overriden using the <CSP:CONTENT TYPE=> tag, or by setting the %response.ContentType property in the OnPreHTTP method. The default value if this parameter is not set is text/html.
• parameter HandleCorsRequest = 1;
This parameter influences the CORS support. The default is an empty string meaning 'not specified'. If set to true (1) then CORS processing is ON. If set to false (0) then CORS processing is OFF. If left unset ("") then the decision to process CORS is delegated to the setting on the URL map route.
• parameter IKLATESTVERSION = "%iKnow.REST.v1dot1";
• parameter PAGESIZE = 200;

Methods

• classmethod %ErrorHandler(pSC As %Status, ByRef pContinue As %Boolean) as %Status
• classmethod CreateDomainAPI(pDomainId As %Integer, pClassname As %String, pVersion As %String = "%iKnow.REST.v1") as %Status
Use this method
• classmethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) as %Status
This method gets called prior to dispatch of the request. Put any common code here that you want to be executed for EVERY request. If pContinue is set to 0, the request will NOT be dispatched according to the UrlMap. In this case it's the responsibility of the user to return a response.
• classmethod ParseFilter(pDomainId As %Integer, pObject As %DynamicObject, Output pFilter As %iKnow.Filters.Filter) as %Status
{ ids: [ srcID1, srcID2, ...] } --> SourceIdFilter { extIds: [ extID1, extID2, ...] } --> ExternalIdFilter { field: "fieldName", operator: "<", value: "value" } --> SimpleMetadataFilter { operator: "AND"|"OR", negate : false, filters: [...] } --> GroupFilter { className: "RandomClass", arguments : [ all args except domainID] }
• classmethod ParseHighlight(Output pHighlight) as %Status
{ highlight: [ { style: "...", entities : ["..."] }, --> ENTITY { style: "...", role : "concept"|"relation"|"nonRelevant"|"pathRelevant" } --> ROLE { style: "...", attribute : "negation"|"positiveSentiment"|"negativeSentiment"|id } --> ATTRIBUTE { style: "...", attributeWords : "negation"|"positiveSentiment"|"negativeSentiment"|id } --> ATTRIBUTEWORDS { style: "...", anyMatch: true [, matchType:"partial"|"full"] } --> MATCH { style: "...", dictionaries: [ dictIDs... ] [, matchType:"partial"|"full"] } --> MATCH { style: "...", dictionaryItems: [ dictItemIDs... ] [, matchType:"partial"|"full"] } --> MATCHITEM { style: "...", start: ##, end: ## } --> CHARS { style: "...", stems : ["..."] }, --> STEMS { style: "...", crcs : ["..."] }, --> CRC { style: "...", paths : ["..."] }, --> PATH ] ... }
• classmethod ParseList(pObjectProp As %String, pRequestParam As %RawString = "") as %List
• classmethod ParseStringArray(pObjectProp As %String, pRequestParam As %RawString = "") as %DynamicArray
• classmethod ResolveDomainId(ByRef pDomainId As %RawString) as %Status
If the supplied domain ID is not a valid integer, verify if it happens to be a domain name and update pDomainId to that domain's ID


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