Skip to main content
Version: 25.03

Star Rating - Get Widget Details

Endpoint​

/o/feedback/widget

Overview​

Returns one widget document by widget_id.

Authentication​

This endpoint accepts requests without API authentication parameters.

If you do send api_key or auth_token, also send app_id. The server then checks the user's rights for that app, and without app_id it answers 401 with No app_id provided.

Permissions​

This endpoint does not enforce role-based feature permission checks.

Request Parameters​

ParameterTypeRequiredDescription
widget_idStringYesWidget ObjectID.
app_idStringOnly with api_key or auth_tokenID of the app the widget belongs to.
nfdBoolean/StringNoIf truthy, increments widget show counter.

Examples​

Read widget details​

/o/feedback/widget?
widget_id=67a3d2f5c1a23b0f4d6c0201

Response​

Success Response​

{
"_id": "67a3d2f5c1a23b0f4d6c0201",
"app_id": "6991c75b024cb89cdc04efd2",
"type": "rating",
"status": true,
"popup_header_text": "Rate this page"
}

Response Fields​

FieldTypeDescription
(root)ObjectFull widget document.
_idStringWidget ID.
statusBooleanActive/inactive status flag.

Error Responses​

  • 401: api_key or auth_token was sent without app_id.
{
"result": "No app_id provided"
}
  • 404: no widget has this widget_id, or widget_id is missing.
{
"result": "Widget not found."
}
  • 500
{
"result": "database error message"
}

Behavior​

  • Converts widget_id to ObjectID and loads widget from feedback_widgets.
  • When nfd is set, increments timesShown counter asynchronously.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.feedback_widgetsWidget sourceReads widget by ID and optionally increments timesShown.