{"id":13557032,"url":"https://github.com/growingdatafoundation/ipn-api","last_synced_at":"2025-04-03T11:30:47.537Z","repository":{"id":98112701,"uuid":"64462280","full_name":"growingdatafoundation/ipn-api","owner":"growingdatafoundation","description":"Indigenous Place Names API","archived":false,"fork":false,"pushed_at":"2016-07-29T08:03:19.000Z","size":4967,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-04T07:35:20.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/growingdatafoundation.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-07-29T07:58:04.000Z","updated_at":"2016-09-29T21:04:08.000Z","dependencies_parsed_at":"2023-05-23T20:15:46.546Z","dependency_job_id":null,"html_url":"https://github.com/growingdatafoundation/ipn-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/growingdatafoundation%2Fipn-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/growingdatafoundation%2Fipn-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/growingdatafoundation%2Fipn-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/growingdatafoundation%2Fipn-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/growingdatafoundation","download_url":"https://codeload.github.com/growingdatafoundation/ipn-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246992814,"owners_count":20865890,"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","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":[],"created_at":"2024-08-01T12:04:08.225Z","updated_at":"2025-04-03T11:30:42.465Z","avatar_url":"https://github.com/growingdatafoundation.png","language":"PHP","readme":"* Base API: http://api.ala.org.au/\n* old repository: https://github.com/NatureNinjas/whatgrowshere\n\n# Install\n=========\n\n* Install dependencies\n\n```\ncomposer install\n```\n\n* Rename `example.ApiConfig.php` to `ApiConfig.php` and fill in your Api Keys.\n\nRecomended: The `ApiConfig.php` should be moved out of the `htdocs`. Update the `require_once` directive for this file the index.php accordingly.\n\n* if you want to use the Mongo cache you currently need to install MongoDB on your server and install the PHP Mongo drivers\n\n# ALA Occurences aggregator API\n\n## ala.occurences\n\n * returns lists of occurrence counts of queried specimen for a given location\n\n### GET:\n\n```\n/ala.occurences.php?include=ala.species\u0026bname=Acacia\u0026lat=-34.928726\u0026lon=138.59994\u0026radius=5\n```\n\nParams:\n\n * `include` (optional): modules to include (see below)\n * `bname`: binomial name search (starts with), currently interpreted as [genus](https://en.wikipedia.org/wiki/Genus)\n * `lat`: latitude\n * `lon`: longitude\n * `rad`: radius\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### POST\n\nSubmit a wkt plygon string\n\n```\n/ala.occurences.php?include=ala.species\u0026bname=Acacia\n/ala.occurences.php\n```\n\nParams:\n\n * `include` (optional): modules to include (see below)\n * `bname`: binomial name search (starts with), currently interpreted as [genus](https://en.wikipedia.org/wiki/Genus)\n * `wkt`: (POST field only) wkt string\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### Include modules\n\navailable modules:\n\n * `ala.species`: fetches details for each returned species of occurence search\n * `ala.explore.groups`: counts number of secies by group for a location/region\n\nModules can be set with the `include` parameter. Multiple modules as comm-separated list, e.g. `include=ala.species,ala.explore.groups`\n\nNote, `ala.explore.groups` works only in GET mode. ALA doesn't suppot polygons for group counts. The api doens't break when included into POST, but will log a `_status` 400'.\n\n`\"ala\":{ ... \"explore\":{\"groups\":{\"_status\":400,\"_errors\":[\"No polygon requests supported\"],\"count\":false,\"groups\":[]}}}}`\n\n### Response\n\nExample response with `include=ala.species`\n\n```javascript\n{\n    \"ala\": {\n        // ala.occurences core module\n        \"occurences\": {\n            // curl response status\n            \"_status\": 200,\n            // messages may be logged when _status != 200\n            \"_errors\": [],\n            // total records found\n            \"count\": 107,\n            // occurences count by species: common name\n            // note, that many species have no common name\n            \"common_name\": {\n                \"Acacia Hedge\": 4,\n                \"Australian Golden Wattle\": 13,\n                    \"Black Wattle\": 16,\n                    ...\n                },\n                // occurences count by species: taxonomy name\n                \"taxon_name\": {\n                    \"Acacia\": 1,\n                    \"Acacia acinacea\": 12,\n                    ....\n            }\n        },\n        // ala.species aggregator\n        \"species\": {\n            // curl response status\n            \"_status\": 200,\n            // messages may be logged when _status != 200\n            \"_errors\": [],\n            // species module - species are indexed by taxonomy name\n            \"species\": {\n                \"Acacia\": {\n                    // ala guid for further lookups\n                    \"guid\": \"urn:lsid:biodiversity.org.au:apni.taxon:295861\",\n                    \"common_name\": \"Wattle\",\n                    // native species\n                    \"isAustralian\": \"recorded\",\n                    \"image\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1009\\/24\\/250623\\/raw.jpg\",\n                    \"thumbnail\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1009\\/24\\/250623\\/thumbnail.jpg\"\n                    // density map module\n                    \"densityMap\": {\n                        // Australia - png image\n                        \"australia\": \"http:\\/\\/biocache.ala.org.au\\/ws\\/density\\/map?q=Acacia\"\n                    }\n                },\n                \"Acacia acinacea\": {\n                    \"guid\": \"urn:lsid:biodiversity.org.au:apni.taxon:295874\",\n                    \"common_name\": \"Gold-dust Acacia\",\n                    \"isAustralian\": \"recorded\",\n                    \"image\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1124\\/193\\/1933412\\/raw.jpg\",\n                    \"thumbnail\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1124\\/193\\/1933412\\/thumbnail.jpg\"\n                    \"densityMap\": {\n                        \"australia\": \"http:\\/\\/biocache.ala.org.au\\/ws\\/density\\/map?q=Acacia+acinacea\"\n                    }\n                },\n                ....\n        }\n    }\n}\n```\n\n## ala.species\n\n * returns information for a species\n\n### GET\n\n```\n/ala.species.php?taxon_name=Acacia+penninervis\n```\n\nParams:\n\n * `taxon_name`: taxonomy name\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### Example response:\n\n```javascript\n{\n    \"ala\": {\n        \"species\": {\n            // curl response status\n            \"_status\": 200,\n            // messages may be logged when _status != 200\n            \"_errors\": [],\n            \"species\": {\n                \"Acacia penninervis\": {\n                    // taxonomy concept id: see ala.species.details\n                    \"guid\": \"urn:lsid:biodiversity.org.au:apni.taxon:298661\",\n                    \"common_name\": \"Hickory\",\n                    \"isAustralian\": \"recorded\",\n                    \"image\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1051\\/187\\/1874162\\/raw.jpg\",\n                    \"thumbnail\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1051\\/187\\/1874162\\/thumbnail.jpg\",\n                    \"densityMap\": {\n                        \"australia\": \"http:\\/\\/biocache.ala.org.au\\/ws\\/density\\/map?q=Acacia+penninervis\"\n                    }\n                }\n            }\n        }\n    }\n}\n```\n\n## ala.species.details\n\n* returns details about a species: description, images, conservation status, links classifications etc\n\n### GET\n\n```javascript\n// Acacia penninervis\n/ala.species.details.php?guid=urn:lsid:biodiversity.org.au:apni.taxon:298661\u0026dump=1\n```\n\nParams:\n\n * `guid`: The guid for the taxon concept, returned by **ala.species** lookup\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### Example response:\n\n```javascript\n{\n    \"ala\": {\n        \"species\": {\n            \"details\": {,\n                // curl response status\n                \"_status\": 200,\n                // messages may be logged when _status != 200\n                \"_errors\": [],\n                \"name\": \"Acacia penninervis\",\n                \"isAustralian\": true,\n                // properties are string or null\n                \"classification\": {\n                    \"kingdom\": \"Plantae\",\n                    \"phylum\": \"Charophyta\",\n                    \"class_\": \"Equisetopsida\",\n                    \"order\": \"Fabales\",\n                    \"family\": \"Fabaceae\",\n                    \"genus\": \"Acacia\",\n                    \"species\": \"Acacia penninervis\"\n                ...\n                },\n                // array of common_names\n                \"commonNames\": [\n                    \"Hickory\",\n                    \"Hickory Wattle\",\n                    \"Mountain Hickory\",\n                    \"Native Hickory\",\n                    \"Mountain Hickory\"\n                ...\n                ],\n                // conservation statuses by region empty array if no data, seea  populated example below\n                \"conservationStatuses\": [\n                ],\n                \"descriptions\": {\n                    \"Description\": \"Erect or spreading shrub or tree mostly 2\\u20138 m high; bark finely or deeply fissured, dark grey; branchlets \\u00b1 terete, glabrous, sometimes pruinose.\",\n                    \"Distribution\": \"Widespread, especially in inland divisions.\",\n                    \"Flowering Season\": \"Flowers throughout year\"\n                ...\n                },\n                // empty array if no data\n                \"references\": [\n                    {\n                        \"source\": \"Wikipedia\",\n                        \"title\": \"Acacia penninervis\",\n                        \"url\": \"http:\\/\\/en.wikipedia.org\\/wiki\\/Acacia_penninervis\"\n                    }\n                ...\n                ],\n                // empty array if no data\n                \"images\": [\n                    {\n                        \"source\": \"Encyclopedia of Life\",\n                        \"contentType\": \"image\\/jpeg\",\n                        \"thumbnail\": \"http:\\/\\/bie.ala.org.au\\/repo\\/1051\\/187\\/1874162\\/thumbnail.jpg\",\n                        \"title\": \"Acacia penninervis\"\n                    },\n                ...\n                ]\n            }\n        }\n    }\n}\n```\n\n### conservation data status example:\n\nexample of pouplated array for an endangered species: Macrotis lagotis (Bilby): `/ala.species.details.php?guid=urn:lsid:biodiversity.org.au:afd.taxon:3814d122-c95f-467f-a3a2-2b269931b74f\u0026dump=1`\n\n```javascript\n{\n    \"ala\": {\n        \"species\": {\n            \"details\": {\n                // ... other properties ...\n\n                \"conservationStatuses\": {\n                    \"New South Wales\": {\n                        \"system\": \"Threatened Species Conservation Act 1995\",\n                        \"status\": \"Presumed Extinct\",\n                        \"rawCode\": \"E4\"\n                    },\n                    \"Australia\": {\n                        \"system\": \"The Environment Protection and Biodiversity Conservation Act 1999\",\n                        \"status\": \"Vulnerable\",\n                        \"rawCode\": null\n                    },\n                    \"Queensland\": {\n                        \"system\": \"Nature Conservation Act 1992\",\n                        \"status\": \"Endangered\",\n                        \"rawCode\": \"E\"\n                    },\n                    \"South Australia\": {\n                        \"system\": \"National Parks and Wildlife Act 1972\",\n                        \"status\": \"Vulnerable\",\n                        \"rawCode\": \"V\"\n                    },\n                    \"Northern Territory\": {\n                        \"system\": \"Territory Parks and Wildlife Conservation Act 2000\",\n                        \"status\": \"Vulnerable\",\n                        \"rawCode\": null\n                    },\n                    \"Western Australia\": {\n                        \"system\": \"Wildlife Conservation Act 1950\",\n                        \"status\": \"Vulnerable\",\n                        \"rawCode\": \"VU\"\n                    }\n                },\n\n                // ... other properties ...\n            }\n        }\n    }\n}\n\n```\n\n## ala.explore.groups\n\n* returns counts of all species groups for a given location\n\n### GET\n\n```\n/ala.explore.groups.php?lat=-34.928726\u0026lon=138.59994\u0026radius=5\u0026dump=1\n```\n\nParams:\n\n * `lat`: latitude\n * `lon`: longitude\n * `rad`: radius\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### Example response:\n\n```javascript\n{\n    \"ala\": {\n        \"explore\": {\n            // curl response status\n            \"_status\": 200,\n            // messages may be logged when _status != 200\n            \"_errors\": [],\n            //all species\n            \"count\": 105858,\n            //sorted by groups\n            \"groups\": {\n                \" Animals\": 99633,\n                \" Mammals\": 341,\n                \" Birds\": 93738,\n                \" Reptiles\": 135,\n                \" Amphibians\": 498,\n                \" Fish\": 173,\n                \" Molluscs\": 148,\n                \" Arthropods\": 4558,\n                \" Crustaceans\": 13,\n                \" Insects\": 3759,\n                \" Plants\": 5405,\n                \" Bryophytes\": 29,\n                \" Gymnosperms\": 15,\n                \" Ferns And Allies\": 21,\n                \" Angiosperms\": 5304,\n                \" Monocots\": 1674,\n                \" Dicots\": 3630,\n                \" Fungi\": 116,\n                \" Chromista\": 18,\n                \" Protozoa\": 8,\n                \" Bacteria\": 0,\n                \" Algae\": 13\n            }\n        }\n    }\n}\n```\n\n* responds with \"_status\": 400 and no data when included as module into `POST ala.occurrences`. ALA api doesn't support geo polygons for groups.\n\n## ala.explore.group\n\n* returns counts of all species groups for a given location\n\n### GET\n\n```\n/ala.explore.group.php?group_name=Birds\u0026lat=-34.928726\u0026lon=138.59994\u0026radius=5\n```\n\nParams:\n\n * `group_name`: zoological  name of the species group, allowecd names: see example response for *ala.explore.groups*\n * `lat`: latitude\n * `lon`: longitude\n * `rad`: radius\n * `dump` (optional, debug!): pretty-dumps json for debugging\n\n### Example response:\n\n```javascript\n{\n    \"ala\": {\n        \"explore\": {\n            \"group\": {\n                // curl response status\n                \"_status\": 200,\n                // messages may be logged when _status != 200\n                \"_errors\": [],\n                \"count\": {\n                    \"total\": 93738,\n                    \"distinct\": 380\n                }\n            }\n        }\n    }\n}\n```\n* `_status` is set to `400` if group name is invalid\n* responds with \"_status\": 400 and no data when included as module into `POST ala.occurrences`. ALA api doesn't support geo polygons for groups.\n\n# Mongo Cache\n\n A simple Mongo cache api is in development and is located in `\\Api\\Cache.php`. Currently this Api requires a local Mongo server which you need to set up.\n\n TODO:\n\n  * expiry\n  * remote Mongo\n  * hook up to `ala.species`\n","funding_links":[],"categories":["PHP","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrowingdatafoundation%2Fipn-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrowingdatafoundation%2Fipn-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrowingdatafoundation%2Fipn-api/lists"}