South African Bird Atlas Project 2

API documentation V2

Contents:

  1. Species data:
  2. Getting SABAP2 species distribution data
  3. Species monthly summary data
  4. Selected species card data
  5. Coverage data:
  6. Card functions: Read a single cards data

Function: API call: Extract RAW data with search parameters

Type:

Simple

Call:

http://api.adu.org.za/sabap2/v2/:type/(:startdate)/(:enddate)(/:region_type/region_id)(/:returntype)(/:filtertype/:filter)?format=CSV

NOTE: There are 2 output options for this call. Both use the same search options

1.

http://api.adu.org.za/sabap2/v2/DwC/2007-01-01/2019-01-01/country/kenya/count?format=CSV

This call outputs Darwin core compliant data sharing format. This format does not allow for all the fields to be output contextually. This is designed for data sharing between Darwin Core based systems

2.

http://api.adu.org.za/sabap2/v2/R/2007-01-01/2019-01-01/country/kenya/count?format=CSV

This call outputs system format data. This allows the use of fields not available in the Darwin core standard, allowing the data to be analyzed contextually.

Parameters:

Type (REQUIRED): DwC or R

Dates (REQUIRED) startdate and enddate : format: yyyy-mm-dd (default startdate = ‘2007-07-01’, enddate=’2019-06-01’)

Regional switches (REQUIRED and must be used together)

NOTE: region_id has no spaces in the names region_type : country / group / pentad / qdgc region_id : country short name/pentad code/qdgc code

