SpeciesFileGroup/taxonworks_api

Name: taxonworks_api

Owner: Species File Group

Description: Documentation for TaxonWorks APIs

Created: 2017-12-05 03:42:42.0

Updated: 2017-12-08 23:04:58.0

Pushed: 2018-01-03 17:15:17.0

Homepage: http://api.taxonworks.org

Size: 5

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

taxonworks_api

Documentation for the TaxonWorks API.

Status

TLDR - We have lots of non externally documented, non /API/VI nodes that could be aliased for experimenting. Once we do a major branch merge in the near future we will turn our focus to getting those endpoints cleaned up, and exposed in a proper fashion here.

See the issues here as to our present thinking/considerations and next steps.

Details

The api/v1 endpoints exist as an early proof of concept, they included our tests for tokenized user access to the API. They are not particularly useful.

We ran a much more intensive experiment, the matrix_row_coder, you can see how we mocked API calls here: https://github.com/SpeciesFileGroup/matrix_row_coder/tree/master/src/request/mockRequests.

Recently, all of the VUE.js based views are JSON endpoint based. Unfortunately these are not yet documented beyond their use in the code. If you experiment with the Edit taxon name task, watching the server log, you'll get a feel for the requests there.

There exist JSON responses for many of the basic CRUD requests inside the application, just append '.json' to the request.

Experimenting with endpoints not in /api/v1/

You can add existing internal endpoints to api/v1 for the purposes of experimenting by aliasing them in the config/routes.rb file relatively easily. To get a resources CRUD just add that resource to API scope as you would see it above in the application endpoint

ope :api, :defaults => { :format => :json }, :constraints => { id: /\d+/ } do
scope  '/v1' do

# Add TaxonNames endpoints
resources taxon_names

# ...

end
d

Getting a list of all the endpoints

From your endpoint you can do rake routes to get a list of all endpoints.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.