Difference between revisions of "API Collections Manage Users"

From unroole CMS wiki
Jump to: navigation, search
(URI)
(Optional Paramaters)
Line 37: Line 37:
 
! Description
 
! Description
 
|-
 
|-
| bulk_change_mobile_users_ids[]
+
| ids[]
 
|  
 
|  
 
|
 
|
Line 43: Line 43:
 
| Array of mobile briefcase users ids to add.
 
| Array of mobile briefcase users ids to add.
 
|-
 
|-
| bulk_change_mobile_users_filter_ids[]
+
| filter_ids[]
 
| All users belonging to that account.
 
| All users belonging to that account.
 
|  
 
|  
 
| Array of integers
 
| Array of integers
| Array of mobile briefcase users ids to act upon. This list should be a subset of the mobile briefcase users on the account, so that only SOME of the mobile briefcase users on the account will be affected. If there are extra ids in this list, which are NOT in the bulk_change_mobile_users_ids[] list, then those will be deleted from this collection.
+
| Array of mobile briefcase users ids to act upon. This list should be a subset of the mobile briefcase users on the account, so that only SOME of the mobile briefcase users on the account will be affected. If there are extra ids in this list, which are NOT in the ids[] list, then those will be deleted from this collection.
 
|}
 
|}
  

Revision as of 15:51, 4 June 2012

Summary

Allows for managing users in a collection.

URI

https://api.unroole.com/collections/[collection-id]/update_users

HTTP Method

POST

Required Paramaters

Paramater Default Maximum Length Accepted Values Description
token API Persistence Token that identifies this user and its permissions.

Optional Paramaters

Paramater Default Maximum Length Accepted Values Description
ids[] Array of integers Array of mobile briefcase users ids to add.
filter_ids[] All users belonging to that account. Array of integers Array of mobile briefcase users ids to act upon. This list should be a subset of the mobile briefcase users on the account, so that only SOME of the mobile briefcase users on the account will be affected. If there are extra ids in this list, which are NOT in the ids[] list, then those will be deleted from this collection.

Response

Field Type Description
http_status integer API Status Code
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
error Rails default
added_users array of ids List of users that were successfully added to the collection.
deleted_users array of ids List of users that were successfully deleted from the collection.
rejected_users array of ids List of users that failed to be added or delete. Mostly likely the user does not belong to this account.

Notes

  • To add users, set bulk_change_mobile_users_ids[] and bulk_change_mobile_users_filter_ids[] to be the same.
  • To delete users, set set bulk_change_mobile_users_ids[] to blank, and bulk_change_mobile_users_filter_ids[] to the list of users to be deleted.