(OPTIONAL) If you use filtertype “species” or “observer”, then you must specify the filter list filtertype : One of the following: all / species / observers (default = “all”) filter : &first=xxx (The first record in the batch. This is for large datasets that need to be broken up to download in parts. Each part will a MAX OF 250 00 records will be returned. If there are less than 25000 records in your request, there is no need to supply this

(OPTIONAL) : {comma separate value list of species number or observer numbers}

(OPTIONAL) format : ?format=CSV (default is a JSON object with the data)

(OPTIONAL) first :?first=25000

Best practice:

First find out how many records in the complete dataset: http://api.adu.org.za/sabap2/v2/R/2007-01-01/2019-01-01/country/kenya/count?format=CSV http://api.adu.org.za/sabap2/v2/R/2007-01-01/2019-01-01/country/kenya/count/species/123,316,622?format=CSV

Then pull the dataset, it is up to the users to calculate the pagination. Page =25000 records:

http://api.adu.org.za/sabap2/v2/R/2014-01-01/2019-01-01/country/kenya/data/species/123,316,622?format=CSV http://api.adu.org.za/sabap2/v2/R/2014-01-01/2019-01-01/country/kenya/data/observers/73,20001,10573?format=CSV A fully formed data request for all south Africa with pagination: http://api.adu.org.za/sabap2/v2/R/2007-01-01/2019-06-01/country/southafrica/data http://api.adu.org.za/sabap2/v2/R/2007-01-01/2019-06-01/country/southafrica/data?first=25000 Usage: 1. Sample API (DwC format): http://api.adu.org.za/sabap2/v2/DwC/2014-01-01/2019-01-01/country/kenya/data/species/123,316,622?format=CSV Returns: Returns a JSON object with taxa record(s)

    	 { "meta": { "ip":
                "137.158.55.110", "call":
                "http:\/\/api.adu.org.za\/sabap2\/v2\/DwC\/2007-01-01\/2019-01-01\/country\/kenya\/data\/species\/123,316,1172",
                "call_date": "1569401725", "verbatum date": "2019-09-25 10:55:25",
                "referer_url": null, "copyright": { "author": "Michael Brooks", "email":
                "michael.brooks@uct.ac.za", "web":
                "http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
                Institute of African Ornithology, University of Cape Town", "license":
                "MIT", "date": "2019-09-25 10:9" } }, "status": { "result": "success",
                "comment": "User does have permissions to view this data", "records":
                2012 }, "data": [ { "institutionCode": "FIAO", "collectionCode":
                "BirdMap", "datasetName": "BirdMap: country-kenya-20190925",
                "basisOfRecord": "HumanObservation", "catalogNumber":
                "urn:fiao:sabap2:fullprot:rid10009248", "year": "2017", "month": "6",
                "day": "25", "verbatimEventDate": "2017-06-25", "collectedBy": "KamauG",
                "locus": null, "verbatimLocality": "0125_3520", "decimalLongitude":
                "35.37458333", "decimalLatitude": "-1.457916667", "stateProvince":
                "Kenya", "country": "Kenya", "continent": "Africa", "recordedBy":
                "KamauG", "ResourceRelationship": "0125_3520_040012_20170625",
                "occuranceNotes": "TotalHour observing:5 Included nights: 0 All habitats
                covered: 1", "kingdom": "Animalia", "phylum": "Chordata", "class":
                "Aves", "order": "Columbiformes", "family": "Columbidae", "genus":
                "Streptopelia", "specificEpithet": "capicola", "observationNotes":
                "Observation sequence: 14" },… 
    	
    
2. Sample API (R CRAN): http://api.adu.org.za/sabap2/v2/R/2014-01-01/2019-01-01/country/kenya/data/species/123,316,622?format=CSV Returns: Returns a JSON object with taxa record(s)
{ "meta": { "ip":
"137.158.55.110", "call":
"http:\/\/api.adu.org.za\/sabap2\/v2\/R\/2014-01-01\/2019-01-01\/country\/southafrica\/data\/species\/123",
"call_date": "1569398881", "verbatum date": "2019-09-25 10:08:01",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2019-09-25 10:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this data", "records":
10385 }, "data": { "pentads": [ { "CardNo": "1800-3300_001449_20150411",
"StartDate": "2015-04-11", "EndDate": "2015-04-11", "StartTime":
"07:30", "Pentad": "3300_1800", "ObserverNo": "1449", "ObserverName":
"Mr D. Large", "TotalHours": "3", "Hour1": "24", "Hour2": "45", "Hour3":
"55", "Hour4": "0", "Hour5": "0", "Hour6": "0", "Hour7": "0", "Hour8":
"0", "Hour9": "0", "Hour10": "0", "TotalSpp": "9", "InclNight": "0",
"AllHabitats": "0", "Spp": "123", "Common_group": "Kestrel",
"Common_species": "Rock", "Genus": "Falco", "Species": "rupicolus",
"Sequence": "30" },… 
Function: API call: Search for species with reference number Type: Simple Parameters: search term - optional; string; any part of the common name or taxonomic name Sample API calls: http://api.adu.org.za/sabap2/v2/search/species/123 http://api.adu.org.za/sabap2/v2/search/species/kestrel http://api.adu.org.za/sabap2/v2/search/species/falco Usage: Sample API calls: http://api.adu.org.za/sabap2/v2/search/species/123 or http://api.adu.org.za/sabap2/v2/search/species/kestrel or http://api.adu.org.za/sabap2/v2/search/species/falco Returns: Returns a JSON object with taxa record(s)
{ "meta": { "ip": "195.70.48.55",
"call": "http:\/\/api.adu.org.za\/sabap2\/v2\/search\/species\/kestrel",
"call_date": "1537952786", "verbatum date": "2018-09-26 11:06:26",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2018-09-26 11:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this card", "records": 13
}, "data": [ { "Spp": "2150", "Common_group": "Kestrel",
"Common_species": "Alexander's", "Genus": "Falco", "Species":
"alexandri", "Family": "Falconidae", "Order": "Falconiformes" },.... {
"Spp": "1082", "Common_group": "Kestrel", "Common_species":
"Seychelles", "Genus": "Falco", "Species": "araea", "Family":
"Falconidae", "Order": "Falconiformes" } ] }

Function: API call: Species distribution summary: SABAP2 data

Type:

Complex - multiple options for output

Call:

http://api.adu.org.za/sabap2/v2/summary/species/:spp

Parameters:

species - required; integer; the species reference number

type - optional; string; options: country, province, group, pentad

id - optional, required if type is used; name of type, no spaces.

ie: /country/southafrica; /province/kwazulu-natal; /pentad/3355_1825

Format option: default: JSON options: ?format=geoJSON

Sample API call:

http://api.adu.org.za/sabap2/v2/summary/species/123

http://api.adu.org.za/sabap2/v2/summary/species/123?format=geoJSON

Usage:

Usage 1: Species code only

http://api.adu.org.za/sabap2/v2/summary/species/:spp

ie:

http://api.adu.org.za/sabap2/v2/summary/species/123

Returns: Returns a JSON object with pentad summary for the distribution(s)

	 { "meta": {
	"ip": "137.158.54.235", "call":
	"http:\/\/api.adu.org.za\/sabap2\/v2\/summary\/species\/123",
	"call_date": "1537953039", "verbatum date": "2018-09-26 11:10:39",
	"referer_url": null, "copyright": { "author": "Michael Brooks",
	"email": "michael.brooks@uct.ac.za", "web":
	"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
	Institute of African Ornithology, University of Cape Town", "license":
	"MIT", "date": "2018-09-26 11:9" } }, "status": { "result": "success",
	"comment": "User does have permissions to view this card", "records":
	19491 }, "species": [ { "Spp": "123", "Common_group": "Kestrel",
	"Common_species": "Rock", "Genus": "Falco", "Species": "rupicolus" } ],
	"data": { "full": [ { "pentad": "3350_2215", "top": "-33.83333333",
	"left": "22.25", "bottom": "-33.91663333", "right": "22.3333",
	"country": "South Africa", "cards": "6", "records": null, "first_card":
	"2009", "first_sighting": "0", "sighted_years": "0", "diff": "0",
	"reporting_rate": "0.0000", "jan": "0.0000", "feb": "0.0000", "mar":
	"0.0000", "apr": "0.0000", "may": "0.0000", "jun": "0.0000", "jul":
	"0.0000", "aug": "0.0000", "sep": "0.0000", "oct": "0.0000", "nov":
	"0.0000", "dec": "0.0000", "index": "0.0000" }, { "pentad":
	"3435_2015", "top": "-34.58333333", "left": "20.25", "bottom":
	"-34.66663333", "right": "20.3333", "country": "South Africa", "cards":
	"4", "records": "2", "first_card": "2012", "first_sighting": "2012",
	"sighted_years": "2", "diff": "0", "reporting_rate": "50.0000", "jan":
	"0.0000", "feb": "0.0000", "mar": "0.0000", "apr": "0.0000", "may":
	"0.0000", "jun": "0.0000", "jul": "100.0000", "aug": "0.0000", "sep":
	"0.0000", "oct": "0.0000", "nov": "0.0000", "dec": "0.0000", "index":
	"-1.0000" } ], "adhoc": [ { "pentad": "3425_2030", "top":
	"-34.41666667", "left": "20.5", "bottom": "-34.49996667", "right":
	"20.5833", "country": "South Africa", "cards": "13", "records": "2" },
	{ "pentad": "3425_2040", "top": "-34.41666667", "left": "20.66666667",
	"bottom": "-34.49996667", "right": "20.74996667", "country": "South
	Africa", "cards": "1", "records": null } ], "incid": [ { "Pentad":
	"0730c0540", "country": "Nigeria", "top": "7.5", "left": "5.6667",
	"bottom": "7.583337", "right": "5.5834", "records": "1" }, { "Pentad":
	"1700_1310", "country": "Namibia", "top": "-17", "left": "13.16666667",
	"bottom": "-17.0833", "right": "13.24996667", "records": "5" } ],
	"addinfo": [ { "pentad": "1710_1210", "country": "Namibia", "top":
	"-17.16666667", "left": "12.16666667", "bottom": "-17.24996667",
	"right": "12.24996667", "records": "1" }, { "pentad": "1945_1355",
	"country": "Namibia", "top": "-19.75", "left": "13.91666667", "bottom":
	"-19.8333", "right": "13.99996667", "records": "1" } ] } } 
	

Usage 2: Species, type and id

http://api.adu.org.za/sabap2/v2/summary/species/:spp/:type/:id

ie:

http://api.adu.org.za/sabap2/v2/summary/species/123/province/westerncape

http://api.adu.org.za/sabap2/v2/summary/species/123/pentad/3355_1825

Returns: Same as above, restricted to are of group, in the above example - only records for the Western Cape

Usage 3: Species, type and id with ?format=geoJSON

http://api.adu.org.za/sabap2/v2/summary/species/:spp/:type/:id?format=geoJSON

ie:

http://api.adu.org.za/sabap2/v2/summary/species/123/province/westerncape?format=geoJSON

Returns:

	 { "type": "FeatureCollection", "name": "Species Distribution:
	Kestrel, Rock", "crs": { "type": "name", "properties": { "name":
	"urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature",
	"properties": { "pentad": "0730c0540", "full protocol": 100.0000, "full
	protocol cards": 1, "full protocol first card": 2016, "full protocol
	first sighting": 2016, "full protocol time difference": 0, "full
	protocol index": -1.0000, "adhoc protocol": 0, "incidental": 1,
	"additional information": 0, "january": 0.0000, "february": 0.0000,
	"march": 0.0000, "april": 0.0000, "may": 0.0000, "june": 0.0000,
	"july": 0.0000, "august": 0.0000, "september": 0.0000, "october":
	0.0000, "november": 0.0000, "december": 100.0000 }, "geometry": {
	"type": "MultiPolygon", "coordinates": [ [ [ [ 5.6667, 7.5 ], [ 5.5834,
	7.5 ], [ 5.5834, 7.583337 ], [ 5.6667, 7.583337 ], [ 5.6667, 7.5 ] ] ]
	] } }, { "type": "Feature", "properties": { "pentad": "1655_1315",
	"full protocol": 16.6667, "full protocol cards": 6, "full protocol
	first card": 2013, "full protocol first sighting": 2017, "full protocol
	time difference": 4, "full protocol index": 0.5000, "adhoc protocol":
	0, "incidental": 0, "additional information": 0, "january": 0.0000,
	"february": 0.0000, "march": 0.0000, "april": 0.0000, "may": 0.0000,
	"june": 0.0000, "july": 0.0000, "august": 33.3333, "september": 0.0000,
	"october": 0.0000, "november": 0.0000, "december": 0.0000 },
	"geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 13.25,
	-16.91666667 ], [ 13.3333, -16.91666667 ], [ 13.3333, -16.99996667 ], [
	13.25, -16.99996667 ], [ 13.25, -16.91666667 ] ] ] ] } } ] } 

