/api/reports

Lists all reports available to the user.

Resource Information

Request Parameters

Parameters

Detail

Example

filter

(Optional) If set, the result only contains reports that contain the filter text in name, description or owner name.

Sales

offset

(Optional) Specifies the page offset if pagination is necessary.

2

size

(Optional) Specifies the number of entries on each page if pagination is necessary.

  • size = 0 means, that the back-end is supposed to return total records count only. The returning object's size parameter then becomes the default value, which is 15
  • size =-1 is used to get to get all records
  • size >0 specifies the exact number of records to be retrieved
15

Response Structure

{
  "reports" : [ ],
  "offset" : 0,
  "size" : 100
}

JSON response contains 2 pagination elements (offset and size) but the main element is array "reports" that contains multiple report objects with following definition:

Name
Description
idReport identifier
nameReport name
ownerOwner full name
descriptionReport description
lastChangeDate and time of report last change
localization

Localization object that contains key-value pairs, where key is code of supported language and value is localized report name.

Sample Request / Response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/reports?filter=john

The JSON format response:

{
  "reports" : [
    {
      "id" : 7497,
      "description" : "This is a sample report.",
      "name" : "My Report",
      "localization" : {
        "de" : "Deutsch Name"
      },
      "owner" : "John Smith",
      "lastChange" : "Mon, 16 Apr 2012 10:17:26 GMT"
    }
  ],
  "offset" : 0,
  "size" : 100
}
  • No labels