Bookmark Action
Function: bookmark_action
Type: API Endpoint (POST)
Purpose:
This API endpoint allows the user to perform various actions on bookmarks, including creating, fetching, listing, setting as default, renaming, removing default, and deleting a bookmark.
Endpoint:
POST http://<baseURL>/api/MobileApp/bookmark_action
Headers:
The request must include the following headers:
- User-Code: Encoded user code to identify the user making the request.
- Customer-Key: Encoded customer key used to verify the customer's identity.
- Report-Code: Encoded user code to identify the report to bookmark.
Request Parameters:
The request should specify an action parameter to indicate the operation to be performed on the bookmark. The possible values and required fields in the JSON request body are:
Action Help Info:
-
0: Create.
-
1: Set/Remove Default.
-
2: Rename.
-
3: Delete Bookmark.
-
create: Creates a new bookmark.
-
Request Body Fields:
- bookmarkId: Bookmark identifier.
- bookmarkName: User-friendly name for the bookmark.
- bookmarkState: State information for the bookmark.
- isDefault: Change the bookmark to default or not default.
-
fetch: Retrieves a specific bookmark’s state.
-
Request Body Fields:
- bookmarkId: Identifier of the bookmark to be fetched.
-
list: Lists all bookmarks associated with a report.
-
Request Body Fields:
- reportname: Name of the report for which bookmarks should be listed.
-
setdefault: Sets a bookmark as the default or not default.
-
Request Body Fields:
- bookmarkId: Identifier of the bookmark to set as default or not default.
-
rename: Renames a bookmark.
-
Request Body Fields:
- bookmarkId: Identifier of the bookmark to rename.
- bookmarkName: New name for the bookmark.
-
delete: Deletes a bookmark.
-
Request Body Fields:
- bookmarkId: Identifier of the bookmark to delete.
Response:
Returns a JSON response with a status message based on the result of the action.
Response Structure:
The response format varies based on the action:
- create: Confirmation of bookmark creation.
{
"message": "Bookmark created successfully"
}
- fetch: Returns the state of the requested bookmark.
{
"data": "<Bookmark_State>"
}
- list: List of all bookmarks for a specific report.
{
"data": [
{
"Bookmark_Id": "<bookmark_id>",
"Bookmark_Name": "<bookmark_name>",
"Isdefault": <default_status>
}
]
}
- setdefault: Confirmation of bookmark being set as default.
{
"message": "Bookmark set as default"
"message": "Bookmark default removed"
}
- rename: Confirmation of successful rename.
{
"message": "Bookmark renamed successfully"
}
- delete: Confirmation of deletion.
{
"message": "Bookmark deleted successfully"
}
Notes:
- Ensure userCode, customerKey and reportCode headers are valid and provided for the request to succeed.
- Each action must be accompanied by the correct body fields, and missing fields will result in an error.
- This endpoint is intended for managing user-specific bookmarks within the application.
Headers
Request body
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.