Function: API call: Species occurrence by Year and month for each pentad where data has been collected (Full protocol only) Type: Simple

Parameters: species - required; integer; the species reference number

Sample API calls:

http://api.adu.org.za/sabap2/v2/summary/species/monthly/123 Usage:

Sample API calls:

http://api.adu.org.za/sabap2/v2/summary/species/monthly/123

Dictionary: "country": Country, "pentad": pentad code, "yr": Year (int as String), "mn": month (int as string), "cards": Number of cards for the pentad, "records": Number of cards on which the species occurs, "reprate": Reporting rate for the pentad, "Usage": "Present" or "Absent" - species present or absent

Returns: Returns a JSON object with record(s)

{
"meta": { "ip": "137.158.54.235", "call":
"http:\/\/api.adu.org.za\/sabap2\/v2\/summary\/species\/monthly\/123",
"call_date": "1537954918", "verbatum date": "2018-09-26 11:41:58",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2018-09-26 11:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this card", "records":
138235 }, "data": [{ "country": "South Africa", "pentad": "2520_2835",
"yr": "2018", "mn": "2", "cards": "1", "records": "1", "reprate":
"100.0000", "Usage": "Present" }, { "country": "South Africa", "pentad":
"2520_2900", "yr": "2018", "mn": "2", "cards": "5", "records": "0",
"reprate ": "0.0000", "Usage": "Absent" } ]} 

