The DELETE method of the attributes service removes attributes from the specified user. When attributes are removed, both the name and the value of the attribute are removed, not only the value.
• | In the community edition of the server, or commercial editions without organizations, use the first form of the URL. |
• | In commercial editions with organizations, you must use the second URL to specify the user’s organization. When specifying the organization, use its unique ID, not its path. When logged in as the system admin (superuser), use the first URL to specify users of the root organization. |
There are two syntaxes; the following one is for deleting multiple attributes or all attributes at once.
Method | URL | ||
DELETE | http://<host>:<port>/jasperserver[-pro]/rest_v2/users/userID/attributes?<arguments> http://<host>:<port>/jasperserver[-pro]/rest_v2/organizations/orgID/users/userID/attributes? <arguments> | ||
Argument | Type | Description | |
Optional | Specify an attribute name to remove that attribute from the user. Repeat this argument to delete multiple attributes. When this argument is omitted, all attributes are deleted from the given user. | ||
Return Value on Success | Typical Return Values on Failure | ||
204 No Content – The attributes were successfully removed from the user. | 404 Not Found – When the user ID or organization ID does not match any user or organization. The content includes an error message. 400 Bad Request – When an attribute name is null, blank, or too long. If one attribute causes an error, the operation stops and returns an error, but attributes that were already deleted remain deleted. |
The second syntax deletes a single attribute named in the URL from the specified user.
Method | URL | ||
DELETE | http://<host>:<port>/jasperserver[-pro]/rest_v2/users/userID/attributes/attrName http://<host>:<port>/jasperserver[-pro]/rest_v2/organizations/orgID/users/userID/attributes/attrName | ||
Return Value on Success | Typical Return Values on Failure | ||
204 No Content – The attribute was successfully removed from the user. | 404 Not Found – When the user ID or organization ID does not match any user or organization. The content includes an error message. 400 Bad Request – When an attribute name is null, blank, or too long. |
Recommended Comments
There are no comments to display.