API สำหรับอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่
การกำหนดรายละเอียดของ API สำหรับการอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่
API ID | URL | รายละเอียด |
---|---|---|
B002.1 | /LargesizedWaterResourcesInfo | อ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามเงื่อนไข |
B002.2 | /LargesizedWaterResourcesInfo/{waterResourcesCode} | อ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามรหัสแหล่งน้ำ |
คุณลักษณะ API สำหรับอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามเงื่อนไข
API ID: B002.1
วัตถุประสงค์: อ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามเงื่อนไข
Status: Required (ตั้งแต่ API version 1.0 Draft 1)
Since: 1.0 Draft 1
Revision: 1.0 Draft 1
ข้อมูลทั่วไปในการติดต่อ API สำหรับอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามเงื่อนไข
ข้อมูล | รายละเอียด |
---|---|
URL | /LargesizedWaterResourcesInfo |
HTTP Method | GET |
Query parameter ของ API สำหรับอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามเงื่อนไข
ลำดับ | Parameter | Type | ความหมาย | หมายเหตุ |
---|---|---|---|---|
1 | agencyCode | string | รหัสสถานีตรวจวัดของหน่วยงาน ดูหัวข้อรหัสสถานีตรวจวัด | optional |
2 | waterResourcesCode | string | รหัสแหล่งน้ำ ดูหัวข้อรหัสแหล่งน้ำ | optional |
3 | provinceCode | string | รหัสจังหวัด (2 หลัก) ดูหัวข้อการอ้างอิงจังหวัด | optional |
4 | amphoeCode | string | รหัสอำเภอ (4 หลัก) ดูหัวข้อการอ้างอิงอำเภอ | optional |
5 | tambonCode | string | รหัสตำบล (6 หลัก) ดูหัวข้อการอ้างอิงตำบล | optional |
6 | basinCode | string | รหัสลุ่มน้ำหลัก (2 หลัก) ดูหัวข้อการอ้างอิงลุ่มน้ำหลัก/ลุ่มน้ำสาขา | optional |
7 | subBasinCode | string | รหัสลุ่มน้ำสาขา (4 หลัก) ดูหัวข้อการอ้างอิงลุ่มน้ำหลัก/ลุ่มน้ำสาขา | optional |
ตัวอย่าง HTTP Request Parameter ระบุรหัสสถานีตรวจวัด
waterResourcesCode: G50504-435436
ตัวอย่าง HTTP Request Parameter ระบุรหัสสถานีตรวจวัดร่วมกับรหัสจังหวัด
agencyCode: G50504
provinceCode: 60
หมายเหตุ
มีการขึ้นบรรทัดสำหรับ Parameter และไม่ได้ทำ HTTP URL Encode เพื่อให้ง่ายต่อการอ่าน
คุณลักษณะ API สำหรับอ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ตามรหัสแหล่งน้ำ
API ID: B002.2
วัตถุประสงค์: อ่านข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่
Status: Required (ตั้งแต่ API version 1.0 Draft 1)
Since: 1.0 Draft 1
Revision: 1.0 Draft 1
ข้อมูลทั่วไปในการติดต่อ API สําหรับอ่านข้อมูลสารสนเทศแหล่งน้ําขนาดใหญ่ตามรหัสแหล่งน้ําค
ข้อมูล | รายละเอียด |
---|---|
URL | /LargesizedWaterResourcesInfo/{waterResourcesCode} |
HTTP Method | GET |
หมายเหตุ
waterResourcesCode – รหัสของแหล่งน้ำอ้างอิงหัวข้อรหัสแหล่งน้ำ
โครงสร้างของ HTTP Response Body ข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ที่ได้จาก API
{ "metadata": { "version": string, "dataProviderCode": string, "dataProviderName": string, "documentGenerateTime": datetime, "waterDatatype": string }, "waterResources": [ { "waterResourcesMetadata": { "dataOwnerCode": string, "dataOwnerName": string, "waterResourcesCode": string, "waterResourcesName": string, "waterResourcesSize": string, "capacity": decimal, "deadStorage": decimal, "maximumLevel": decimal, "locationCode": string, "latitude": decimal, "longitude": decimal, "watershedArea": decimal, "spillwayCrest": decimal, "spillwayRate": decimal }, "elevationAreaCapacity": ecacurve, "lastUpdateTime": datetime } ] }
ตัวอย่าง ของ HTTP Response Body ข้อมูลสารสนเทศแหล่งน้ำขนาดใหญ่ที่ได้จาก API
{ "metadata": { "version": "1.0", "dataProviderCode": "G50504", "dataProviderName": "Electricity Generating Authority of Thailand", "documentGenerateTime": "2022-05-02T23:01:00", "waterDatatype": "B002" }, "waterResources": [ { "waterResourcesMetadata": { "dataOwnerCode": "G50504", "dataOwnerName": "Electricity Generating Authority of Thailand", "waterResourcesCode": "G50504-21-9503-1-00001", "waterResourcesName": "เขื่อนบางลาง", "waterResourcesSize": "L", "capacity": 1454.36, "deadStorage": 83, "maximumLevel": 117.5, "locationCode": "950302", "latitude": 6.155155, "longitude": 101.272207, "watershedArea": 2080, "spillwayCrest": 98, "spillwayRate": 4500, "elevationAreaCapacity": [ [65, 7, 57], [73, 11.4, 111.9], [83, 20.26, 260], [90, 26.7, 402.22], [95, 31.3, 549.3], [100, 35.87, 705.59], [105, 40.43, 906.34], [110, 45, 1164.2], [115, 50.9, 1403.8] ] }, "lastUpdateTime": "2022-01-02T23:09:00" } ] }