Function: API call: Project

coverage to date, pentad scale

Type: Complex

Parameters:

type -optional; string; options: country, province, group, pentad

id -optional, required if type is used; name of type, no spaces. ie: /country/southafrica /province/kwazulu-natal /pentad/3355_1825

Format option: default: JSON options: ?format=geoJSON ?format=csv

Sample API calls:

http://api.adu.org.za/sabap2/v2/coverage

http://api.adu.org.za/sabap2/v2/coverage/0/0?format=csv

http://api.adu.org.za/sabap2/v2/coverage/0/0?format=geoJSON

http://api.adu.org.za/sabap2/v2/coverage/group/BBD

http://api.adu.org.za/sabap2/v2/coverage/province/westerncape

http://api.adu.org.za/sabap2/v2/coverage/country/southafrica

http://api.adu.org.za/sabap2/v2/coverage/group/GKNP

http://api.adu.org.za/sabap2/v2/coverage/pentad/3355_1825 Usage: Usage

1: Full summary for area of interest: type options: country, province, group, pentad http://api.adu.org.za/sabap2/v2/coverage/:type/:id

Sample API calls:

http://api.adu.org.za/sabap2/v2/coverage/group/BBD

Returns: (default) Returns a JSON object with record(s) (default)

{ "meta": {
"ip": "137.158.54.235", "call":
"http:\/\/api.adu.org.za\/sabap2\/v2\/coverage\/pentad\/3355_1825",
"call_date": "1537957521", "verbatum date": "2018-09-26 12:25:21",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2018-09-26 12:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this card", "records": 1
}, "data": { "coverage_summary": { "All Years": { "Yr": "All Years",
"has_none": "0", "has_one": "0", "has_two": "0", "has_three": "0",
"has_four": "1", "total_pentads": "1", "total": "1", "cards": "788",
"species": "209" }, "2007": { "Yr": "2007", "has_none": "0", "has_one":
"0", "has_two": "0", "has_three": "1", "has_four": "0", "total_pentads":
"1", "total": "1", "cards": "3", "species": "34" }, "2018": { "Yr":
"2018", "has_none": "0", "has_one": "0", "has_two": "0", "has_three":
"0", "has_four": "1", "total_pentads": "1", "total": "1", "cards": "46",
"species": "149" } }, "full": [ { "pentad": "3355_1825", "top":
"-33.91667", "left": "18.41667", "bottom": "-33.99997", "right":
"18.49997", "2007": "3", "2008": "26", "2009": "50", "2010": "52",
"2011": "60", "2012": "41", "2013": "59", "2014": "87", "2015": "136",
"2016": "106", "2017": "122", "2018": "46", "cards": "788" } ], "adhoc":
[ { "pentad": "3355_1825", "top": "-33.91667", "left": "18.41667",
"bottom": "-33.99997", "right": "18.49997", "cards": "262" } ], "incid":
[ { "Pentad": "3355_1825", "top": "-33.91667", "left": "18.41667",
"bottom": "-33.99997", "right": "18.49997", "records": "11653" } ],
"addinfo": [ { "pentad": "3355_1825", "top": "-33.91667", "left":
"18.41667", "bottom": "-33.99997", "right": "18.49997", "records": "282"
} ], "cards": [ { "CardNo": "3355_1825a016988a20180924", "StartDate":
"2018-09-24", "EndDate": "2018-09-24", "StartTime": "14:32:36",
"Pentad": "3355_1825", "ObserverNo": "16988", "TotalHours": "1",
"Hour1": "19", "Hour2": "0", "Hour3": "0", "Hour4": "0", "Hour5": "0",
"Hour6": "0", "Hour7": "0", "Hour8": "0", "Hour9": "0", "Hour10": "0",
"TotalSpp": "19", "InclNight": "0", "AllHabitats": "0", "top":
"-33.91666667", "bottom": "-33.99996667", "right": "18.49996667",
"left": "18.41666667", "yr": "2018", "mnth": "9" }, { "CardNo":
"3355_1825a020001a20070731", "StartDate": "2007-07-31", "EndDate":
"2007-07-31", "StartTime": "07:30", "Pentad": "3355_1825", "ObserverNo":
"20001", "TotalHours": "0", "Hour1": "0", "Hour2": "0", "Hour3": "0",
"Hour4": "0", "Hour5": "0", "Hour6": "0", "Hour7": "0", "Hour8": "0",
"Hour9": "0", "Hour10": "0", "TotalSpp": "4", "InclNight": "0",
"AllHabitats": "0", "top": "-33.91666667", "bottom": "-33.99996667",
"right": "18.49996667", "left": "18.41666667", "yr": "2007", "mnth": "7"
} ], "species": [ { "Ref": "622", "Common_group": "Apalis",
"Common_species": "Bar-throated", "Genus": "Apalis", "Species":
"thoracica", "fp": "22.8426", "ad": "4.5802", "inc": "76" }, { "Ref":
"269", "Common_group": "Avocet", "Common_species": "Pied", "Genus":
"Recurvirostra", "Species": "avosetta", "fp": "6.5990", "ad": "0.0000",
"inc": "15" } ] } } Returns 1b : ?format=geoJSON Returns a geoJSON
object { "type": "FeatureCollection", "name": "Project coverage ",
"crs": { "type": "name", "properties": { "name":
"urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature",
"properties": { "pentad": "3355_1825", "full protocol": 788, "adhoc
protocol": 262, "incidental": 11653, "additional information": 282,
"2007": 3, "2008": 26, "2009": 50, "2010": 52, "2011": 60, "2012": 41,
"2013": 59, "2014": 87, "2015": 136, "2016": 106, "2017": 122, "2018":
46, "format": "geoJSON" }, "geometry": { "type": "MultiPolygon",
"coordinates": [ [ [ [ 18.41667, -33.91667 ], [ 18.49997, -33.91667 ], [
18.49997, -33.99997 ], [ 18.41667, -33.99997 ], [ 18.41667, -33.91667 ]
] ] ] } } ] }
Returns 1c: /coverage/group/BBD?format=csv or /coverage/group/BBD/species?format=csv ie: http://api.adu.org.za/sabap2/v2/coverage/group/BBD/species?format=csv or http://api.adu.org.za/sabap2/v2/coverage/group/BBD?format=csv This will return a csv file with the species summary for the country/province/group/pentad Returns 1d: /coverage/group/BBD/cards?format=csv ie: http://api.adu.org.za/sabap2/v2/coverage/group/BBD/cards?format=csv This will return a csv file with card headers data for the country/province/group/pentad. Function: API call: Call a full card record Type: Simple Parameters: cardnumber - required Sample API calls: http://api.adu.org.za/sabap2/v2/card/full/0/3325_1825_000228_20180922 Usage: Sample API calls: http://api.adu.org.za/sabap2/v2/card/full/0/3325_1825_000228_20180922 Returns: Returns a JSON object with taxa record(s)
{ "meta": { "ip":
"137.158.54.235", "call":
"http:\/\/api.adu.org.za\/sabap2\/v2\/card\/full\/0\/3325_1825_000228_20180922",
"call_date": "1537963693", "verbatum date": "2018-09-26 14:08:13",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2018-09-26 14:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this card", "records": 1,
"edit": 0 }, "data": { "cards": [ { "CardNo":
"3325_1825_000228_20180922", "StartDate": "2018-09-22", "EndDate":
"2018-09-22", "StartTime": "08:18:54", "Pentad": "3325_1825",
"ObserverNo": "228", "TotalHours": "3", "Hour1": "35", "Hour2": "47",
"Hour3": "50", "Hour4": "0", "Hour5": "0", "Hour6": "0", "Hour7": "0",
"Hour8": "0", "Hour9": "0", "Hour10": "0", "TotalSpp": "50",
"InclNight": "0", "AllHabitats": "1", "records": [ { "CardNo":
"3325_1825_000228_20180922", "Spp": "55", "Common_group": "Heron",
"Common_species": "Black-headed", "Genus": "Ardea", "Species":
"melanocephala", "Sequence": "1", "Code": "2-0a", "UnUsable": "0", "id":
"11948067" }, { "CardNo": "3325_1825_000228_20180922", "Spp": "576",
"Common_group": "Stonechat", "Common_species": "African", "Genus":
"Saxicola", "Species": "torquatus", "Sequence": "2", "Code": "2-0a",
"UnUsable": "0", "id": "11948068" } ], "observers": [ ] } ] } }
Function: API call: Fetch card data with species Type: Simple Parameters: species reference - required; int; Format option: ?format=csv Sample API calls: http://api.adu.org.za/sabap2/v2/cards/species/0/544 http://api.adu.org.za/sabap2/v2/cards/species/0/544?format=csv Usage: Usage 1: Sample API calls: http://api.adu.org.za/sabap2/v2/cards/species/0/544 Returns: Returns a JSON object for all cards, with indicator if species was present on survey
{ "meta": { "ip": "137.158.54.235", "call":
"http:\/\/api.adu.org.za\/sabap2\/v2\/cards\/species\/0\/544",
"call_date": "1537964717", "verbatum date": "2018-09-26 14:25:17",
"referer_url": null, "copyright": { "author": "Michael Brooks", "email":
"michael.brooks@uct.ac.za", "web":
"http:\/\/www.fitzpatrick.uct.ac.za\/", "organisation": "Fitzpatrick
Institute of African Ornithology, University of Cape Town", "license":
"MIT", "date": "2018-09-26 14:9" } }, "status": { "result": "success",
"comment": "User does have permissions to view this card", "records":
31533 }, "data": { "cards": [ { "CardNo": "0000_0000_013011_20130209",
"StartDate": "2013-02-09", "EndDate": "2013-02-09", "StartTime": "",
"Pentad": "2610_2515", "ObserverNo": "13011", "TotalHours": "2",
"Hour1": "0", "Hour2": "0", "Hour3": "0", "Hour4": "0", "Hour5": "0",
"Hour6": "0", "Hour7": "0", "Hour8": "0", "Hour9": "0", "Hour10": "0",
"TotalSpp": "40", "InclNight": "1", "AllHabitats": "1", "records": [ {
"CardNo": "0000_0000_013011_20130209", "Spp": "544", "Common_group":
"Bulbul", "Common_species": "African Red-eyed", "Genus": "Pycnonotus",
"Species": "nigricans", "Sequence": "26", "Code": "2-0a", "UnUsable":
"0" } ] } ] } } 
Usage 2: Sample API calls: http://api.adu.org.za/sabap2/v2/cards/species/0/544?format=csv Returns: csv file with the card data