Skip to main content

Users

SDK methods for the Users module, accessed via soat.users. See the Users module docs for permissions and data model, and each method's REST page for the full request/response schema.

soat.users.getCurrentUser()

Get the current authenticated user

  • Method: GET
  • Path: /api/v1/users/me
await soat.users.getCurrentUser();

Request & response schema

soat.users.listUsers()

List all users

  • Method: GET
  • Path: /api/v1/users
await soat.users.listUsers({
query: { /* + optional */ },
});

Request & response schema

soat.users.createUser()

Create a user

  • Method: POST
  • Path: /api/v1/users
await soat.users.createUser({
body: { username, password, /* + optional */ },
});

Request & response schema

soat.users.getUser()

Get a user by ID

  • Method: GET
  • Path: /api/v1/users/{user_id}
await soat.users.getUser({
path: { user_id },
});

Request & response schema

soat.users.deleteUser()

Delete a user by ID

  • Method: DELETE
  • Path: /api/v1/users/{user_id}
await soat.users.deleteUser({
path: { user_id },
});

Request & response schema

soat.users.bootstrapUser()

Create the first admin user

  • Method: POST
  • Path: /api/v1/users/bootstrap
await soat.users.bootstrapUser({
body: { username, password },
});

Request & response schema

soat.users.loginUser()

Login user

  • Method: POST
  • Path: /api/v1/users/login
await soat.users.loginUser({
body: { username, password },
});

Request & response schema

soat.users.attachUserPolicies()

Attach policies to a user

  • Method: PUT
  • Path: /api/v1/users/{user_id}/policies
await soat.users.attachUserPolicies({
path: { user_id },
body: { policy_ids },
});

Request & response schema