-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathapiary.apib
479 lines (413 loc) · 20.9 KB
/
apiary.apib
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
FORMAT: 1A
HOST: https://swe-endangered-animals.appspot.com
# Endangered Animals
## All Animals [/all_animal_data]
### GET: /all_animal_data [GET]
Retrieves data for all animals.
This endpoint basically calls /single_animal_data on each animal.
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/all_animal_data`
+ Response 200 (application/json)
+ Body
[
{
"common_name": "Semi-collared Hawk",
"scientific_name": "Accipiter collaris",
"vulnerability_status":"vulnerable",
"citation":"Campbell, J. 2007. Abronia oaxacae. The IUCN Red List of Threatened Species 2007: e.T63685A12697055. http://dx.doi.org/10.2305/IUCN.UK.2007.RLTS.T63685A12697055.en",
"conservation_measure": "Resource & habitat protection",
"video_url": "https://www.youtube.com/watch?v=vy2RKH2v5_E",
"imageLink": "http://faculty.ucr.edu/~chappell/INW/birds3raptors/semicollaredhawk019.jpg",
"webLink": "http://apiv3.iucnredlist.org/api/v3/website/Accipiter collaris",
"assoc_habitats":[
"Forest - Subtropical/Tropical Moist Montane"
],
"assoc_threats":[
"Annual & perennial non-timber crops",
"Agro-industry farming",
"Livestock farming & ranching",
"Agro-industry grazing, ranching or farming",
"Work & other activities"
],
"assoc_countries": [
"Colombia",
"Ecuador",
"Peru",
"Venezuela, Bolivarian Republic of"
]
},
{
"common_name": "Reid's Arboreal Alligator Lizard",
"scientific_name": "Abronia reidi",
"vulnerability_status":"Data Deficient",
"citation":"Flores-Villela, O. & Lopez-Luna, M.A. 2007. Abronia reidi. The IUCN Red List of Threatened Species 2007: e.T63689A12697921. http://dx.doi.org/10.2305/IUCN.UK.2007.RLTS.T63689A12697921.en",
"conservation_measure": "Site/area management",
"video_url": "https://www.youtube.com/watch?v=cUgHxoI3mFk",
"imageLink": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Arboreal_Alligator_Lizard_Abronia_graminea_2900px.jpg/1200px-Arboreal_Alligator_Lizard_Abronia_graminea_2900px.jpg",
"webLink": "http://apiv3.iucnredlist.org/api/v3/website/Abronia reidi",
"assoc_habitats":[
"Forest - Subtropical/Tropical Moist Montane"
],
"assoc_threats":[
"Annual & perennial non-timber crops",
"Small-holder farming",
"Logging & wood harvesting",
"Motivation Unknown/Unrecorded"
],
"assoc_countries": [
"Mexico"
]
}
]
## Animal [/single_animal_data/]
### GET: /single_animal_data/?animal_name [GET]
Retrieves data for an animal: common name, scientific name, image, video, vulnerability, conservation measures, citation link, associated habitats/threats/countries.
Example: Let's say you want to find data on "Semi-collared Hawk"
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/single_animal_data?animal_name=Semi-collared Hawk`
+ Response 200 (application/json)
+ Body
{
"common_name": "Semi-collared Hawk",
"scientific_name": "Accipiter collaris",
"vulnerability_status":"vulnerable",
"citation":"Campbell, J. 2007. Abronia oaxacae. The IUCN Red List of Threatened Species 2007: e.T63685A12697055. http://dx.doi.org/10.2305/IUCN.UK.2007.RLTS.T63685A12697055.en",
"conservation_measure": "Resource & habitat protection",
"video_url": "https://www.youtube.com/watch?v=vy2RKH2v5_E",
"imageLink": "http://faculty.ucr.edu/~chappell/INW/birds3raptors/semicollaredhawk019.jpg",
"webLink": "http://apiv3.iucnredlist.org/api/v3/website/Accipiter collaris",
"assoc_habitats":[
"Forest - Subtropical/Tropical Moist Montane"
],
"assoc_threats":[
"Annual & perennial non-timber crops",
"Agro-industry farming",
"Livestock farming & ranching",
"Agro-industry grazing, ranching or farming",
"Work & other activities"
],
"assoc_countries": [
"Colombia",
"Ecuador",
"Peru",
"Venezuela, Bolivarian Republic of"
]
}
## All Threats [/all_threat_data]
### GET: /all_threat_data [GET]
Retrieves data for all threats.
This endpoint basically calls /single_threat_data on each threat.
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/all_threat_data`
+ Response 200 (application/json)
+ Body
[
{
"name": "Agro-industry farming",
"image": "http://www.blog.kpmgafrica.com/wp-content/uploads/2013/04/watering_field.jpg",
"timing": "ongoing",
"severity": "4.5",
"assoc_animals": [
"Desert Lidless Skink",
"Chaco Side-necked Turtle",
"Two-streaked Snake-eyed Skink",
"Be’er Sheva Fringe-fingered Lizard",
"Semi-collared Hawk",
"Oaxaca Arboreal Alligator Lizard",
"Long-faced Loach",
"Wattled Guan",
"Terrestrial Arboreal Alligator Lizard",
"Nicobar Sparrowhawk",
"Brown Pricklenape"
],
"assoc_habitats": [
"Wetlands (inland) - Shrub Dominated Wetlands",
"Wetlands (inland) - Permanent Rivers/Streams/Creeks (includes waterfalls)",
"Forest - Temperate",
"Grassland - Temperate",
"Forest - Subtropical/Tropical Moist Lowland",
"Desert - Temperate",
"Artificial/Aquatic - Ponds (below 8ha)",
"Shrubland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Rural Gardens",
"Wetlands (inland) - Seasonal/Intermittent Freshwater Marshes/Pools (under 8ha)",
"Forest - Subtropical/Tropical Moist Montane",
"Artificial/Terrestrial - Subtropical/Tropical Heavily Degraded Former Forest",
"Wetlands (inland) - Freshwater Springs and Oases",
"Artificial/Terrestrial - Plantations",
"Shrubland - Temperate",
"Grassland - Subtropical/Tropical Seasonally Wet/Flooded"
]
},
{
"name": "Problematic native species/diseases",
"image": "http://weedcontrolfreaks.com/wp-content/uploads/2013/07/Wheat_Beans.jpg",
"timing": "ongoing",
"severity": "4.5",
"assoc_animals": [
"Chaco Side-necked Turtle",
"Be’er Sheva Fringe-fingered Lizard",
"Blanc's Fringe-toed Lizard"
],
"assoc_habitats": [
"Wetlands (inland) - Shrub Dominated Wetlands",
"Forest - Temperate",
"Artificial/Aquatic - Ponds (below 8ha)",
"Shrubland - Subtropical/Tropical Dry",
"Wetlands (inland) - Seasonal/Intermittent Freshwater Marshes/Pools (under 8ha)",
"Artificial/Terrestrial - Plantations",
"Shrubland - Mediterranean-type Shrubby Vegetation",
"Marine Coastal/Supratidal - Coastal Sand Dunes",
"Grassland - Subtropical/Tropical Seasonally Wet/Flooded"
]
}
]
## Threat [/single_threat_data/]
### GET: /single_threat_data/?threat_name [GET]
Retrieves data for a specific threat: name, image, timing, severity, associated animals/habitats.
Example: Let's say you want to find data on "Agro-industry farming"
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/single_threat_data?threat_name=Agro-industry farming`
+ Response 200 (application/json)
+ Body
{
"name": "Agro-industry farming",
"image": "http://www.blog.kpmgafrica.com/wp-content/uploads/2013/04/watering_field.jpg",
"timing": "ongoing",
"severity": "4.5",
"assoc_animals": [
"Desert Lidless Skink",
"Chaco Side-necked Turtle",
"Two-streaked Snake-eyed Skink",
"Be’er Sheva Fringe-fingered Lizard",
"Semi-collared Hawk",
"Oaxaca Arboreal Alligator Lizard",
"Long-faced Loach",
"Wattled Guan",
"Terrestrial Arboreal Alligator Lizard",
"Nicobar Sparrowhawk",
"Brown Pricklenape"
],
"assoc_habitats": [
"Wetlands (inland) - Shrub Dominated Wetlands",
"Wetlands (inland) - Permanent Rivers/Streams/Creeks (includes waterfalls)",
"Forest - Temperate",
"Grassland - Temperate",
"Forest - Subtropical/Tropical Moist Lowland",
"Desert - Temperate",
"Artificial/Aquatic - Ponds (below 8ha)",
"Shrubland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Rural Gardens",
"Wetlands (inland) - Seasonal/Intermittent Freshwater Marshes/Pools (under 8ha)",
"Forest - Subtropical/Tropical Moist Montane",
"Artificial/Terrestrial - Subtropical/Tropical Heavily Degraded Former Forest",
"Wetlands (inland) - Freshwater Springs and Oases",
"Artificial/Terrestrial - Plantations",
"Shrubland - Temperate",
"Grassland - Subtropical/Tropical Seasonally Wet/Flooded"
]
}
## All Habitats [/all_habitat_data]
### GET: /all_habitat_data [GET]
Retrieves data for all habitats.
This endpoint basically calls /single_habitat_data on each habitat.
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/all_habitat_data`
+ Response 200 (application/json)
+ Body
[
{
"name": "Artificial/Aquatic - Ponds (below 8ha)",
"image": "http://thumb1.shutterstock.com/display_pic_with_logo/1771478/323878760/stock-photo-small-artificial-decorative-pond-with-rocks-and-plants-on-the-backyard-in-summer-323878760.jpg",
"suitability": "Suitable",
"assoc_animals": [
"Chaco Side-necked Turtle"
],
"assoc_countries": [
"Paraguay",
"Argentina",
"Bolivia, Plurinational States of"
],
"assoc_threats": [
"Temperature extremes",
"Livestock farming & ranching",
"Problematic native species/diseases",
"Intentional use: (subsistence/small scale) [harvest]",
"Droughts",
"Agro-industry grazing, ranching or farming",
"Fishing & harvesting aquatic resources",
"Agro-industry farming",
"Annual & perennial non-timber crops"
]
},
{
"name": "Wetlands (inland) - Permanent Freshwater Lakes (over 8ha)",
"image": "https://i.pinimg.com/736x/8e/02/bf/8e02bf33325bbdc7efd4692c6d5c55b3--freshwater-fish-be-free.jpg",
"suitability": "Suitable",
"assoc_animals": [
"Caucasian Bream",
"Damascus Bream",
"Long-spine Bream",
"Jordan Bream"
],
"assoc_countries": [
"Turkey",
"Israel",
"Georgia",
"Iran, Islamic Republic of",
"Azerbaijan",
"Syrian Arab Republic",
"Jordan",
"Armenia",
"Palestinian Territory, Occupied"
],
"assoc_threats": [
"Large dams",
"Abstraction of surface water (domestic use)",
"Abstraction of ground water (domestic use)",
"Droughts",
"Abstraction of surface water (agricultural use)",
"Sewage",
"Abstraction of ground water (agricultural use)",
"Dams & water management/use",
"Small dams",
"Domestic & urban waste water"
]
}
]
## Habitat [/single_habitat_data/]
### GET: /single_habitat_data/?habitat_name [GET]
Retrieves data for a given habitat: name, image, suitability, associated animals/threats.
Example: Let's say you want to find data on the habitat "Artificial/Aquatic - Ponds (below 8ha)"
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/single_habitat_data/?habitat_name=Artificial/Aquatic - Ponds (below 8ha)`
+ Response 200 (application/json)
+ Body
{
"name": "Artificial/Aquatic - Ponds (below 8ha)",
"image": "http://thumb1.shutterstock.com/display_pic_with_logo/1771478/323878760/stock-photo-small-artificial-decorative-pond-with-rocks-and-plants-on-the-backyard-in-summer-323878760.jpg",
"suitability": "Suitable",
"assoc_animals": [
"Chaco Side-necked Turtle"
],
"assoc_countries": [
"Paraguay",
"Argentina",
"Bolivia, Plurinational States of"
],
"assoc_threats": [
"Temperature extremes",
"Livestock farming & ranching",
"Problematic native species/diseases",
"Intentional use: (subsistence/small scale) [harvest]",
"Droughts",
"Agro-industry grazing, ranching or farming",
"Fishing & harvesting aquatic resources",
"Agro-industry farming",
"Annual & perennial non-timber crops"
]
}
## All Countries [/all_country_data]
### GET: /all_country_data [GET]
Retrieves data for all countries.
This endpoint basically calls /single_country_data on each country.
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/all_country_data`
+ Response 200 (application/json)
+ Body
[
{
"name": "Azerbaijan",
"flag": "http://cdn.wonderfulengineering.com/wp-content/uploads/2015/07/azerbaijan-flag-13.png",
"coordinate": "lat: 40.143105 lng: 47.576927",
"assoc_animals": [
"Northern Goshawk",
"Two-streaked Snake-eyed Skink",
"Caucasian Bream",
"Levant Sparrowhawk",
"Shikra",
"Redpoll"
],
"assoc_habitats": [
"Forest - Boreal",
"Artificial/Terrestrial - Urban Areas",
"Wetlands (inland) - Permanent Rivers/Streams/Creeks (includes waterfalls)",
"Savanna - Dry",
"Forest - Temperate",
"Grassland - Temperate",
"Forest - Subtropical/Tropical Moist Lowland",
"Shrubland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Rural Gardens",
"Wetlands (inland) - Permanent Freshwater Marshes/Pools (under 8ha)",
"Grassland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Plantations",
"Shrubland - Mediterranean-type Shrubby Vegetation",
"Wetlands (inland) - Permanent Freshwater Lakes (over 8ha)",
"Grassland - Tundra",
"Shrubland - Temperate"
]
},
{
"name": "Bhutan",
"flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Flag_of_Bhutan.svg/2000px-Flag_of_Bhutan.svg.png",
"coordinate": "lat: 27.514162 lng: 90.433601",
"assoc_animals": [
"Shikra",
"Striped Loach",
"Northern Goshawk"
],
"assoc_habitats": [
"Forest - Boreal",
"Artificial/Terrestrial - Urban Areas",
"Wetlands (inland) - Permanent Rivers/Streams/Creeks (includes waterfalls)",
"Savanna - Dry",
"Forest - Temperate",
"Grassland - Temperate",
"Forest - Subtropical/Tropical Moist Lowland",
"Shrubland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Rural Gardens",
"Grassland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Plantations",
"Grassland - Tundra"
]
}
]
## Country [/single_country_data/]
### GET: /single_country_data/?country_name [GET]
Retrieves data for a specific country: name, flag, coordinates, associated animals/habitats.
Example: Let's say you want to find data on "Azerbaijan"
**HTTP Request:**
`https://swe-endangered-animals.appspot.com/single_country_data/?country_name=Azerbaijan`
+ Response 200 (application/json)
+ Body
{
"name": "Azerbaijan",
"flag": "http://cdn.wonderfulengineering.com/wp-content/uploads/2015/07/azerbaijan-flag-13.png",
"coordinate": "lat: 40.143105 lng: 47.576927",
"assoc_animals": [
"Northern Goshawk",
"Two-streaked Snake-eyed Skink",
"Caucasian Bream",
"Levant Sparrowhawk",
"Shikra",
"Redpoll"
],
"assoc_habitats": [
"Forest - Boreal",
"Artificial/Terrestrial - Urban Areas",
"Wetlands (inland) - Permanent Rivers/Streams/Creeks (includes waterfalls)",
"Savanna - Dry",
"Forest - Temperate",
"Grassland - Temperate",
"Forest - Subtropical/Tropical Moist Lowland",
"Shrubland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Rural Gardens",
"Wetlands (inland) - Permanent Freshwater Marshes/Pools (under 8ha)",
"Grassland - Subtropical/Tropical Dry",
"Artificial/Terrestrial - Plantations",
"Shrubland - Mediterranean-type Shrubby Vegetation",
"Wetlands (inland) - Permanent Freshwater Lakes (over 8ha)",
"Grassland - Tundra",
"Shrubland - Temperate"
]
}