%iKnow.REST.Base
Class %iKnow.REST.Base Extends %CSP.REST [ Abstract, Deprecated, System = 4 ]
Parameters
CHARSET
Parameter CHARSET = "utf-8";
CONTENTTYPE
Parameter CONTENTTYPE = "application/json";
HandleCorsRequest
Parameter HandleCorsRequest = 1;
PAGESIZE
Parameter PAGESIZE As INTEGER = 200;
IKLATESTVERSION
Parameter IKLATESTVERSION As STRING = "%iKnow.REST.v1dot1";
Methods
OnPreDispatch
ClassMethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) As %Status
%ErrorHandler
ClassMethod %ErrorHandler(pSC As %Status, ByRef pContinue As %Boolean) As %Status
%ProcessResult
ClassMethod %ProcessResult(pSC As %Status, pResult As %DynamicObject = "") As %Status [ Internal ]
ResolveDomainId
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
ParseArgs
ClassMethod ParseArgs(pDomainId As %Integer = 0, Output pPage As %Integer, Output pPageSize As %Integer, Output pFilter As %iKnow.Filters.Filter, Output pFilterMode As %Integer, Output pSkiplists As %List) As %Status [ Internal ]
Parse a few common arguments out of %request.Content
ParseFilter
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] }
ParseHighlight
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 ] ... }
ParseList
ClassMethod ParseList(pObjectProp As %String, pRequestParam As %RawString = "") As %List
ParseStringArray
ClassMethod ParseStringArray(pObjectProp As %String, pRequestParam As %RawString = "") As %DynamicArray
CreateDomainAPI
ClassMethod CreateDomainAPI(pDomainId As %Integer, pClassname As %String, pVersion As %String = "%iKnow.REST.v1") As %Status
Use this method