Appearance
Webhooks
Our platform allows you to create custom webhook triggers that deliver real-time notifications to your device. These webhooks are designed to be flexible, allowing you to tailor them to your specific needs and integrate seamlessly with your existing systems.
Webhook Structure
The base URL for our webhook triggers is:
https://justshare.me/trigger/alert/?code=your-host-code
To activate a trigger, you'll append query parameters to this URL. The core parameter is code
, which is mandatory. Additionally, you can include optional parameters like user
and ip
.
Here's a breakdown of the parameters:
code=[code]
(Mandatory):- This parameter represents a unique, system-generated identifier for your trigger. When you create a new host within our app, a unique code is automatically assigned to that host.
- This ensures that each host has a distinct trigger, preventing conflicts and enabling precise notification routing.
- Example:
code=CD123123
user=[user]
(Optional):- This parameter allows you to include user-specific information, such as a username or user ID.
- Example:
user=john.doe
ip=[ip]
(Optional):- This parameter includes the IP address associated with the event, which can be useful for security or logging purposes.
- Example:
ip=192.168.1.1
Example Webhook URL:
https://justshare.me/trigger/alert/?code=CD123123&user=alice&ip=192.168.1.1
Setting Up and Customizing Webhooks
- Create a New Host (Automatic Code Generation):
- Within our app, create a new host. The system will automatically generate a unique code for this host.
- This code will be displayed to you within the app, and should be copied and saved for later use.
- Optional Parameters:
- Determine if you need to include
user
orip
parameters. These parameters can provide valuable context for your notifications.
- Determine if you need to include
- Construct the URL:
- Combine the base URL with the necessary query parameters to create your complete webhook URL.
- Notification Templates:
- Within our app, you can create notification templates that define the content of your notifications.
- Use placeholders like
[name]
,[user]
, and[ip]
within your templates to dynamically insert the values from your webhook parameters. [name]
is a placeholder refering to the name of your host in the app.- Example: a title of: "Alert: [name] for User: [user] At [ip]"
- Trigger the Webhook:
- Implement the webhook URL in your application or system. When the relevant event occurs, your system should send an HTTP GET request to the webhook URL.
- Receive the Notification:
- Your device will receive the notification, which will contain the customized data based on your template and the provided parameters.
Use Cases
Here are a few examples of how you can use webhook triggers:
- Security Alerts:
- Trigger a webhook when a suspicious login attempt is detected.
- Include the user's IP address for investigation.
- System Monitoring:
- Use webhooks to monitor system performance and receive alerts when specific thresholds are exceeded.
- You could use the
[name]
placeholder to denote which server the alert is coming from.
- Custom Notifications:
- Use the code parameter to alert when a specific file has been shared, or when a document has been edited.
- User activity tracking:
- Log user actions, like file downloads, or page visits, with the code, user, and ip parameters.
- Backup Completion Notifications:
- Receive instant notifications via webhooks when backup or restore operations are completed, ensuring timely awareness of data protection activities.
- Deployment Success/Failure Notifications:
- Track deployment progress and identify issues early by configuring webhooks to trigger at key stages of your CI/CD pipeline, providing real-time success or failure feedback.
Tips for Success:
- Use descriptive names for your hosts in the app.
- Use the optional parameters to provide as much context as possible.
- Customize your notifications with placeholders to provide additional content.
- Test your webhook triggers thoroughly to ensure they are working correctly.