Skip to content

Install or update an extension

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

Downloads the version the repository’s index lists now and checks it against the index’s digest, then checks that the component’s manifest has the same id, version and sites. Installing again updates the install, or moves it to another repository.

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"
}

The repository is the user’s own and the admin allows only the allow list.

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"
}

The component isn’t a valid source extension (extension_invalid), doesn’t match the index (extension_mismatch), or was built for another version of the source contract (extension_incompatible). It can also be one of the repository codes of RepositoryNeedsCredentials when the host refuses the component: stored credentials were revoked, or the component is on another origin, which isn’t sent them.

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"
}