StatPro Revolution Web API


The Service Resource


Overview

The Service resource is the entry-point resource of the Web API (aka web service). It is identified by the entry-point URI, https://revapi.statpro.com/v1, and accessed using the HTTP GET method. When a client application starts to use the web service, it should always start at the Service resource. From there it can move forwards to other resources, using service-supplied links.

The Service resource offers the following:-

  • a count of the user's portfolios (the portfolios that the user owns, plus the portfolios that are shared to him/her by other users);
  • a link that allows the user's portfolios to be retrieved via a client-specified query.
  • Optionally, a link providing access to the full list of available reporting tags associated to portfolios in the authenticated user's tenancy. This collection of distinct reporting tags is represented by the Portfolio Reporting Tags resource. If no reporting tags have been imported against any portfolios, then this link will not be exposed.

For convenience, every other resource in the web service exposes a link to the Service resource, using the same entry-point URI.


Media types

The Service resource is exposed via XML and JSON representations, which have the following media type names:-

application/vnd.statpro.revolution.api.service+json

application/vnd.statpro.revolution.api.service+xml

When a response is received from the web service with status 200 (= OK), the fact that the response contains a Service resource representation is indicated by the presence of one of these two response headers:-

Content-Type: application/vnd.statpro.revolution.api.service+json; charset=utf-8

Content-Type: application/vnd.statpro.revolution.api.service+xml; charset=utf-8


Related resources

The Service resource links to the Porfolios resources (and to itself). To do so, its resource representations use link relations:-

  • self
  • portfolios-query

The self link relation identifies the Service resource link.

The portfolios-query link relation identifies the Portfolios resource link. The fact that the link relation ends with "-query" indicates that a client-specified query must be made for portfolios. This is done by replacing all the text-replacement parts of the link's query string (such as {filter}) with values. Specifying invalid values will result in a 400 (= Bad Request) response. All the text replacement parts of the query string can be replaced with the empty string. To apply filtering, ordering and slicing according to a subset of the ODATA system query options syntax, please refer to the portfolios-query link relation's documentation page.

The portfolio-reporting-tags link relation identifiers the Portfolio Reporting Tags resource link. This resource represents the distinct collection of reporting tags available in the authenticated user's tenancy.

All related resources (including the Service resource itself) are accessed using the HTTP GET method.


Update history

  • Added optional link for the portfolio reporting tags resource - February 2015
  • Information about EULA removed - September 2013
  • Initial Version - February 2013

Annotated Representation (JSON)

Legend

{
  "service": {
    "links": {
      "self": {
        "rel": "self",
        "href": "...",
        "type": "application/vnd.statpro.revolution.api.service+json"
      }
    },
    "portfolios": {
      "total": 18,
      "links": {
        "portfoliosQuery": {
          "rel": "portfolios-query",
          "href": "...?$filter={filter}&$orderby={orderby}&$skip={skip}&$top={top}&includePublishedPortfolios=false&portfolioClassifierCode=",
          "type": "application/vnd.statpro.revolution.api.portfolios+json"
        },
        "portfolioReportingTags": {
          "rel": "portfolio-reporting-tags",
          "href": "...",
          "type": "application/vnd.statpro.revolution.api.portfolio-reporting-tags+json"
        },
        "portfolioReturnDefinitions": {
          "rel": "portfolio-return-definitions",
          "href": "...",
          "type": "application/vnd.statpro.revolution.api.portfolio-return-definitions+json"
        },
        "portfolioShareClasses": {
          "rel": "portfolio-share-classes",
          "href": "...",
          "type": "application/vnd.statpro.revolution.api.portfolio-share-classes+json"
        }
      }
    },
    "classifiers": {
      "total": 13,
      "links": {
        "classifiersQuery": {
          "rel": "classifiers-query",
          "href": "...",
          "type": "application/vnd.statpro.revolution.api.classifiers+json"
        }
      }
    },
    "benchmarks": {
      "links": {
        "benchmarksQuery": {
          "rel": "benchmarks-query",
          "href": "...?$filter={filter}&$orderby={orderby}&$skip={skip}&$top={top}",
          "type": "application/vnd.statpro.revolution.api.benchmarks+json"
        }
      }
    },
    "riskFreeRates": {
      "total": 232,
      "links": {
        "riskFreeRatesQuery": {
          "rel": "riskfreerates-query",
          "href": "...?$filter={filter}&$orderby={orderby}&$skip={skip}&$top={top}",
          "type": "application/vnd.statpro.revolution.api.riskfreerates+json"
        }
      }
    }
  }
}


Annotated Representation (XML)

Legend

<?xml version="1.0" encoding="utf-8"?>
<service xmlns="http://statpro.com/2012/Revolution">
  <link rel="self"
        href="..."
        type="application/vnd.statpro.revolution.api.service+xml" />
  <portfolios>
    <total>18</total>
    <link rel="portfolios-query"
          href="...?$filter={filter}&amp;$orderby={orderby}&amp;$skip={skip}&amp;$top={top}&amp;includePublishedPortfolios=false&amp;portfolioClassifierCode="
          type="application/vnd.statpro.revolution.api.portfolios+xml" />
    <link rel="portfolio-reporting-tags"
          href="..."
          type="application/vnd.statpro.revolution.api.portfolio-reporting-tags+xml" />
    <link rel="portfolio-return-definitions"
          href="..."
          type="application/vnd.statpro.revolution.api.portfolio-return-definitions+xml" />
    <link rel="portfolio-share-classes"
          href="..."
          type="application/vnd.statpro.revolution.api.portfolio-share-classes+xml" />
  </portfolios>
  <classifiers>
    <total>13</total>
    <link rel="classifiers-query"
          href="..."
          type="application/vnd.statpro.revolution.api.classifiers+xml" />
  </classifiers>
  <benchmarks>
    <link rel="benchmarks-query"
          href="...?$filter={filter}&amp;$orderby={orderby}&amp;$skip={skip}&amp;$top={top}"
          type="application/vnd.statpro.revolution.api.benchmarks+xml" />
  </benchmarks>
  <riskFreeRates>
    <total>232</total>
    <link rel="riskfreerates-query"
          href="...?$filter={filter}&amp;$orderby={orderby}&amp;$skip={skip}&amp;$top={top}"
          type="application/vnd.statpro.revolution.api.riskfreerates+xml" />
  </riskFreeRates>
</service>


Last updated: February 2015


To Top