Users ===== Manage user accounts and authentication. Users are individuals who can log into the system and perform various operations based on their permissions. Quick Reference --------------- .. list-table:: :header-rows: 1 :widths: 10 40 50 * - Method - Endpoint - Description * - POST - /api/users/list - * - POST - /api/users/user - * - PUT - /api/users/user - * - GET - /api/users/roles - * - GET - /api/users/pocusers - .. _post-apiuserslist: POST /api/users/list ~~~~~~~~~~~~~~~~~~~~ **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python from ABConnect import ABConnectAPI # Initialize the API client api = ABConnectAPI() # Make the API call response = api.raw.post( "/api/users/list" , data= { "example": "data" } ) # Process the response print(response) .. tab:: CLI .. code-block:: bash ab api raw post /api/users/list .. tab:: curl .. code-block:: bash curl -X POST \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "example": "data" }' \ 'https://api.abconnect.co/api/users/list' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "id": "789e0123-e89b-12d3-a456-426614174002", "status": "created", "message": "Resource created successfully" } ---- .. _post-apiusersuser: POST /api/users/user ~~~~~~~~~~~~~~~~~~~~ **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python from ABConnect import ABConnectAPI # Initialize the API client api = ABConnectAPI() # Make the API call response = api.raw.post( "/api/users/user" , data= { "example": "data" } ) # Process the response print(response) .. tab:: CLI .. code-block:: bash ab api raw post /api/users/user .. tab:: curl .. code-block:: bash curl -X POST \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "example": "data" }' \ 'https://api.abconnect.co/api/users/user' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "id": "789e0123-e89b-12d3-a456-426614174002", "status": "created", "message": "Resource created successfully" } ---- .. _put-apiusersuser: PUT /api/users/user ~~~~~~~~~~~~~~~~~~~ **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python from ABConnect import ABConnectAPI # Initialize the API client api = ABConnectAPI() # Make the API call response = api.raw.put( "/api/users/user" , data= { "example": "data" } ) # Process the response print(response) .. tab:: CLI .. code-block:: bash ab api raw put /api/users/user .. tab:: curl .. code-block:: bash curl -X PUT \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "example": "data" }' \ 'https://api.abconnect.co/api/users/user' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "id": "123e4567-e89b-12d3-a456-426614174000", "status": "updated", "message": "Resource updated successfully" } ---- .. _get-apiusersroles: GET /api/users/roles ~~~~~~~~~~~~~~~~~~~~ **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python from ABConnect import ABConnectAPI # Initialize the API client api = ABConnectAPI() # Make the API call response = api.raw.get( "/api/users/roles" ) # Process the response print(response) .. tab:: CLI .. code-block:: bash ab api raw get /api/users/roles .. tab:: curl .. code-block:: bash curl -X GET \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ 'https://api.abconnect.co/api/users/roles' **Sample Response:** .. toggle:: .. code-block:: json :linenos: [] ---- .. _get-apiuserspocusers: GET /api/users/pocusers ~~~~~~~~~~~~~~~~~~~~~~~ **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python from ABConnect import ABConnectAPI # Initialize the API client api = ABConnectAPI() # Make the API call response = api.raw.get( "/api/users/pocusers" ) # Process the response print(response) .. tab:: CLI .. code-block:: bash ab api raw get /api/users/pocusers .. tab:: curl .. code-block:: bash curl -X GET \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ 'https://api.abconnect.co/api/users/pocusers' **Sample Response:** .. toggle:: .. code-block:: json :linenos: []