# User

## get all users

> This can only be done by a logged in user who has the required privileges.

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"user"}],"security":[],"paths":{"/api/users":{"get":{"summary":"get all users","deprecated":false,"description":"This can only be done by a logged in user who has the required privileges.","operationId":"getUsers","tags":["user"],"parameters":[{"name":"meta","in":"query","description":"Set to true to receive response in data/meta format","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"List all users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserObject"}}}},"headers":{}}}}}},"components":{"schemas":{"UserObject":{"title":"User information","type":"object","properties":{"id":{"type":"string","description":"User Id"},"username":{"type":"string","description":"Username as an email address"},"firstname":{"type":"string","description":"firstname"},"lastname":{"type":"string","description":"lastname"},"status":{"$ref":"#/components/schemas/Status"},"tenant":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permissions"}},"confirmed":{"type":"boolean","description":"true, if the confirmation link/email has been triggered"},"img":{"type":"string","description":"url to user image"}},"required":["username","firstname","lastname"]},"Status":{"type":"string","enum":["ACTIVE","PENDING","DISABLED"]},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permissions"}},"scope":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isGlobal":{"type":"boolean"},"description":{"type":"string"}}},"Permissions":{"type":"string","enum":["all","iam.tenant.create","iam.tenant.read","iam.tenant.update","iam.tenant.delete","iam.secret.create","iam.secret.read","iam.key.create","iam.key.read","iam.key.delete","iam.account.create","iam.account.read","iam.account.update","iam.account.delete","iam.token.create","iam.token.update","iam.token.delete","iam.token.introspect","tenant.all","tenant.membership.create","tenant.membership.update","tenant.membership.delete","tenant.profile.read","tenant.profile.update","tenant.profile.delete","tenant.roles.read","tenant.roles.create","tenant.roles.update","tenant.roles.delete","tenant.flows.read","tenant.flows.create","tenant.flows.update","tenant.flows.delete"]}}}}
```

## get a user by id

> This can only be done by a logged in user who has the required privileges.

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"user"}],"security":[],"paths":{"/api/users/{id}":{"get":{"summary":"get a user by id","deprecated":false,"description":"This can only be done by a logged in user who has the required privileges.","operationId":"getUserById","tags":["user"],"parameters":[{"name":"id","in":"path","description":"ID of user to use","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserObject"}}},"headers":{}}}}}},"components":{"schemas":{"UserObject":{"title":"User information","type":"object","properties":{"id":{"type":"string","description":"User Id"},"username":{"type":"string","description":"Username as an email address"},"firstname":{"type":"string","description":"firstname"},"lastname":{"type":"string","description":"lastname"},"status":{"$ref":"#/components/schemas/Status"},"tenant":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permissions"}},"confirmed":{"type":"boolean","description":"true, if the confirmation link/email has been triggered"},"img":{"type":"string","description":"url to user image"}},"required":["username","firstname","lastname"]},"Status":{"type":"string","enum":["ACTIVE","PENDING","DISABLED"]},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permissions"}},"scope":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isGlobal":{"type":"boolean"},"description":{"type":"string"}}},"Permissions":{"type":"string","enum":["all","iam.tenant.create","iam.tenant.read","iam.tenant.update","iam.tenant.delete","iam.secret.create","iam.secret.read","iam.key.create","iam.key.read","iam.key.delete","iam.account.create","iam.account.read","iam.account.update","iam.account.delete","iam.token.create","iam.token.update","iam.token.delete","iam.token.introspect","tenant.all","tenant.membership.create","tenant.membership.update","tenant.membership.delete","tenant.profile.read","tenant.profile.update","tenant.profile.delete","tenant.roles.read","tenant.roles.create","tenant.roles.update","tenant.roles.delete","tenant.flows.read","tenant.flows.create","tenant.flows.update","tenant.flows.delete"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flowmate.gitbook.io/flowmate-documentation/api-reference/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
