%DeepSee.REST.REST
class %DeepSee.REST.REST extends %CSP.REST
Utilities used in the DeepSee rest servicesMethod Inventory
- %ConstructResponseFromArray()
- %CreateObjectFromArray()
- %ErrorToJSON()
- %ExtractDatasourceName()
- %ValidateRequest()
- %WaitForProviderResults()
- OnPreDispatch()
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 DOMAIN = %DeepSee;
Inherited description: Login page localization domain
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.
Methods
classmethod %ConstructResponseFromArray(ByRef pArray, pMetaData As %List = "", pNodeLabel="ListItems", pFetchStatus As %Status = 1, Output pResponseObj, Output pProvider) as %Status
This utility assists in constructing a standardized JSON response object from an array
of lists, as commonly returned by %DeepSee utilities.
The data in pArray must be organized in the form
pArray(index) = $LB(data1,data2,data3)
where the contents in each list are converted to name-value pairs using the list of labels provided in pMetaData. The array of objects is placed in the Result section of the dynamic object returned via pResponseObj. The specifc node within the Result section is labeled according to the string supplied in pNodeLabel.
For convenience, the method may return an instance of the %ZEN.Auxiliary.jsonMDXProvider used to augment the response object with more dynamic objects or arrays, as well as convert the object to JSON when the response object is complete.
pArray(index) = $LB(data1,data2,data3)
where the contents in each list are converted to name-value pairs using the list of labels provided in pMetaData. The array of objects is placed in the Result section of the dynamic object returned via pResponseObj. The specifc node within the Result section is labeled according to the string supplied in pNodeLabel.
For convenience, the method may return an instance of the %ZEN.Auxiliary.jsonMDXProvider used to augment the response object with more dynamic objects or arrays, as well as convert the object to JSON when the response object is complete.
This consumes an array and attempts to create a dynamic object out of it. This object can then be further
augmented or pruned, and can be used as a facility for converting the content to JSON.
Convert a %Status object that contains an error into JSON for transmission back to the client. The error will be located in the same
position within the object as with any JSON MDX resultset return. If there is a reported error, the existence of other properties within the return
object is not guaranteed.
classmethod %ExtractDatasourceName(pUrl="", pType="", Output pRemainder As %String, Output pStatus As %Status) as %String
DeepSee REST APIs permit use of the "/" character in data source names and dimension specs.
Given a piece of a pUrl that begins with a data source, this searches for the first valid
data source name and returns it. This can be limited by type or a list of types in the comma-delimited
list pType. Currently supported datasource types are "kpi" and "cube"
The remainder of the URL, if it exists, is returned in the pRemainder.
The remainder of the URL, if it exists, is returned in the pRemainder.
Perform specific validation for the service that will handle the request. This is used
as a callback in each service that extends %DeepSee.REST
classmethod %WaitForProviderResults(pProvider As %ZEN.Auxiliary.jsonMDXProvider, pTimeout As %Integer) as %Status
Given an instance of the jsonMDXProvider, begin executing the query and wait for results.
Quit early if the value supplied by pTimeout is reached.
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. If this case it's the
responsibility of the user to return a response.
Inherited Members
Inherited Methods
- %ClassIsLatestVersion()
- %ClassName()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %New()
- %OriginalNamespace()
- %PackageName()
- %SetModified()
- AcceptsContentType()
- AccessCheck()
- ConvertParameter()
- Decrypt()
- DispatchMap()
- DispatchRequest()
- DrawCSS3STYLE()
- DrawHEAD()
- DrawSTHEAD()
- DrawSTTitle()
- DrawSTYLE()
- DrawTitle()
- DrawTitleSection()
- Encrypt()
- Error()
- EscapeHTML()
- EscapeURL()
- Http403()
- Http404()
- Http405()
- Http500()
- HyperEventCall()
- HyperEventHead()
- Include()
- InsertHiddenField()
- InsertHiddenFields()
- IsPrivate()
- Link()
- Login()
- OnErrorSetup()
- OnHTTPHeader()
- OnHandleCorsRequest()
- OnHandleOptionsRequest()
- OnLoginPage()
- OnPage()
- OnPageError()
- OnPostHTTP()
- OnPostHyperEvent()
- OnPreHTTP()
- OnPreHyperEvent()
- OnSecurityTokenPage()
- Page()
- QuoteJS()
- ReportHttpStatusCode()
- ResolveTarget()
- RewriteURL()
- SetResponseHeaderIfEmpty()
- ShowError()
- StartTimer()
- StatusToJSON()
- StatusToProxyObject()
- StopTimer()
- SupportedVerbs()
- ThrowError()
- UnescapeHTML()
- UnescapeURL()