Retrieving report templates

Allows report templates to be listed and searched.

URLs

GET    /api/v1/templates

Optional parameters

Parameter can be passed in URL as ?param=value or form-encoded in the request body.

Name

Values

Default

Function

query

string

-

If this is not specified, all report templates which the client has permission to access will be returned.

Where specified, only report templates which contain all of the terms (separated with spaces) specified in their name and their description (search terms are linked with AND operator) will be returned.

Query is limited to a maximum of 256 characters and may contain a maximum of 10 search terms.

format

json/xml

xml

Determines the data format of the resulting list (JSON or XML).

 

Result

An array of the type ReportTemplateEntry (see below) will be returned.

Error codes (in addition to general error codes)

Status code

Status text

Explanation

400

ERR_INVALID_PARAM

The query parameter is too long or contains too many search terms.

 

Examples

▪    http://combitreportserver/api/v1/templates

Returns a list of all report templates which the client has permission to access. (Returns as XML)

▪    http://combitreportserver/api/v1/templates?query=Sales%202015&format=json

Provides a list of all report templates which contain the words "Sales" and "2015" (please note the coding of spaces as %20 in the URL!) (returns as JSON).

Result type: ReportTemplateEntry

As XML

<?xml version="1.0" encoding="utf-16"?>

<ArrayOfReportTemplateEntry xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <ReportTemplateEntry>

    <ID>F92699D8-FA81-4C92-9AE5-A5EA2E5F8E61</ID>

    <Name>Sales Charts 2015</Name>

    <Description>This is the description.</Description>

    <ExportLink>http://combitreportserver/api/v1/report/F92699D8-FA81-4C92-

    9AE5-A5EA2E5F8E61/export</ExportLink>

    <CreatedBy>Jon Doe</CreatedBy>

    <CreatedOnUTC>2014-10-16T12:02:52</CreatedOnUTC>

    <ModifiedBy>Foo Bar</ModifiedBy>

    <ModifiedOnUTC>2014-10-21T07:42:25</ModifiedOnUTC>

  </ReportTemplateEntry>

  [...]

</ArrayOfReportTemplateEntry

As JSON

[

  {

    "ID": "F92699D8-FA81-4C92-9AE5-A5EA2E5F8E61",

    "Name": "Sales Charts 2015",

    "Description": "This is the description.",

    "ExportLink": "http://<servername>/rs29/api/v1/report/F92699D8-FA81-4C92-9AE5

    -A5EA2E5F8E61/export",

    "CreatedBy": "Jon Doe",

    "CreatedOnUTC": "2014-10-16T12:02:52",

    "ModifiedBy": "Foo Bar",

    "ModifiedOnUTC": "2014-10-21T07:42:25"

  },

  ...

}