githubEdit

Archive API

Everything dealing with Archives.

Get all Archives

get

Returns a list of all archives in the database. You can use the IDs of this JSON with the other endpoints.

Responses
chevron-right
200

Array of archives

application/json

JSON object for archive metadata for most API responses

arcidstring Β· min: 40 Β· max: 40Required

Unique identifier for the archive

titlestringRequired

Title of the archive

filenamestringRequired

Filename of the archive

tagsstringRequired

Comma-separated list of tags associated with the archive

summarystringOptional

Summary description of the archive

isnewbooleanRequired

Whether the archive is newly added

extensionstringRequired

File extension of the archive

progressintegerRequired

Reading progress (page number)

pagecountintegerRequired

Total number of pages in the archive

lastreadtimeintegerRequired

Unix timestamp of when the archive was last read

sizeintegerRequired

Size of the archive in bytes

tocarrayRequired

Table of contents for the archive

get
/archives
200

Array of archives

Get all untagged archives

get

Get archives that don't have any tags recorded. This follows the same rules as the Batch Tagging filter and will include archives that have parody:, date_added:, series: or artist: tags.

Responses
chevron-right
200

Array of archive IDs

application/json
string[]Optional
get
/archives/untagged
200

Array of archive IDs

πŸ”‘ Upload Archive

put

Upload an Archive to the server. If a SHA1 checksum of the Archive is included, the server will perform an optional in-transit, file integrity validation, and reject the upload if the server-side checksum does not match.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Body
filestring Β· binaryRequired

Archive file to upload

file_checksumstringOptional

SHA1 checksum of the archive for in-transit validation.

Pattern: ^[a-fA-F0-9]{40}$
category_idstring Β· min: 14 Β· max: 14Optional

Category ID you'd want the archive to be added to.

tagsstringOptional

Set of tags you want to insert in the database alongside the archive.

titlestringOptional

Title of the Archive.

summarystringOptional

Summary of the Archive.

Responses
chevron-right
200

Archive uploaded successfully

application/json
operationstringRequired

Name of operation

Example: upload
successinteger Β· enumRequired

Returns 1 if operation was successful, else 0

Possible values:
idstring Β· min: 40 Β· max: 40Required

ID of the uploaded archive

put
/archives/upload

πŸ”‘ Delete archive

delete

Delete both the archive metadata and the file stored on the server. πŸ™ Please ask your user for confirmation before invoking this endpoint.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Archive deleted response

application/json
operationstring Β· enumOptional

Name of the operation

Possible values:
idstring Β· min: 40 Β· max: 40Optional

ID of the archive

filenamestringOptional

Filename of the deleted archive

successinteger Β· enumOptional

Returns 1 if operation was successful, else 0

Possible values:
delete
/archives/{id}

Get archive metadata

get

Get Metadata (title, tags) for a given Archive.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Archive metadata

application/json

JSON object for archive metadata for most API responses

arcidstring Β· min: 40 Β· max: 40Required

Unique identifier for the archive

titlestringRequired

Title of the archive

filenamestringRequired

Filename of the archive

tagsstringRequired

Comma-separated list of tags associated with the archive

summarystringOptional

Summary description of the archive

isnewbooleanRequired

Whether the archive is newly added

extensionstringRequired

File extension of the archive

progressintegerRequired

Reading progress (page number)

pagecountintegerRequired

Total number of pages in the archive

lastreadtimeintegerRequired

Unix timestamp of when the archive was last read

sizeintegerRequired

Size of the archive in bytes

tocarrayRequired

Table of contents for the archive

get
/archives/{id}/metadata

πŸ”‘ Update archive metadata

put

Update tags and title for the given Archive. Data supplied to the server through this method will overwrite the previous data.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
titlestringOptional

New Title of the Archive.

tagsstringOptional

New Tags of the Archive.

summarystringOptional

New Summary of the Archive.

Responses
chevron-right
200

Archive metadata updated

application/json
operationstringRequired

Name of operation

errorstringOptional

Error message if any

successMessagestringOptional

Success message if any

successinteger Β· enumRequired

Returns 1 if operation was successful, else 0

Possible values:
put
/archives/{id}/metadata

Get archive thumbnail

get

Get a Thumbnail image for a given Archive. This endpoint will return a placeholder image if it doesn't already exist. If you want to queue generation of the thumbnail in the background, you can use the no_fallback query parameter. This will give you a background job ID instead of the placeholder.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the archive to process

Query parameters
no_fallbackstring Β· enumOptional

Disables the placeholder image, queues the thumbnail for extraction and returns a JSON with code 202. This parameter does nothing if the image already exists. (You will get the image with code 200 no matter what)

Possible values:
pageintegerOptional

Specify which page you want to get a thumbnail for. Defaults to the cover, aka page 1.

Responses
chevron-right
200

If the thumbnail was already extracted, you get it directly.

application/octet-stream
string Β· binaryOptional
get
/archives/{id}/thumbnail

πŸ”‘ Update archive thumbnail

put

Update the cover thumbnail for the given Archive. You can specify a page number to use as the thumbnail, or you can use the default thumbnail.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
pageintegerOptional

Page you want to make the thumbnail out of. Defaults to 1.

Responses
chevron-right
200

Archive thumbnail updated

application/json
operationstring Β· enumOptional

Name of operation

Possible values:
successinteger Β· enumOptional

Returns 1 if operation was successful, else 0

Possible values:
new_thumbnailstringOptional

New thumbnail URL

put
/archives/{id}/thumbnail

πŸ”‘ Add entry to Archive Table of Contents

put

