GuidesScriptsList Users

List Users

This script will list the users, with any additional properties you specify.

Usage

Note

[something] = optional property

docker compose exec zipline yarn scripts:list-users [extras (comma delimited)] [specific_id]

Output

The output will be a 2-space tabbed JSON array of users (or one user if a specific_id is specified).

[
{
"id": 1,
"username": "administrator",
"administrator": true,
},
...
]

If you run ... scripts:list-users token, the objects will now include each users token.

[
{
"id": 1,
"username": "administrator",
"administrator": true,
"token": "xxxxxxxxx"
},
...
]

Specifying multiple extra properties: ... scripts:list-users token,domains,oauth

[
{
"id": 1,
"username": "administrator",
"administrator": true,
"token": "xxxxxxxxx",
"domains": [
"example.com"
],
"oauth": [
{
"id": 1,
"provider": "GITHUB",
"userId": 1,
"username": "diced",
"token": "gho_x",
"refresh": null
},
{
"id": 2,
"provider": "DISCORD",
"userId": 1,
"username": "dicedtomato",
"token": "x",
"refresh": "x"
}
]
},
...
]

If you want to find a specific user by id, you can run ... scripts:list-users id,token 1 and it will return the user with id 1.

[
{
"id": 1,
"username": "administrator",
"administrator": true,
"token": "xxxxxxxxx"
}
]
Last updated: 3/23/2023
Edit this page on GitHub