Skip to content
No description or website provided.
Ruby JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db
lib
log
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Brightpoint API

The following endpoints should closely match the Citizen Science platform.

Fetch all subjects

GET http://brightpoint.herokuapp.com/api/v1/subjects.json

Fetch a new subject

To fetch the next subject, replace :previous_subject in the below endpoint.

GET http://brightpoint.herokuapp.com/api/v1/subjects/:previous_subject/next.json

Fetch all classifications and annotations for a given subject

GET http://brightpoint.herokuapp.com/api/v1/subjects/:subject_id/classifications.json

Create a new classification for a given subject

http://brightpoint.herokuapp.com/api/v1/subjects/:subject_id/classifications/new.json

With params:

  • started: timestamp
  • ended: timestamp
  • annotations: array of annotations containing a start and end x-coordinate

For example:

curl -F 'started=1337508679' \
    -F 'ended=133750467' \
    -F 'annotations[]={start:41750, end:51297}' \
    -F 'annotations[]={start:475, end:41750}' \
    http://brightpoint.herokuapp.com/api/v1/subjects/1/classifications/new.json

Endpoints unique to BrightPoint

Fetch all data points

GET http://brightpoint.herokuapp.com/api/v1/data_points.json?start_point=390&size=100

Fetch all data points for a single chromosome

GET http://brightpoint.herokuapp.com/api/v1/chromosome/chr1.json?size=100
Something went wrong with that request. Please try again.