BestBi

Bookmark Action

Function: bookmarkAction
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/BestBi/MobileApp/bookmarkAction

Headers:
The request must include the following headers:

  • userCode: Encoded user code to identify the user making the request.
  • customerKey: Encoded customer key used to verify the customer's identity.
  • reportCode: 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 Default.

  • 2: Rename.

  • 3: Remove Default.

  • 4: 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.
  • 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.

  • Request Body Fields:

    • bookmarkId: Identifier of the bookmark to set as default.
  • rename: Renames a bookmark.

  • Request Body Fields:

    • bookmarkId: Identifier of the bookmark to rename.
    • bookmarkName: New name for the bookmark.
  • removedefault: Removes a bookmark from being the default.

  • Request Body Fields:

    • bookmarkId: Identifier of the bookmark to remove as default.
  • 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"
}
  • rename: Confirmation of successful rename.
{
    "message": "Bookmark renamed successfully"
}
  • removedefault: Confirmation of default status removal.
{
    "message": "Bookmark default removed"
}
  • 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.
post/api/BestBi/MobileApp/bookmarkAction

Headers

userCodestring required
customerKeystring required
reportCodestring required

Request body

actioninteger required
bookmarkIdstring required
bookmarkNamestring nullable
bookmarkStatestring nullable
isDefaultboolean nullable

Response

Successful Response

{"stackTrail":"paths:/api/BestBi/MobileApp/bookmarkAction:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.