Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

/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

Code Block
javascript
javascript
{
  "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:

Code Block
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:

Code Block
javascript
javascript
{
  "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
}
Sv translation
languageja

/api/reports

ユーザーが利用できるすべてのレポートを一覧表示します。

リソース情報

リソースURL 

https://service.belladati.com/api/reports

HTTPメソッド

GET

リクエストパラメーター

パラメーター

詳細

filter

(オプション) 設定されている場合、結果には、名前、説明、所有者名にフィルターテキストを含むレポートのみが含まれます。

Sales

offset

(オプション) ページ付けが必要な場合は、ページオフセットを指定します。

2

size

(オプション) ページ付けが必要な場合は、各ページのエントリー数を指定します。

  • size = 0は、バックエンドが合計レコード数のみを返すことになっていることを意味します。返されるオブジェクトのサイズパラメーターが、デフォルト値の15になります。
  • size =-1は、すべてのレコードを取得するために使用されます。
  • size >0は、取得するレコードの正確な数を指定します。
15

レスポンス構造

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

JSONレスポンスには、2つのページネーション要素 (offsetsize) が含まれていますが、主な要素は、次の定義を持つ複数のレポートオブジェクトを含む"reports"配列です:

説明
idレポート識別子
nameレポート名
owner所有者のフルネーム
descriptionレポートの説明
lastChangeレポートの最終変更の日時
localization

キーと値のペアを含むローカリゼーションオブジェクト。キーはサポート言語のコードであり、値はローカライズされたレポート名です。

サンプルリクエスト/レスポンス

Curl使用:

Code Block
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

JSON形式のレスポンス:

Code Block
javascript
javascript
{
  "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
}