Devices - List
デバイス リソースのページ分割されたリストを返します。
GET {endpoint}/sensor-partners/{sensorPartnerId}/devices?api-version=2023-11-01-preview
GET {endpoint}/sensor-partners/{sensorPartnerId}/devices?parentDeviceIds={parentDeviceIds}&deviceDataModelIds={deviceDataModelIds}&ids={ids}&names={names}&propertyFilters={propertyFilters}&statuses={statuses}&minCreatedDateTime={minCreatedDateTime}&maxCreatedDateTime={maxCreatedDateTime}&minLastModifiedDateTime={minLastModifiedDateTime}&maxLastModifiedDateTime={maxLastModifiedDateTime}&maxPageSize={maxPageSize}&skipToken={skipToken}&api-version=2023-11-01-preview
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
endpoint
|
path | True |
string uri |
名前空間のホスト名 (例: admaInstanceName.farmbeats.azure.net) |
sensor
|
path | True |
string |
関連付けられているセンサー パートナーの ID。 |
api-version
|
query | True |
string |
要求された API バージョン |
device
|
query |
string[] |
デバイス データ モデルの ID。 |
|
ids
|
query |
string[] |
リソースの ID。 |
|
max
|
query |
string date-time |
リソースの最大作成日 (含む)。 |
|
max
|
query |
string date-time |
リソースの最終変更日 (含む)。 |
|
max
|
query |
integer int32 |
必要な項目の最大数 (含む)。 Minimum = 10、Maximum = 1000、既定値 = 50。 |
|
min
|
query |
string date-time |
リソースの最小作成日 (含む)。 |
|
min
|
query |
string date-time |
リソースの最終更新日の最小値 (含む)。 |
|
names
|
query |
string[] |
リソースの名前。 |
|
parent
|
query |
string[] |
親デバイスの ID。 |
|
property
|
query |
string[] |
Properties オブジェクト内のキーと値のペアをフィルター処理します。 例: "{testKey} eq {testValue}"。 |
|
skip
|
query |
string |
次の結果セットを取得するためのトークンをスキップします。 |
|
statuses
|
query |
string[] |
リソースの状態。 |
要求ヘッダー
名前 | 必須 | 型 | 説明 |
---|---|---|---|
Authorization | True |
string |
承認された API 呼び出しに対して有効なベアラー トークンを指定してください。 以前に認証されていない呼び出しを試した場合は、ブラウザー キャッシュをクリアする必要がある場合があることに注意してください。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
エラー ヘッダー x-ms-error-code: string |
セキュリティ
Authorization
承認された API 呼び出しに対して有効なベアラー トークンを指定してください。 以前に認証されていない呼び出しを試した場合は、ブラウザー キャッシュをクリアする必要がある場合があることに注意してください。
型:
apiKey
/:
header
例
Devices_List
要求のサンプル
GET {endpoint}/sensor-partners/sp1/devices?api-version=2023-11-01-preview
応答のサンプル
{
"value": [
{
"deviceDataModelId": "ddm124",
"integrationId": "string",
"type": "device",
"hardwareId": "HD156",
"reportingIntervalInSeconds": 10,
"location": {
"latitude": 23.5,
"longitude": 42.7
},
"sensorPartnerId": "sp1",
"id": "d124",
"status": "new device",
"createdDateTime": "2022-01-24T06:22:41Z",
"modifiedDateTime": "2022-01-24T06:22:43Z",
"eTag": "04010fd5-0000-0700-0000-61ee45b30000",
"name": "my device",
"description": "description goes here",
"properties": {
"key1": "value1",
"key2": 123.45
}
}
],
"skipToken": "skipToken",
"nextLink": "https://{{resourceName}}.farmbeats.azure.net/sensor-partners/{{sensorPartnerId}}/device-data-models?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7e23TRC%3a10%23ISA%3d%22%2c%22range%22%3a%7b%22min%22%3a%22%22%2c%22max%22%3a%22FF%22%7d%7d%5d"
}
定義
名前 | 説明 |
---|---|
Device |
デバイス API モデル。 |
Device |
ページングされた応答には、要求されたオブジェクトの一覧と、次の結果セットを取得するための URL リンクが含まれています。 |
Error |
Azure AgPlatform サービスからのエラー。 |
Error |
Azure AgPlatform サービスからのエラー応答。 ErrorResponse リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses してください。 |
Inner |
エラーの一覧を含む内部エラー。InnerError リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object してください。 |
Location |
場所モデル クラス。 |
Device
デバイス API モデル。
名前 | 型 | 説明 |
---|---|---|
createdBy |
string |
ユーザー/テナント ID によって作成されます。 |
createdDateTime |
string |
リソースが作成された日時 (サンプル形式: yyyy-MM-ddTHH:mm:ssZ)。 |
description |
string |
リソースの説明テキスト。 |
deviceDataModelId |
string |
関連付けられているデバイス データ モデルの ID。 |
eTag |
string |
オプティミスティック コンカレンシーを実装する ETag 値。 |
hardwareId |
string |
デバイス hardwareId。 |
id |
string |
リソースの ID。 |
integrationId |
string |
デバイスの統合 ID。 |
location |
場所モデル クラス。 |
|
modifiedBy |
string |
ユーザー/テナント ID によって変更されます。 |
modifiedDateTime |
string |
リソースが最後に変更された日時 (サンプル形式: yyyy-MM-ddTHH:mm:ssZ)。 |
name |
string |
リソースを識別する名前 |
parentDeviceId |
string |
このデバイスの親デバイス ID。 |
properties |
リソースに属するキー値ペアのコレクション。 各ペアには、50 文字を超えるキーを持つ必要があり、150 文字を超える値を持つ必要があります。 注: リソースには最大 25 個のキー値ペアを指定でき、文字列、数字、datetime (yyyy-MM-ddTHH:mm:ssZ) 値のみがサポートされます。 |
|
reportingIntervalInSeconds |
integer |
デバイスが秒単位でデータを送信する間隔。 |
sensorPartnerId |
string |
関連付けられているセンサー パートナーの ID。 |
status |
string |
リソースの状態。 |
type |
string |
デバイスの種類。 |
DeviceListResponse
ページングされた応答には、要求されたオブジェクトの一覧と、次の結果セットを取得するための URL リンクが含まれています。
名前 | 型 | 説明 |
---|---|---|
nextLink |
string |
一覧にある結果の次のページへの継続リンク (絶対 URI) |
skipToken |
string |
次のページの取得に使用されるトークン。 null の場合、追加のページはありません。 |
value |
Device[] |
要求されたオブジェクトの一覧。 |
Error
Azure AgPlatform サービスからのエラー。
名前 | 型 | 説明 |
---|---|---|
code |
string |
サーバー定義のエラー コードのセット。 |
details |
Error[] |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
innererror |
エラーの一覧を含む内部エラー。InnerError リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object してください。 |
|
message |
string |
人が判読できるエラーの表現。 |
target |
string |
エラーのターゲット。 |
ErrorResponse
Azure AgPlatform サービスからのエラー応答。 ErrorResponse リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses してください。
名前 | 型 | 説明 |
---|---|---|
error |
Azure AgPlatform サービスからのエラー。 |
|
traceId |
string |
一意のトレース ID。 |
InnerError
エラーの一覧を含む内部エラー。InnerError リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object してください。
名前 | 型 | 説明 |
---|---|---|
code |
string |
を含むエラーによって提供されたエラー コードよりも具体的なエラー コード。 |
innererror |
エラーの一覧を含む内部エラー。InnerError リファレンス ドキュメントを参照 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object してください。 |
Location
場所モデル クラス。
名前 | 型 | 説明 |
---|---|---|
latitude |
number |
場所の緯度。 |
longitude |
number |
場所の経度。 |