The REST API can be used to build a custom integration into any existing application. Most of the actions you find within Starmind can be also used for integration over our API.
Webhooks allow you to build or set up integrations that subscribe to certain events within Starmind. For example, every time a notification is sent in Starmind, we will notify the subscriber that the event happened.
You can find the Documentation of the Starmind QA API here:
Starmind REST API
Webhooks can be configured in the admin area within Starmind (https://yourdomain.starmind.com/admin/settings/web-hook/):
|Webhook URL||✓||The URL handles the payload.|
|Shared secret||X||A secret key to sign the payload.|
|Events||✓||A comma-separated list of supported webhook events. Currently, only "notifications" are supported.|
Each event type has a specific payload format with the relevant event information.
In addition to the fields documented for each event, webhook payloads include the user who performed the event ( sender) as well as the user who is targeted by the event (receiver). Both fields are optional and depend on the event type and specific event.
Bear in mind that the payload for notification events like new_solution_to_your_question or new_comment_to_your_question allows question posers to be identified. In order to preserve question poser anonymity, this information must not be leaked to any end-users (except for the question poser himself).
HTTP requests made to your webhook’s configured URL endpoint will contain several special headers:
|X-Starmind-Event||Name of the event that triggered this delivery.|
|X-Starmind-Signature||HMAC hex digest of the payload, using the hook’s secret as the key (if configured).|
Also, the User-Agent for the requests will have the prefix Starmind-Brainshot/ Version.
|question_id||integer||Question id the notification relates to (or null).|
|target_id||integer||Id of the entity the notification relates to.|
|target_type||string||Type of the entity the notification relates to.|
|target_object||JSON||The JSON Object representation of the entity the notification relates to.|
|url||URL||Absolute URL to the Starmind application.|
|icon||URL||Absolute URL to an image for that notification.|
|is_read||boolean||Whether the user (receiver) has already read that notification.|
|created||datetime||The DateTime the notification was created.|
Updated 5 months ago