InterSystems IRIS Data Platform 2020.4 > Class Reference > ENSLIB namespace > %DeepSee.REST.v2


class %DeepSee.REST.v2 extends %DeepSee.REST.REST

This class provides validation and dispatch for version 2 of the DeepSee REST services For /Command calls, required arguments are expected in the request body. Every request is treated as a POST request (including those that only fetch values) This is to prevent running into the error where the number of characters in the URL exceeds the limit. For /Data and /Info calls, required arguments are expected in the URL. The exceptions to this rule are /Data/MDXExecute and /Data/PivotExecute, which require an argument POSTed to the the body of the request. For some services, the client may POST additional parameters in the body of the request. The description for each service outlines the parameters accepted for that particular service. In all services, unknown parameters that are included in the request body are ignored.

Example: Execute an MDX query using an HTTP POST request, sent to a web application with Dispatch class %DeepSee.REST.v2.
		var request = {};
		var mdx = 'SELECT ' +
			  '  NON EMPTY [Product].[P1].[Product Category].Members ON 0,' +
			  '  NON EMPTY [Outlet].[H1].[Region].Members ON 1 ' +
			  'FROM [HoleFoods]'
		request.method = 'POST';
		request.user = 'user';
		request.passwd = 'pass';
		request.acceptType = 'JSON';
		request.contentType = 'JSON';
		request.body = '{"MDX":"' + mdx + '"}';
		request.callback = custom.queryCallBack
		request.async = true;
		request.url = 'http://host/port/restApplication/v2/Data/MDX';
		// run the query
		var xhr = new XMLHttpRequest();,request.url,request.async);
		// kick off the request
Requests may be sent to the following services:

Method Inventory (Including Private)

Methods (Including Private)

classmethod %ValidateRequest(pUrl As %String, pMethod As %String) as %Status [ Language = objectscript ]
Verfies required Converts request body

Inherited Members

Inherited Methods (Including Private)