Add an entry to the Table of Contents of a given Archive. The ToC is stored as a JSON-encoded key-value array mapping a page to a title for the chapter/section starting at that page.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
pageintegerRequired

Page number where the chapter/section starts.

titlestringRequired

Title of the chapter/section.

Responses
chevron-right
200

Archive TOC updated

application/json
operationstringRequired

Name of operation

errorstringOptional

Error message if any

successMessagestringOptional

Success message if any

successinteger Β· enumRequired

Returns 1 if operation was successful, else 0

Possible values:
put
/archives/{id}/toc

πŸ”‘ Remove entry from Archive Table of Contents

delete

Delete an entry from the Table of Contents of a given Archive.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
pageintegerRequired

Page number of the chapter/section to delete.

Responses
chevron-right
200

Archive TOC updated

application/json
operationstringRequired

Name of operation

errorstringOptional

Error message if any

successMessagestringOptional

Success message if any

successinteger Β· enumRequired

Returns 1 if operation was successful, else 0

Possible values:
delete
/archives/{id}/toc

Get archive categories

get

Get all the Categories which currently refer to this Archive ID.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Archive categories

application/json
operationstring Β· enumOptional

Name of the operation

Possible values:
successinteger Β· enumOptional

Returns 1 if operation was successful, else 0

Possible values:
get
/archives/{id}/categories

Get archive tankoubons

get

Get all the Tankoubons which currently refer to this Archive ID.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Archive tankoubons

application/json
tankoubonsstring[]Optional

Array of tankoubon IDs

operationstring Β· enumOptional

Name of the operation

Possible values:
successinteger Β· enumOptional

Returns 1 if operation was successful, else 0

Possible values:
get
/archives/{id}/tankoubons

Download archive

get

Download an Archive from the server.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to download.

Responses
chevron-right
200

Archive file

application/octet-stream
string Β· binaryOptional
get
/archives/{id}/download

Extract an Archive

get

Get a list of URLs pointing to the images contained in an archive. If necessary, this endpoint also launches a background Minion job to extract the archive so it is ready for reading.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
forcebooleanOptional

Force a full background re-extraction of the Archive. Existing cached files might still be used in subsequent /api/archives/:id/page calls until the Archive is fully re-extracted.

Responses
chevron-right
200

You get page URLs, and the ID of the background extract job.

application/json
jobintegerOptional

ID of the background extract job

pagesstring[]Optional

Page URLs

get
/archives/{id}/files

Extract page thumbnails

post

Create thumbnails for every page of a given Archive. This endpoint will queue generation of the thumbnails in the background.

If all thumbnails are detected as already existing, the call will return HTTP code 200. This endpoint can be called multiple times -- If a thumbnailing job is already in progress for the given ID, it'll just give you the ID for that ongoing job.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Query parameters
forcebooleanOptional

Whether to force regeneration of all thumbnails even if they already exist.

Responses
chevron-right
200

If thumbnails are already extracted and force=0

application/json
messagestringOptional
operationstring Β· enumOptional

Name of operation

Possible values:
successstring Β· enumOptional

Returns 1 if operation was successful, else 0

Possible values:
post
/archives/{id}/files/thumbnails

Get an archive page

get

Get an archive page. This call is mainly used alongside /api/archives/files.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to download.

Query parameters
pathanyRequired

Path to the image.

Responses
chevron-right
200

Archive page

application/octet-stream
string Β· binaryOptional
get
/archives/{id}/page

Update reading progression

put

Tell the server which page of this Archive you're currently showing/reading, so that it updates its internal reading progression accordingly. This endpoint will also update the date this Archive was last read, using the current server timestamp.

You should call this endpoint only when you're sure the user is currently reading the page you present. Don't use it when preloading images off the server.

Whether to make reading progression regressible or not is up to the client. (The web client will reduce progression if the user starts reading previous pages) Consider however removing the "New!" flag from an archive when you start updating its progress - The web client won't display any reading progression if the new flag is still set.

⚠ If the server is configured to use clientside progress tracking, this API call will return an error! Make sure to check using /api/info whether the server tracks reading progression or not before calling this endpoint.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

pageintegerRequired

Current page to update the reading progress to.
Must be a positive integer, and inferior or equal to the total page number of the archive.

Responses
chevron-right
200

Success response

application/json
idstring Β· min: 40 Β· max: 40Optional

ID of the archive updated

operationstring Β· enumOptional

Name of the operation

Possible values:
pageintegerOptional

Updated reading progress

lastreadtimeintegerOptional

Last read time in epoch seconds

successinteger Β· enumOptional

Returns 1 if successful, else 0

Possible values:
put
/archives/{id}/progress/{page}

πŸ”‘ Set Archive New flag

put

Sets/Restores the "New!" flag on an archive.

Authorizations
AuthorizationstringRequired

Use Authorization: Bearer <base64(api_key)>

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Successful response

application/json
operationstringRequired

Name of operation

errorstringOptional

Error message if any

successMessagestringOptional

Success message if any

successinteger Β· enumRequired

Returns 1 if operation was successful, else 0

Possible values:
put
/archives/{id}/isnew

Clear Archive New flag

delete

Clears the "New!" flag on an archive.

Path parameters
idstring Β· min: 40 Β· max: 40Required

ID of the Archive to process.

Responses
chevron-right
200

Successful response

application/json
idstring Β· min: 40 Β· max: 40Required

ID of the archive

operationstring Β· enumRequired

Name of the operation

Possible values:
successinteger Β· enumRequired

Returns 1 if successful, else 0

Possible values:
delete
/archives/{id}/isnew

Last updated