Skip to content

Users

Add user

Method: Post

Path: /api/v1/users

Payload:

{
  "username": "<string>",
  "is_admin": false,
  "first_name": "<string>",
  "last_name": "<string>",
  "organization": "<string>",
  "email": "<email>"
}
Returns: User name

Delete user

Method: Delete

Path: /api/v1/users

Parameters:

user_name=<string>  # username
delete_user=true
Returns: User name

List Users

Method: Get

Path: /api/v1/users

Returns: List

{
    "users_list": [
        {
            "ametricx_account": "c43e61f6-80cb-4bdd-8ef4-05aa8bb4520f",
            "created_at": "2023-10-12T20:32:52+0000",
            "email": "[email protected]",
            "first_name": null,
            "is_active": null,
            "is_admin": true,
            "keycloak_id": null,
            "last_name": null,
            "organization": null,
            "updated_at": null,
            "username": "account:admin"
        },
        {
            "ametricx_account": "c43e61f6-80cb-4bdd-8ef4-05aa8bb4520f",
            "created_at": "2023-10-12T20:43:37+0000",
            "email": "[email protected]",
            "first_name": "AmetricX",
            "is_active": null,
            "is_admin": false,
            "keycloak_id": "5e28c46c-4080-4e7a-8c87-01a27ee4e1ec",
            "last_name": "Account",
            "organization": "Ametricx",
            "updated_at": "2023-10-12T20:43:37+0000",
            "username": "consumeruser"
        }
    ]
}