Skip to content

Install or update an extension for a reader

PUT
/api/v1/users/{userId}/extensions/{extensionId}
curl --request PUT \
--url http://localhost:8080/api/v1/users/1/extensions/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "repositoryId": 1 }'

Admin only. Provisions an extension from a server-wide repository, including for a shared demo account. Private repositories cannot be used. The component undergoes the same validation as a self-install.

userId
required
integer format: int64
extensionId
required
string

The extension’s reverse-DNS id.

Media typeapplication/json
object
repositoryId
required
integer format: int64

Example generated

{
"repositoryId": 1
}

The install was updated.

Media typeapplication/json
object
id
required
string
name
required
string
version
required
string
repositoryId
required
integer format: int64
sites
required
Array<string>
languages
required
Array<string>
formats
required

The formats the extension’s chapters come in, so clients know which readers it needs before opening a chapter. Sources from before formats existed read images.

Array<string>
>= 1 items
Allowed values: images epub pdf
installedAt
required
string format: date-time
usable
required

False while it came from the user’s own repository and the admin allows only the allow list.

boolean
update
required

The version the repository lists, when it differs from the installed one.

string | null

Example

{
"formats": [
"images"
]
}

The extension was installed.

Media typeapplication/json
object
id
required
string
name
required
string
version
required
string
repositoryId
required
integer format: int64
sites
required
Array<string>
languages
required
Array<string>
formats
required

The formats the extension’s chapters come in, so clients know which readers it needs before opening a chapter. Sources from before formats existed read images.

Array<string>
>= 1 items
Allowed values: images epub pdf
installedAt
required
string format: date-time
usable
required

False while it came from the user’s own repository and the admin allows only the allow list.

boolean
update
required

The version the repository lists, when it differs from the installed one.

string | null

Example

{
"formats": [
"images"
]
}

The request was malformed.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The request has no valid session token.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

Requires an admin account that is not a shared demo account.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The resource does not exist.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

Invalid or incompatible extension component.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The server failed; details are in its log.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The repository’s index couldn’t be fetched or isn’t valid.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}