-
Notifications
You must be signed in to change notification settings - Fork 8
/
api_v1.json
129 lines (129 loc) · 4.98 KB
/
api_v1.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"endpoints": [
{
"name": "data/api/v1/reports",
"methods": [
{
"MethodName": "confirmed",
"Synopsis": "Get confirmed flood reports from the last hour in point form",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/reports/confirmed",
"RequiresOAuth": "N",
"parameters": [
{
"Name": "format",
"Description": "Defines the format of the requested reports data as either geojson (default) or topojson. If unspecified will default to geojson.",
"Required": "N",
"Default": "geojson",
"Type": "enumerated",
"EnumeratedList": "[\"geojson\",\"topojson\"]"
}
]
},
{
"MethodName": "unconfirmed",
"Synopsis": "Get unconfirmed flood reports from the last hour in point form",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/reports/unconfirmed",
"parameters": [
{
"Name": "format",
"Description": "Defines the format of the requested reports data as either geojson (default) or topojson. If unspecified will default to geojson.",
"Required": "N",
"Default": "geojson",
"Type": "enumerated",
"EnumeratedList": "[\"geojson\",\"topojson\"]"
}
]
}
]
},
{
"name": "/data/api/v1/aggregates",
"methods": [
{
"MethodName": "live",
"Synopsis": "Get a real-time count of flood reports from the past hour",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/aggregates/live",
"RequiresOAuth": "N",
"parameters": [
{
"Name": "format",
"Description": "Defines the format of the requested reports data as either geojson (default) or topojson. If unspecified will default to geojson.",
"Required": "N",
"Default": "geojson",
"Type": "enumerated",
"EnumeratedList": "[\"geojson\",\"topojson\"]"
},
{
"Name": "level",
"Description": "Specifies area for the counts (e.g. country, state, city etc.). If unspecified defaults to Jakarta \"subdistrict\" level.",
"Required": "N",
"Default": "subdistrict",
"Type": "enumerated",
"EnumeratedList": "[\"subdistrict\",\"village\",\"rw\"]"
},
{
"Name": "hours",
"Description": "Specifies the duration of the count, hours={1|3|6}. If unspecified defaults to past 1 hour.",
"Required": "N",
"Default": "1",
"Type": "enumerated",
"EnumeratedList": "[1,3,6]"
}
]
},
{
"MethodName": "archive",
"Synopsis": "Access historical counts of flood reports per area in 6 hour blocks",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/aggregates/archive",
"RequiresOAuth": "N",
"parameters": [
{
"Name": "start_time",
"Description": "The date and time of the start of the aggregate period as an ISO8601 string, representing a time from 1970-01-01T00:00:00Z until now. Note that basic form cannot be used and extended form (with hyphens and colons) must be used.",
"Required": "N",
"Default": "6 hours prior to the time of request"
"Type": "ISO8601 String"
},
{
"Name": "blocks",
"Description": "The number of 1-hour blocks to return, starting at 'start_time'.",
"Required": "N",
"Default": "6"
"Type": "integer"
}
]
}
]
},
{
"name": "/data/api/v1/infrastructure",
"methods": [
{
"MethodName": "floodgates",
"Synopsis": "Floodgates in Jakarta represented by point geometry",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/infrastructure/floodgates",
"RequiresOAuth": "N"
},
{
"MethodName": "pumps",
"Synopsis": "Pump stations in Jakarta represented by point geometry",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/infrastructure/pumps",
"RequiresOAuth": "N"
},
{
"MethodName": "waterways",
"Synopsis": "Rivers and canals in Jakarta represented by line geometry",
"HTTPMethod": "GET",
"URI": "http://petajakarta.org/banjir/data/api/v1/infrastructure/waterways",
"RequiresOAuth": "N"
}
]
}
]
}