Get Own Profile¶
Authentication required.
Returns the profile and privilege data for the currently authenticated user. Does not require the Users privilege.
Response¶
{
"data": {
"id": 12,
"User Fullname": "Jane Doe",
"Username": "jane.doe@acme.com",
"User Email": "jane.doe@acme.com",
"User Phone": "+1 555 000 0000",
"Role Name": "Procurement Manager",
"User Status": "Active",
"2FA Enabled": true,
"Privileges": [
{ "type": "Procurement", "access": "Edit" },
{ "type": "Demand", "access": "View" }
]
}
}
Code Examples¶
response = session.get("https://acme.knosc.com/api/profile")
me = response.json()["data"]
print(f"Logged in as: {me['User Fullname']} ({me['Role Name']})")