All URIs are relative to https://<sub_domain>.api.kandji.io
Method | HTTP request | Description |
---|---|---|
deleteUser | DELETE /api/v1/users/{user_id} | Delete User |
getUser | GET /api/v1/users/{user_id} | Get User |
listUsers | GET /api/v1/users | List Users |
open class func deleteUser(userId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Delete User
This endpoint makes a request to delete a specified user directory integration user by id (uuid).
You will see the following response (400 bad request), if a user is still assigned to one or more devices in Kandji. The user will need to be unassigned from the device either manually through the Kandji tenant or programatically using the Update device API endpoint.
{ "detail": "User still assigned to one or more devices." }
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk
let userId = "userId_example" // String |
// Delete User
UsersAPI.deleteUser(userId: userId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String |
Void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getUser(userId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)
Get User
This endpoint makes a request to retrieve a specified user directory integration user by id.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk
let userId = "userId_example" // String |
// Get User
UsersAPI.getUser(userId: userId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String |
AnyCodable
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func listUsers(email: String? = nil, _id: String? = nil, integrationId: String? = nil, archived: String? = nil, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)
List Users
This endpoint makes a request to retrieve a list of users from user directory integrations.
A maximum of 300 records are returned per request, and pagination can be performed leveraging the URLs provided in the next
and previous
keys in the response. If there are no more results available, the respective key will be null
.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk
let email = "email_example" // String | Returns users with email addresses containing the provided string. (optional)
let _id = "_id_example" // String | Search for a user matching the provided UUID value. (optional)
let integrationId = "integrationId_example" // String | Search for a integration matching the provided UUID value. (optional)
let archived = "archived_example" // String | Return only users that are either archived (true) or not archived (false). Archived users are users that appear in the Kandji Users module under the Archived tab. (optional)
// List Users
UsersAPI.listUsers(email: email, _id: _id, integrationId: integrationId, archived: archived) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
String | Returns users with email addresses containing the provided string. | [optional] | |
_id | String | Search for a user matching the provided UUID value. | [optional] |
integrationId | String | Search for a integration matching the provided UUID value. | [optional] |
archived | String | Return only users that are either archived (true) or not archived (false). Archived users are users that appear in the Kandji Users module under the Archived tab. | [optional] |
AnyCodable
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]