Don't forget to check out our JSON RESTful APIs, they can help you utilize and extend Quickbase with ease.
Overview
Use API_RemoveUserFromRole to remove a user from a specified role. You invoke this call on an application-level dbid. If the user has no other role, this call eliminates the user from the application’s role list. You’ll need to get the user ID by calling API_GetUserInfo if you want to assign the user to another role in the future.
This call can be used to remove the user entirely from any role in the application, effectively turning off access to that user. If you intend to turn off all access, you would need to call API_GetUserRole Info to see what roles the user has, then invoke API_RemoveUserFromRole on each role.
If you expect to add that user to another role in the future, you should consider using API_ChangeUserRole, which can be used to turn off access (with a role set to None) while keeping the user on the application’s role list for future reinstatement or role change.
If you are simply changing the user from one role to another, you should use API_ChangeUserRole.
Request parameters
Parameter | Value | Required? |
---|---|---|
userid |
The ID of user you want removed from the role. |
yes |
roleid |
The ID of the role from which you want the user removed. |
yes |
ticket |
A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. |
yes, one of:
|
usertoken |
The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quickbase UI. |
yes, one of:
|
apptoken |
A valid application token. |
yes, if the application requires application tokens |
udata |
A string value that you want returned. It will not be handled by Quickbase but it will be returned in the response. |
no |
Response values
Element Name | Value |
---|---|
action |
The originating request, for example, API_RemoveUserFromRole. |
errcode |
Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.) 0 indicates that no error was encountered. |
errtext |
Text that explains the error code. "No error" indicates that no error was encountered. |
udata |
Optional. Contains any udata value supplied in the request. |
num_records_deleted |
The total number of records that were deleted. |
Sample XML Request
POST https://target_domain/db/target_dbid
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION:API_RemoveUserFromRole
<qdbapi>
<udata>misc data</udata>
<userid>112245.efy7</userid>
<roleid>11</roleid>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
</qdbapi>
URL alternative
https://target_domain/db/target_dbid?a=API_RemoveUserFromRole&userid=112245
&roleid=11&ticket=auth_ticket&apptoken=app_token
where target_domain is the domain against which you are invoking this call, for example, quickbase.com. Read about this notation.
Sample response
<?xml version="1.0" ?>
<qdbapi>
<action>API_RemoveUserFromRole</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<udata>misc data</udata>
</qdbapi>