-
Notifications
You must be signed in to change notification settings - Fork 0
Folder methods
This endpoint is used to add a new folder to the system. The user needs to provide a valid token and the desired folder name for creating a new folder.
The request should be a JSON object containing the following fields:
-
token(string, required): A valid authentication token. -
folderName(string, required): The desired name for the new folder.
Example:
{
"token": "example_token",
"folderName": "example_folder"
}If the folder creation is successful, the server will return a JSON object with the following fields:
-
folderId(number): The unique identifier of the newly created folder. -
message(string): A success message indicating that the folder was successfully created. -
isSuccess(boolean): A boolean value indicating whether the folder creation was successful or not.
Example:
{
"folderId": 1234,
"message": "Folder 'example_folder' created successfully.",
"isSuccess": true
}This endpoint is used to delete a folder from the system. The user needs to provide a valid token and the ID of the folder to be deleted.
The request should be a JSON object containing the following fields:
-
token(string, required): A valid authentication token. -
folderId(number, required): The ID of the folder to be deleted.
Example:
{
"token": "example_token",
"folderId": 1234
}If the folder deletion is successful, the server will return a JSON object with the following fields:
-
message(string): A success message indicating that the folder was successfully deleted. -
isSuccess(boolean): A boolean value indicating whether the folder deletion was successful or not.
Example:
{
"message": "Folder with ID 1234 has been deleted successfully.",
"isSuccess": true
}This endpoint is used to rename a folder in the system. The user needs to provide a valid token, the ID of the folder to be renamed, and the new name for the folder.
The request should be a JSON object containing the following fields:
-
token(string, required): A valid authentication token. -
folderId(number, required): The ID of the folder to be renamed. -
newFolderName(string, required): The new name for the folder.
Example:
{
"token": "example_token",
"folderId": 1234,
"newFolderName": "new_folder_name"
}If the folder renaming is successful, the server will return a JSON object with the following fields:
-
folderId(number): The ID of the renamed folder. -
message(string): A success message indicating that the folder was successfully renamed. -
isSuccess(boolean): A boolean value indicating whether the folder renaming was successful or not.
Example:
{
"folderId": 1234,
"message": "Folder with ID 1234 has been renamed to 'new_folder_name' successfully.",
"isSuccess": true
}The purpose of this endpoint is to retrieve information about a specific folder in the system. The user must provide a valid token and the ID of the folder they want to get information about.
The request must be a JSON object that includes the following fields:
-
token(string, required): A valid authentication token. -
folderId(number, required): The ID of the folder to get information about.
Example:
{
"token": "example_token",
"folderId": 0
}If the request is successful and the folder exists in the system, the server will respond with a JSON object containing the following fields:
-
message(string): A success message indicating that the folder information has been retrieved successfully. -
isSuccess(boolean): A boolean value indicating whether the folder retrieval was successful or not.
Example:
{
"message": "Folder information retrieved successfully.",
"isSuccess": true
}The purpose of this endpoint is to retrieve information about all folders in the system. The user must provide a valid token.
The request must be a JSON object that includes the following field:
-
token(string, required): A valid authentication token.
Example:
{
"token": "example_token"
}If the request is successful, the server will respond with a JSON object containing the following fields:
-
folders(array): An array of objects, each representing a folder in the system. Each object will have the following fields:-
id(number): The ID of the folder. -
name(string): The name of the folder.
-
-
message(string): A success message indicating that the folder information has been retrieved successfully. -
isSuccess(boolean): A boolean value indicating whether the folder retrieval was successful or not.
Example:
{
"folders": [
{
"id": 0,
"name": "folder1"
},
{
"id": 1,
"name": "folder2"
},
{
"id": 2,
"name": "folder3"
}
],
"message": "Folder information retrieved successfully.",
"isSuccess": true
}