Skip to content

Instantly share code, notes, and snippets.

@mmulich
Last active January 4, 2016 00:49
Show Gist options
  • Save mmulich/8543827 to your computer and use it in GitHub Desktop.
Save mmulich/8543827 to your computer and use it in GitHub Desktop.

License

  • GET license on existing content /publications/{id}/license/{user-id} returns 200 Ok.
  • GET license for content that needs license acceptance /publications/{id}/license/{user-id} returns 400 Bad Request.
  • POST license for content that needs license acceptance /publications/{id}/license/{user-id} accepts license and returns 200 Ok.

Roles

  • GET accept role on publication at /publications/{id}/roles/{role-id} returns 200 Ok.

Status

  • GET status on content being worked on /publications/{id} returns 202 Accepted with processing message.
  • GET status on content that failed validation or license not accepted on /publications/{id} returns 400 Bad Request.
  • GET status on content that needs license acceptance on /publications/{id} returns 202 Accepted with url to license.
  • GET status on successful publicaton on /publication/{id} returns 302 Found with url to /contents/{ident-hash}

Publish

POST data - roles, license url, url to epub

  • POST new content to /contents/ accepts epub payload and returns 302 Found to /publications/{id}.
  • POST content to /contents/{uuid} accepts epub payload and returns 302 Found to /publications/{id}.

EPUB resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment