insightapi2~update_folder
Purpose
Update the properties of a folder. Only the name, share status and owner of a folder can be changed. Changes to share status and owner can optionally be cascaded to all descendant folders. When changing the name of a folder, a suffix may be applied to ensure that the name is unique. If the share status is PRIVATE and no owner is supplied, the current user becomes the owner to prevent loss of access. Security: FOLDER_EDIT is required to change the name, FOLDER_SHARE is required to change the share status, and FOLDER_OWNER is required to change the owner. The user must have write access to the folder.
Synopsis
function update_folder(client:insightapi2~insightconfig, req:insightapi2~httprequest, resp:insightapi2~httpresponse):insightapi2~folder
function update_folder(client:insightapi2~insightconfig, id:text, body:insightapi2~folder, cascade_owner:boolean, cascade_share_status:boolean, resp:insightapi2~httpresponse):insightapi2~folder
function update_folder(client:insightapi2~insightconfig, id:text, body:insightapi2~folder, cascade_owner:boolean, cascade_share_status:boolean):insightapi2~folder
Arguments
|
client
|
An initialized
insightapi2~insightconfig to call
|
||||||
|
req
|
An initialized
insightapi2~httprequest record. The
body field may be populated with a value of type
insightapi2~folder. The
params field may contain these indexes:
|
||||||
|
id
|
The ID of the folder
|
||||||
|
body
|
The updates to apply
|
||||||
|
cascade_owner
|
Whether to change the owner of all descendants to be the same as this folder's
|
||||||
|
cascade_share_status
|
Whether to change the share status of all descendants to be the same as this folder's
|
||||||
|
resp
|
A
insightapi2~httpresponse record into which will be written a description of the response
|
Return value
The response body of the request, if it was of type
insightapi2~folder
Further information
1. Use the
status field of the
resp record to distinguish between different status codes returned by the operation, or the
success attribute to check for 2xx status codes. If the
resp record is not passed to this function, the model will abort with a runtime error if the response's status code does not indicate success. The expected responses from this operation are:
| HTTP Status Code | Response body type | Description |
|---|---|---|
| 200 | insightapi2~folder | The updated folder |
| 403 | The current user was not authorized to update this folder | |
| 404 | insightapi2~error_response | The folder did not exist or was unavailable to the current user |
| 422 | insightapi2~error_response | The requested changes were invalid. For example, the supplied name was too long. |
2. If the response body could be read into a Mosel variable, it would be written to the
body field of the
resp record (and also returned from this function if it was a
insightapi2~folder), and the
bodyfilename field of the
resp record will be an empty string.
3. If the
bodyfilename field of the
resp record is set to a non-empty value on return, this will be a file containing the response body; the caller is responsible for deleting this file when it is no longer required.
Related topics
insightapi2~error_response
insightapi2~folder
insightapi2~insightconfig
insightapi2~httprequest
insightapi2~httpresponse
insightapi2~folder
insightapi2~insightconfig
insightapi2~httprequest
insightapi2~httpresponse
© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
