Data Service API ガイド
エンティティ レコードにクエリを実行します。
API エンドポイント

BaseURL/EntityService/<Entity>/query
- ベースURL:
https://{yourDomain}/{organizationName}/{tenantName}/dataservice_
要求ヘッダー
| ヘッダー | 値 (Value) |
|---|---|
| 認可 | Bearer <access_token> |
| Content-Type | application/json |
角括弧で囲まれた値 <...> をすべて、対応するユース ケース値に置き換えます。
<access_token> は、外部アプリケーションの認証時に受け取ったトークンです。このトークンは 1 時間利用可能です。1 時間経ったら、新しいトークンを生成するか、更新トークンを要求する必要があります。
Query Parameters
| クエリ パラメーター | データ型 | 説明 | 既定値 |
|---|---|---|---|
| expansionLevel (任意) | int32 | 取得する関連レコードの深さを指定します。このパラメーターには 1、2、または 3 のいずれかの値を指定できます。 | 2 |
要求本文 (必須)
{
"selectedFields": [
"string"
],
"filterGroup": {
"logicalOperator": 0,
"queryFilters": [
{
"fieldName": "string",
"operator": "string",
"value": "string"
}
],
"filterGroups": [
null
]
},
"start": 0,
"limit": 0,
"sortOptions": [
{
"fieldName": "string",
"isDescending": true
}
]
}
{
"selectedFields": [
"string"
],
"filterGroup": {
"logicalOperator": 0,
"queryFilters": [
{
"fieldName": "string",
"operator": "string",
"value": "string"
}
],
"filterGroups": [
null
]
},
"start": 0,
"limit": 0,
"sortOptions": [
{
"fieldName": "string",
"isDescending": true
}
]
}
要求本文のスキーマ
query エンドポイントの要求本文は、以下のコンポーネントから成ります。
selectedFields
これは、string 型の任意のコンポーネントです。クエリの各レコードに対して返されるフィールドのリストを指定します。何も指定しない場合、またはクエリ リストが空の場合は、すべてのレコード フィールドが返されます。既定値は null です。
filterGroup
これは、クエリのフィルター処理プロパティを設定するのに役立つ、必須のコンポーネントです。以下のプロパティを組み合わせます。
-
logicalOperator - This is an optional filterGroup property, of type
int32. It specifies if all the filters and filter groups apply to the query. Use0to apply all the filters and filter groups. Use1to apply any of the filters and filter groups. Default value is0. -
queryFilter - This is a required filterGroup property, that helps you define the filtering expression. It has the following properties:
queryFilter のプロパティ データ型 説明 fieldName stringフィルター処理するフィールドの名前を指定します。 operator stringSpecifies the filter operator. Supports the following: contains,not contains,startswith,endswith,=,!=,>,<,>=,<=,in,not in. Use the adequate operator for the corresponding field type.value stringフィルター値を指定します。 -
filterGroups - This is an optional filterGroup property, in case you need to set another filtering option to the query. It contains all the filterGroup properties listed above.
開始
This is an optional component, of type int32. Specifies the number of records to skip before retrieving the records from the query. Can be used together with the limit property to implement pagination. The records are ordered ascendingly by their IDs. To modify the sort order, use the sortOptions property. Default value is 0.
limit
This is an optional component, of type int32. It specifies the maximum number of records to be read from the entity. Can be used together with the start property to implement pagination. The default value is 100, and the maximum value is 1000.
sortOptions
これは任意のコンポーネントであり、クエリが実行されたレコードをフィールドのリストで並べ替える際に役立ちます。空のままにすると、レコードは ID の昇順に並べ替えられます。以下のプロパティを組み合わせます。
- fieldName - This is a required sortOptions property, of type
string. It specifies the name of the field used to sort the records. The name must correspond to a valid field, and it is case-sensitive. - isDescending - This is an optional sortOptions property, of type
boolean. Set it totrueif you want to sort the records descendingly. The default value isfalse.
応答
200 OK
{
"TotalRecordCount": 0,
"Value": [
{
"ClosingDate": "2021-03-04",
"CreatedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"CreateTime": "2021-03-04T10:21:22.771Z",
"Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Logo": {
"Name": "string",
"Path": "string",
"Size": 0,
"Type": "string"
},
"Name": "string",
"Nations": 0,
"OlymipcsVersion": 0,
"OpeningDate": "2021-03-04",
"UpdatedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"UpdateTime": "2021-03-04T10:21:22.771Z"
}
]
}
{
"TotalRecordCount": 0,
"Value": [
{
"ClosingDate": "2021-03-04",
"CreatedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"CreateTime": "2021-03-04T10:21:22.771Z",
"Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Logo": {
"Name": "string",
"Path": "string",
"Size": 0,
"Type": "string"
},
"Name": "string",
"Nations": 0,
"OlymipcsVersion": 0,
"OpeningDate": "2021-03-04",
"UpdatedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"UpdateTime": "2021-03-04T10:21:22.771Z"
}
]
}
応答本文のスキーマ
query エンドポイントの応答本文は、以下のコンポーネントから成ります。
- totalRecordCount - The total number of records matching the specified query filters.
- value - An array of entity records matching the specified query filters, limited by limit property.
401 未承認
Data Service へのアクセスが認証されていません。お使いのアカウントのモダン フォルダーに Assistant またはロボットが接続されていることをご確認ください。
403 Forbidden
エンティティ、フィールド、またはレコードにアクセスする権限がありません。または、サポートされていない種類のロボットを使用しています。必要な権限について管理者にお問い合わせください。