{"id":15167156,"url":"https://github.com/gojibjib/jibjib-api","last_synced_at":"2025-09-12T04:37:33.177Z","repository":{"id":57607457,"uuid":"133061694","full_name":"gojibjib/jibjib-api","owner":"gojibjib","description":"Go REST API for communication between the app and query service","archived":false,"fork":false,"pushed_at":"2018-11-03T14:28:45.000Z","size":2238,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T06:41:31.059Z","etag":null,"topics":["docker","docker-image","golang","rest-api","saltstack","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gojibjib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-11T16:12:18.000Z","updated_at":"2020-04-15T15:32:25.000Z","dependencies_parsed_at":"2022-08-30T05:23:17.647Z","dependency_job_id":null,"html_url":"https://github.com/gojibjib/jibjib-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gojibjib/jibjib-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojibjib%2Fjibjib-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojibjib%2Fjibjib-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojibjib%2Fjibjib-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojibjib%2Fjibjib-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojibjib","download_url":"https://codeload.github.com/gojibjib/jibjib-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojibjib%2Fjibjib-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274753848,"owners_count":25342874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","golang","rest-api","saltstack","terraform"],"created_at":"2024-09-27T05:40:43.870Z","updated_at":"2025-09-12T04:37:33.136Z","avatar_url":"https://github.com/gojibjib.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [jibjib-api](https://github.com/gojibjib/jibjib-api)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/gojibjib/gopeana)](https://goreportcard.com/report/github.com/gojibjib/jibjib-api) [![Docker Build Status](https://img.shields.io/docker/build/obitech/jibjib-api.svg)](https://hub.docker.com/r/obitech/jibjib-api/builds/)\n[![godoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/gojibjib/jibjib-api/pkg/api)\n\nGo REST API to receive input from the [JibJib Android App](https://github.com/gojibjib/jibjib), [query](https://github.com/gojibjib/jibjib-query) the [model](https://github.com/gojibjib/jibjib-model) and send those information back to the App.\n\n## Repo layout\nThe complete list of JibJib repos is:\n\n- [jibjib](https://github.com/gojibjib/jibjib): Our Android app. Records sounds and looks fantastic.\n- [deploy](https://github.com/gojibjib/deploy): Instructions to deploy the JibJib stack.\n- [jibjib-model](https://github.com/gojibjib/jibjib-model): Code for training the machine learning model for bird classification\n- [jibjib-api](https://github.com/gojibjib/jibjib-api): Main API to receive database requests \u0026 audio files.\n- [jibjib-data](https://github.com/gojibjib/jibjib-data): A MongoDB instance holding information about detectable birds.\n- [jibjib-query](https://github.com/gojibjib/jibjib-query): A thin Python Flask API that handles communication with the [TensorFlow Serving](https://www.tensorflow.org/serving/) instance.\n- [gopeana](https://github.com/gojibjib/gopeana): A API client for [Europeana](https://europeana.eu), written in Go.\n- [voice-grabber](https://github.com/gojibjib/voice-grabber): A collection of scripts to construct the dataset required for model training\n\n\n## Install\n### Docker\nSee [deploy instructions](https://github.com/gojibjib/deploy).\n\n### Compile yourself\nIf you didn't clone the repo, `go get` the package and the `main.go`:\n\n```\ngo get github.com/gojibjib/jibjib-api/pkg\ncd $GOPATH/src/github.com/gojibjib/jibjib-api\nwget https://raw.githubusercontent.com/gojibjib/jibjib-api/master/meta/main.go \n```\n\nCompile it:\n\n```\nCGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .\n```\n\nSetup [jibjib-data](https://github.com/gojibjib/jibjib-data).\n\nStart the API:\n\n```\nexport JIBJIB_DB_URL=read:read@localhost/birds\n./app\n```\n\n## API Documentation\n### Endpoints\n\nEndpoint|Method|Comment\n---|---|---\n`/`|GET|Answers with a basic \"Pong\" response\n`/ping`|GET|Answers with a basic \"Pong\" response\n`/birds/dummy`|GET|Sends a JSON Response with randomized IDs and accuracies for testing\n`/birds/all`|GET|Retrieves all bird information, without descriptions\n`/birds/{id:[0-9]+}`|GET|Retrieves bird information by ID. Use query string `desc_de=false` and `desc_en=false` to omit description fields.\n`/detect/binary`|POST|Send a MP4 file to the API to start querying the ML model for bird voice recognition. File needs to be send in binary format and with the Header `Content-Type: application/octet-stream` set.\n\n### Response format\n\n```\n{\n    \"status\": \u003cint\u003e,\n    \"message\": \u003cstring\u003e,\n    \"count\": \u003cint\u003e,\n    \"data\": {...} | null\n}\n```\n\n### Examples\n\n```\ncurl \"http://localhost:8080/ping\"\n{\n    \"status\":200,\n    \"message\":\"Pong\",\n    \"count\":0,\n    \"data\":null\n}\n```\n\n```\ncurl \"htttp://localhost:8080/birds/1\"\n{\n    \"status\":200,\n    \"message\":\"Bird found\",\n    \"count\":1,\n    \"data\": {\n        \"id\":1,\n        \"name\":\"Cuculus canorus\",\n        \"genus\":\"Cuculus\",\n        \"species\":\"canorus\",\n        \"title_de\":\"Kuckuck\",\n        \"title_en\":\"Common cuckoo\",\n        \"desc_de\":\"...omitted...\",\n        \"desc_en\":\"...omitted...\"\n    }\n}\n```\n\n```\ncurl \"htttp://localhost:8080/birds/1?desc_de=false\u0026desc_en=false\"\n{\n    \"status\":200,\n    \"message\":\"Bird found\",\n    \"count\":1,\n    \"data\": {\n        \"id\":1,\n        \"name\":\"Cuculus canorus\",\n        \"genus\":\"Cuculus\",\n        \"species\":\"canorus\",\n        \"title_de\":\"Kuckuck\",\n        \"title_en\":\"Common cuckoo\",\n        \"desc_de\":\"\",\n        \"desc_en\":\"\"\n    }\n}\n```\n\n```\n# For now, only mp4 files are being accepted\ncurl -H 'Content-Type: application/octet-stream' -X POST --data-binary @larus_canus_3.mp4 http://localhost:8081/detect/binary\n{\n  \"message\": \"Detection successful\",\n  \"status\": 200,\n  \"count\": 3,\n  \"data\": [\n    {\n      \"accuracy\": 0.6470588235294118,\n      \"id\": 110\n    },\n    {\n      \"accuracy\": 0.17647058823529413,\n      \"id\": 7\n    },\n    {\n      \"accuracy\": 0.17647058823529413,\n      \"id\": 30\n    }\n  ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojibjib%2Fjibjib-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojibjib%2Fjibjib-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojibjib%2Fjibjib-api/lists"}