センサーAPI – データストリーム:Get
- 公開日
- 更新日 2024-11-18
利用条件
ベーシックAPI(申込不要)
概要
API名称
Datastreams
カテゴリー
説明
データストリーム
添付ファイル
ー
データの更新頻度
ー
リクエスト
新URL
New!
ー
旧URL(2025年度末で終了予定)
https://api.wagri.net/API/Sensing/Private/Datastreams/Get/{key}
説明
データストリームの取得
HTTPメソッド
GET
パラメータ
ー
新呼出例
New!
ー
旧呼出例(2025年度末で終了予定)
ー
レスポンス
レイアウト
レスポンスデータ定義
データストリーム
| 名称 | 値 | 型 | 値の説明 |
|---|---|---|---|
| key | Id | string | Required |
| name | 名称 | string | Required |
| description | 説明 | string, null | |
| observedArea | 測定範囲 | observedArea | |
| phenomenonTime | 測定開始日時 | string, null | Format: date-time |
| resultTime | 測定終了日時 | string, null | Format: date-time |
| ObservedPropertyId | 測定項目Id | string | Required Format: ForeignKey /API/Sensing/Master/ObservedProperties/Get/{value} |
| SensorId | センサーId | string | Required Format: ForeignKey /API/Sensing/Master/Sensors/Get/{value} |
| ObservationConditionId | 測定条件Id | string, null | Format: ForeignKey /API/Sensing/Private/ObservationConditions/Get/{value} |
| UnitOfMeasurementId | 測定単位Id | string | Required Format: ForeignKey /API/Sensing/Master/MeasurementUnits/Get/{value} |
| ThingId | センサー群Id | string | Required Format: ForeignKey /API/Sensing/Private/Things/Get/{value} |
レスポンス例
ー
ステータスコード
| コード | 名称 | 値の説明 |
|---|---|---|
| 200 | OK | リクエストが成功しました。 |
| 400 | Bad Request | リクエストが不正です。 |
| 401 | Unauthorized | 認証情報が不正です。 |
| 403 | Forbidden | リソースのアクセスが禁止されています。 |
| 404 | Not Found | リソースが見つかりませんでした。 |
| 500 | Internal Server Error | サーバー内部でエラーが発生しました。 |
サンプルソースコード
プログラム記述例(WAGRI共通)
import requests
url = "https://api.wagri.net/API/Public/AgriculturalLand/SearchByCityCode"
payload = {
'CityCode': '432041'
}
headers = {
'X-Authorization': 'アクセストークン',
}
response = requests.get(url, headers=headers, params=payload)
print(response.text)
プログラム記述例(個別API)
ー

