Skip to main content

Users

5 endpoints — 3 GET, 1 POST, 1 DELETE

GET /api/v1/userAUTH

Returns all registered users (public fields only).

Authorization Required

This endpoint requires a valid JWT Bearer token in the Authorization header.

Responses

  • 200 Ok

GET /api/v1/user/{id}AUTH

Returns a single user by username.

Authorization Required

This endpoint requires a valid JWT Bearer token in the Authorization header.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

  • 200 Ok
  • 404 Not Found

GET /api/v1/user/{username}/ssh-key-fingerprintsAUTH

Returns the SSH key fingerprints for a user. Users may view their own keys; admins may view any user's keys.

Authorization Required

This endpoint requires a valid JWT Bearer token in the Authorization header.

Parameters

NameInTypeRequiredDescription
usernamepathstringYes

Responses

  • 200 Ok
  • 401 Unauthorized
  • 403 Forbidden
  • 500 Internal Server Error

POST /api/v1/user/{username}/ssh-keysAUTH

Adds an SSH public key to a user's account. Users may add keys to their own account; admins may add to any account.

Authorization Required

This endpoint requires a valid JWT Bearer token in the Authorization header.

Parameters

NameInTypeRequiredDescription
usernamepathstringYes

Request Body

FieldTypeRequiredDescription
publicKeystringNo
namestringNo

Responses

  • 200 Ok
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict
  • 500 Internal Server Error

DELETE /api/v1/user/{username}/ssh-keys/{fingerprint}AUTH

Removes an SSH public key from a user's account by fingerprint. Users may remove keys from their own account; admins may remove from any account.

Authorization Required

This endpoint requires a valid JWT Bearer token in the Authorization header.

Parameters

NameInTypeRequiredDescription
usernamepathstringYes
fingerprintpathstringYes

Responses

  • 200 Ok
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error