Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api introduction #160

Merged
5 commits merged into from
Jun 14, 2015
Merged

Api introduction #160

5 commits merged into from
Jun 14, 2015

Conversation

ael-code
Copy link
Member

Overview

Api was implemented thanks to a blueprint module inside webant.

With this pr we are going to expose all GET functionalities provided by archivant.

The rest api are graph-organized:

  • search and get volumes (with pagination support): /volumes/
  • get specific volume: /volumes/<volumeID>
  • get all attachments of a volume: /volumes/<volumeID>/attachments/
  • get specific attachment: /volumes/<volumeID>/attachments/<attachmentID>
  • get file associated with an attachment: /volumes/<volumeID>/attachments/<attachmentID>/file

Errors

The following is an error example:

{
  "error": {
    "code": 404, 
    "message": "volume not found",
    "details": "could not found volume with id: 'not666not'"
  }
}

Testing

the blueprint is registered at /api/v1
to start you can try with /api/v1/volumes/

To be done

  • documentation
  • expose all other functionalities provided by archivant.

@boyska
Copy link
Member

boyska commented Jun 13, 2015

The code seems very good. It would be incredibly cool to have unit tests for http "things", so that we don't have to manually test all of the APIs :/

ghost pushed a commit that referenced this pull request Jun 14, 2015
@ghost ghost merged commit 7059036 into insomnia-lab:master Jun 14, 2015
@ael-code ael-code deleted the api branch June 14, 2015 15:26
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants