Proposed Decapod Export Server Architecture
Resources
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Redirects to the start page for the Decapod user interface. | Success: 301 |
The set of all "Books" in Decapod.
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Returns the "library" model, in JSON format.
{
library: [
{
name: “book name”,
url: “http://localhost:8080/library/'bookName'/”
}
]
}
| Success: 200 |
POST | Creates a new book and returns the URL | Success: 201 |
PUT, DELETE | N/A | Error: 405 |
The information about a specific "Book".
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Returns the "book" model, in JSON format.
{
title: "bookName",
description: "book description",
pages: “http://localhost:8080/library/'bookName'/pages/”
}
| Success: 200 |
PUT | Update the "book" model | Success: 200 |
DELETE | Removes a book and all its attached pages | Success: 204 |
POST | N/A | Error: 405 |
The set of "pages" contained within a "book".
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Returns the "book" model, in JSON format.
{
pages: [
{
id: “page id”,
index: “1”,
url: “http://localhost:8080/library/'bookName'/pages/'pageID'/”
}
]
}
| Success: 200 |
POST | Creates a new page and returns the URL | Success: 201 |
PUT | Update the "pages" model | Success: 200 |
DELETE | N/A | Error: 405 |
The information about a specific page, including the information about it's adjustments.
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Returns the "page" model, in JSON format.
{
title: "bookName",
description: "book description",
pages: [
{
id: “page id”,
origName: "originalFileName.png",
image: “http://localhost:8080/library/'bookName'/pages/'image.png'”
thumbnail: "http://localhost:8080/library/'bookName'/pages/'image-thumbnail.png'"
adjustments: {
rotation: "90", // in degrees
crop: "crop boundary" // some representation of the crop boundary
}
}
]
}
| Success: 200 |
PUT | Update the "page" model | Success: 200 |
DELETE | Removes the page | Success: 204 |
POST | N/A | Error: 405 |
The information about a specific page, including the information about it's adjustments.
Request Type | Response / Action | Status Code |
|---|---|---|
GET | Returns the "page" model, in JSON format.
{
title: "bookName",
description: "book description",
pages: [
{
id: “page id”,
origName: "originalFileName.png",
image: “http://localhost:8080/library/'bookName'/pages/'image.png'”
thumbnail: "http://localhost:8080/library/'bookName'/pages/'image-thumbnail.png'"
adjustments: {
rotation: "90", // in degrees
crop: "crop boundary" // some representation of the crop boundary
}
}
]
}
| Success: 200 |
PUT | Update the "page" model | Success: 200 |
DELETE | Removes the page | Success: 204 |
POST | N/A | Error: 405 |