Folder

Clone Folder

Clone Folder

This endpoint allows the user to clone a folder by making an HTTP POST request to the specified URL.

Request Body

  • folderId (string) - The ID of the folder to be cloned.

  • name (string) - The name of the new folder.

  • description (string) - The description of the new folder.

  • defaultAssignTo (string) - The default assignee for the new folder.

  • isSaveDefaultView (boolean) - Indicates whether the default view should be saved.

Response

The response of this request is a JSON object with the following schema:

{
 "type": "object",
 "properties": {
 "status": {
 "type": "string"
 },
 "data": {
 "type": "object",
 "properties": {
 "folderId": {
 "type": "string"
 },
 "message": {
 "type": "string"
 }
 }
 }
 }
}

Example Response

{
 "status": "",
 "data": {
 "folderId": "",
 "message": ""
 }
}

post/folder/clone

Request

  • Base URL: https://api.speakai.co/v1
  • URL: https://api.speakai.co/v1/folder/clone
  • Auth: API key in header x-speakai-key and API key in header x-access-token

Request body

folderIdstring required

The ID of the folder you want to copy. Required. Empty string and null are not accepted.

namestring

The name for the new copy. Leave it out and the server names the copy "<original folder name> (Clone)". Optional. Empty string and null are accepted. An empty string is treated as absent by the handler, because it falls back on a falsy check.

descriptionstring

A description for the new copy. Leave it out and the original folder's description is carried over, falling back to an empty string. Optional. Empty string and null are accepted. An empty string is treated as absent by the handler, because it falls back on a falsy check.

defaultAssignTostring

A single user ID to assign the copy to. Use assignTo instead. When you send this and omit assignTo, the server wraps the value into a one-item assignTo array. Optional. Empty string and null are accepted. No default is declared.

assignTostring[]

The user IDs you want the new copy assigned to. The copy does not inherit the original folder's assignment list, so send this if you want the assignment carried over. Optional. No cap on the number of entries. The schema declares a default of an empty array, but that default never reaches the handler; omitting assignTo is what lets defaultAssignTo take effect.

isSaveDefaultViewboolean

Whether to copy the source folder's default view onto the new folder. Send true explicitly if you want the view copied. Optional. The schema declares a default of true, but the middleware discards the schema's converted value, so an omitted isSaveDefaultView reaches the handler as undefined and the default view is not copied. There is no model-level default to fall back on here, because the flag only gates a branch in the handler.

Response

OK

statusstring

Changes

No recorded changes to this operation across all 2 revisions of this API.