Skip to content

keys

Accessed as client.user.keys; the async client mirrors it.

UserKeys

The user.keys namespace.

create

create(*, key: str, read_only: bool | None = None, title: str) -> PublicKey

Create a public key.

Parameters:

Name Type Description Default
key str

An armored SSH key to add

required
read_only bool | None

Describe if the key has only read access or read/write

None
title str

Title of the key to add

required

Returns:

Type Description
PublicKey

PublicKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: userCurrentPostKey

delete

delete(id: int) -> None

Delete a public key.

Parameters:

Name Type Description Default
id int

id of key to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentDeleteKey

get

get(id: int) -> PublicKey

Get a public key.

Parameters:

Name Type Description Default
id int

id of key to get

required

Returns:

Type Description
PublicKey

PublicKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentGetKey

list

list(*, fingerprint: str | None = None, page: int | None = None, limit: int | None = None) -> Paginated[PublicKey]

List the authenticated user's public keys.

Parameters:

Name Type Description Default
fingerprint str | None

fingerprint of the key

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[PublicKey]

PublicKeyList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCurrentListKeys

AsyncUserKeys

The user.keys namespace.

create

create(*, key: str, read_only: bool | None = None, title: str) -> PublicKey

Create a public key.

Parameters:

Name Type Description Default
key str

An armored SSH key to add

required
read_only bool | None

Describe if the key has only read access or read/write

None
title str

Title of the key to add

required

Returns:

Type Description
PublicKey

PublicKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: userCurrentPostKey

delete

delete(id: int) -> None

Delete a public key.

Parameters:

Name Type Description Default
id int

id of key to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentDeleteKey

get

get(id: int) -> PublicKey

Get a public key.

Parameters:

Name Type Description Default
id int

id of key to get

required

Returns:

Type Description
PublicKey

PublicKey.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: userCurrentGetKey

list

list(*, fingerprint: str | None = None, page: int | None = None, limit: int | None = None) -> AsyncPaginated[PublicKey]

List the authenticated user's public keys.

Parameters:

Name Type Description Default
fingerprint str | None

fingerprint of the key

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[PublicKey]

PublicKeyList.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.

Operation ID: userCurrentListKeys