From 68307286237ffef763db4ca1432dd9c4753bd505 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 10 Oct 2017 12:50:28 -0600 Subject: [PATCH] Add get=username option to getmanaged API call. Business/AccountHub/commit/2e63b5dbc70417b9fc7817bbdd4a2f85dafd5b3f --- docs/API Documentation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API Documentation.md b/docs/API Documentation.md index e0263e4..792298e 100644 --- a/docs/API Documentation.md +++ b/docs/API Documentation.md @@ -29,9 +29,9 @@ If the request is not well-formed (missing required arguments, invalid API key, | `acctstatus` | `username` | Returns the account status in field `account` for the given username. Statuses are `NORMAL`, `LOCKED_OR_DISABLED`, `CHANGE_PASSWORD` (if password expired), `TERMINATED`, or `ALERT_ON_ACCESS` (like `NORMAL` except an alert email is sent to the system admin on successful login). | `login` | `username`, `password` | Simulates a system login, processing the account status, sending login alerts if needed, and noting a successful login in the security log. Returns a `status` of `OK` if it worked (with `"alert": true` if an admin alert was sent), or a `status` of `ERROR` if anything prevented a successful login. | `ismanagerof` | `manager`, `employee`, `uid` (optional) | Returns a boolean `managerof` which is true if `manager` is a manager of `employee` or false otherwise. If argument `uid` is present and equal to `1`, `manager` and `employee` will be treated as UIDs, else as usernames. -| `getmanaged` | `uid` or `username` | Returns an array of UIDs in `employees` corresponding to the users the given account is a manager of. +| `getmanaged` | `uid` or `username`, `get` (optional) | Returns an array of UIDs (or usernames if `get=username`) in `employees` corresponding to the users the given account is a manager of. | `getmanagers` | `uid` or `username` | Returns an array of UIDs in `managers` corresponding to the users the given account is managed by. -| `usersearch` | `search` | Searches for users with names or usernames containing the `search`. Returns them in `result` as an indexed array.
Response format:
"result":[
{
"uid":"123",
"username":"jdoe",
"name":"John Doe"
},
{
"uid":"124",
"username":"jadoe",
"name":"Jane Doe"
}
]

If `search` is less than three characters long, a search will not be attempted and `result` will be an empty array (`[]`). The `result` is also `[]` if no results are found. +| `usersearch` | `search` | Searches for users with names or usernames containing the `search`. Returns them in `result` as an array.
Response format:
"result":[
{
"uid":"123",
"username":"jdoe",
"name":"John Doe"
},
{
"uid":"124",
"username":"jadoe",
"name":"Jane Doe"
}
]

If `search` is less than three characters long, a search will not be attempted and `result` will be an empty array (`[]`). The `result` is also `[]` if no results are found. | `permission` | `uid` or `username`, `code` | Returns boolean `has_permission` if the given user has the given permission code. A list of valid permission codes are found in the database table `permissions`. Note: if a user has the `ADMIN` permission, this will always return true no matter what code is requested, because the user in question should have enough system access to give themselves the permission if so desired. |`mobileenabled`| None | Returns a boolean `mobile` to indicate the value of the config setting `MOBILE_ENABLED`. | `mobilevalid` | `username`, `code` | Returns a boolean `valid` to indicate if the supplied username and mobile code are valid.