Serves the Data Together JSON API.
This component in isolation doesn't do much, but when connected to the project as a whole it provides a variety of endpoints over https, which can be used to extract information from the Data Together database.
API Documentation: https://api.archivers.co/docs/
Copyright (C) 2017 Data Together This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.0.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENSE
file for details.
We would love involvement from more people! If you notice any errors or would like to submit changes, please see our Contributing Guidelines.
We use GitHub issues for tracking bugs and feature requests and Pull Requests (PRs) for submitting changes
- install docker and docker-compose
- if you are new to docker, you may want to test your install with the default test case
- in the project directory, run ``docker-compose build && docker-compose up`
- the API should now be running at
http://localhost:3200/
, and the following endpoints should work:- http://localhost:3200/urls for a list of URL's in the database
- http://localhost:3200/urls/{id} for an indivudual URL
- http://localhost:3200/primers for a list of primers
- http://localhost:3200/users for a list of users
- http://localhost:3200/users/{id} for an individual user
- http://localhost:3200/primers for a list of primers
- http://localhost:3200/primers/{id} for an individual primer
- http://localhost:3200/sources for a list of data sources
- http://localhost:3200/sources/{id} for an individual source
- http://localhost:3200/repositories for a list of repositories
- http://localhost:3200/repository/{id} for an in ndividual repository
- http://localhost:3200/coverage for a coverage tree associated with root URLs
- http://localhost:3200/collections for a list of collections
- http://localhost:3200/collections/{id} for an individual collectoin see below for more information
The API documentation is OpenAPI/Swagger compliant and is generated by the spectacle
node module. You will likely want to explore these docs, so you should generate them!
- Install spectacle with
npm -g install spectacle-docs
- To dynamically generate API docs as you work, run
spectacle -d open_api.yaml
and editopen_api.yaml
to see changes - Generate Static docs with
spectacle open_api.yaml
- Commit. Rinse. Repeat.
Right now modifying & updating code is a huge pain, but this is at least a start.