portfolio-analysis-controller-query link relation identifies a link that targets the Portfolio Analysis Controller resource, which is accessed using the HTTP POST method. This controller resource allows for triggering the (re-)calculation of Custom Time Period Portfolio Analysis resources. When triggering the calculation, an XML document is supplied in the entity body of the POSTed request which describes the time periods to request and an optional flag indicating whether or not to also trigger the (re-)calculation of any related reporting component portfolio analyses (if available). For further details of how to formulate this Xml query refer to the Querying For Data section below.
Triggering portfolio analysis calculations is fairly resource intensive on the Revolution platform and therefore in addition to the normal Fair Usage Policy this resource has some added restrictions implemented in terms of the number of calculations that are allowed to be triggered within a period of time.
A query is expressed in XML form, and must be included in the entity body of the POSTed request to this link relation’s identified URI. A query’s XML looks like this:-
<customTimePeriodAnalysisRequest xmlns="http://statpro.com/2012/Revolution"> <timePeriods> <timePeriod> <start>2017-01-05</start> <end>2017-04-18</end> </timePeriod> <timePeriod> <start>2016-11-05</start> <end>2017-02-22</end> </timePeriod> </timePeriods> <applyToReportingComponents>true</applyToReportingComponents> </customTimePeriodAnalysisRequest>
In the example above, the query is requesting the calculation of a Custom Time Period Portfolio Analysis with two custom time periods. It is additionally flagging that it should also apply the same custom time periods to any reporting components alternative settings portfolios (if available).
The details and requirements of the query’s XML are as follows:-
<timePeriods>...</timePeriods>element is not significant.
Last updated: June 2017