Versions Compared

Key

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

/api/dataSets

Lists all datasets available to the user.

Resource Information

Request Parameters

Parameters

Detail

Example

filter

(Optional) If set, the result only contains data sets that contain the filter text in 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
languagejs
{
  "dataSets" : [ ],
  "offset" : 0,
  "size" : 100
}

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

NameDescription
idData set identifier
nameData set name
codeData set code
ownerOwner full name
descriptionData set description
lastChangeDate and time of data set last change
localization

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

parameters(Optional) Array of data set parameters

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/dataSets?filter=john

The JSON format response:

Code Block
javascript
javascript
{
  "dataSets" : [
    {
      "id" : 7497,
      "name" : "John's data set",
      "code" : "DATASET_CODE",
      "owner" : "John Smith",
      "localization" : {
        "de" : "Deutsch Name"
      },
      "description" : "This is a sample data set.",
      "lastChange" : "Mon, 16 Apr 2012 10:17:26 GMT",
	  "parameters": [
        {
          "param1": "value1"
        },
        {
          "param2": "value2"
        }
      ]
    }
  ],
  "offset" : 0,
  "size" : 100
}


Sv translation
languageja

/api/dataSets

ユーザに利用可能なすべてのレポートをリストします。

リソース情報

リソースURL 

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

HTTP方法

GET

リクエストパラメータ

Parameters

Detail

Example

filter

(任意)設定された場合、結果は名前にテキストフィルターを含むデータセットのみが含めます。

Sales

offset

(任意)ページネーションが必要な場合はページオフセットを指定します。

2

size

(任意)ページネーションの各ページのエントリ数が必要であることを指定します。

15

レスポンスの構造

Code Block
languagejs
{
  "dataSets" : [ ],
  "offset" : 0,
  "size" : 100
}

JSONレスポンスは、2つのページネーション要素(オフセットサイズ)が含まれているが、主な要素は以下の定義のように複数のデータセットオブジェクトを含む「dataSets」配列です。

説明
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/dataSets?filter=john

JSONフォーマットの応答:

Code Block
javascript
javascript
{
  "dataSets" : [
    {
      "id" : 7497,
      "name" : "John's data set",
      "owner" : "John Smith",
      "localization" : {
        "de" : "Deutsch Name"
      },
      "description" : "This is a sample data set.",
      "lastChange" : "Mon, 16 Apr 2012 10:17:26 GMT"
    }
  ],
  "offset" : 0,
  "size" : 100
}