Show the resource usage of the account whose password was changed

kietpham

Registered
Sep 22, 2023
2
0
1
VietNam
cPanel Access Level
Root Administrator
I have a root account with many customer accounts and I want to see the resource usage of these accounts using the API.
I was able to do that using the api:

https://api.docs.cpanel.net/openapi/cpanel/operation/get_usages/

But some accounts had their passwords changed by customers so I couldn't get the resource usage.

I want to get resource usage including: Disk Usage, Physical Memory Usage, CPU Usage, Bandwidth, Entry Processes.


Can anyone help me? I want to use the api and not the CLI.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! I'm not completely sure I understand the question, as the uapi call can be made by the root user without knowing the cPanel user's password. Can you get me specific details on why the password is related to this issue?
 

kietpham

Registered
Sep 22, 2023
2
0
1
VietNam
cPanel Access Level
Root Administrator
Hey there! I'm not completely sure I understand the question, as the uapi call can be made by the root user without knowing the cPanel user's password. Can you get me specific details on why the password is related to this issue?
For example, in this api:
https://api.docs.cpanel.net/openapi/cpanel/operation/get_usages/

I need to use the user's account and password for basic authentication before calling the api and returning the resource usage of that account.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Thanks for the clarification. Ultimately, you won't want to use the password to authenticate the API call, or you will continue to run into this problem in the future every time a user updates their password.

I would look into alternate methods of authenticating the call as outlined here, as that will permanently resolve the issue: