chiro-canto/public/api/v1/doc/md/QUERY.md

57 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2021-04-01 08:57:34 +02:00
# Queries | Chiro-Canto API v1
2021-04-15 12:29:53 +02:00
## `/api/v1/species`
2021-04-01 08:57:34 +02:00
Retrieve informations on species present in Chiro-Canto database
2021-04-15 12:29:53 +02:00
### Method: `GET`
### Results: `JSON`
## `/api/v1/records`
### Method: `GET`
#### `cURL` command
```bash
curl -X GET https://chiro-canto.ortion.xyz/api/v1/records
```
### Results: `JSON`
#### Result sample
```json
{
"records": [
{
"id": 1,
"author_id": 9,
"recordist_name": "Samuel ORTION",
"file_name": "PaRecAR628069_20200526_040726.wav",
"url": "https://chiro-canto.ortion.xyz/storage/records/PaRecAR628069_20200526_040726.wav",
"license": "CC-by-nc-sa-4.0",
"species": "Pipistrellus pipistrellus",
"subspecies": "pipistrellus",
"sound": {
"types": [
"echolocation", "buzz"
],
"duration": "00:22",
"sample_rate": 384,
"time_expansion": 10
},
"recorder": {
"make": "TeensyRecorder",
"model": "ActiveRecorder",
"serial": "AR628069",
},
"location": {
"country": "France",
"lat": "47.87840601525087",
"lng": "0.21813243633005192"
},
"datetime": {
"date": "2020-05-26",
"time": "04:07:00"
},
"remarks": ""
},
{
...
}
]
}
```