Inbound Webhooks
هذا المحتوى غير متوفر بلغتك بعد.
Inbound webhooks let external systems trigger an Agent Context data refresh. When your source data changes (e.g., a Parquet file on S3 is updated), call the webhook URL and all materialized view caches are rebuilt.
How It Works
Section titled “How It Works”Your System (S3, ETL, cron) | | POST https://api.rebyte.ai/api/hooks/cl/clwh_... | vAgent Context refreshes all view caches from source dataOne webhook per organization. It triggers a refresh for all views.
Finding Your Webhook URL
Section titled “Finding Your Webhook URL”Open any view in the Agent Context view editor. The webhook URL is shown below the description field with a Copy button.
The webhook is automatically created for your organization the first time you access it — no setup required.
Triggering a Refresh
Section titled “Triggering a Refresh”Send a POST request to the webhook URL. No body, no headers required:
curl -X POST https://api.rebyte.ai/api/hooks/cl/clwh_your_token_hereReturns 200 OK when the refresh completes.
Example: S3 Event Notification
Section titled “Example: S3 Event Notification”Automatically refresh views when a Parquet file changes on S3:
- Copy your webhook URL from the view editor
- In the AWS Console, open your S3 bucket settings
- Create an Event Notification for
s3:ObjectCreated:*on the relevant prefix - Route to an SNS topic or Lambda function
- Have it POST to your webhook URL
Now when your Parquet file is updated, Agent Context automatically re-materializes all views.
Example: GitHub Actions
Section titled “Example: GitHub Actions”Refresh after a data pipeline completes:
jobs: etl: runs-on: ubuntu-latest steps: - name: Run ETL pipeline run: python pipeline.py
- name: Refresh Agent Context run: | curl -X POST ${{ secrets.REBYTE_WEBHOOK_URL }}Example: Cron Job
Section titled “Example: Cron Job”Refresh on a custom schedule using cron:
# Refresh every day at 6 AM0 6 * * * curl -X POST https://api.rebyte.ai/api/hooks/cl/clwh_your_token_hereRate Limiting
Section titled “Rate Limiting”Webhooks are rate-limited to one trigger per 30 seconds. If called more frequently, the extra calls are silently ignored. This prevents accidental flooding from chatty event sources.
Authentication
Section titled “Authentication”The token in the URL is the authentication. No additional headers are needed. The webhook endpoint is unauthenticated — anyone with the URL can trigger a refresh.
If a token is compromised: delete the webhook and a new one will be auto-created on your next visit to the view editor with a fresh token.
Relationship to Refresh Schedule
Section titled “Relationship to Refresh Schedule”Inbound webhooks and refresh schedules work independently:
| Refresh Schedule | Inbound Webhook | Result |
|---|---|---|
| Every hour | Not used | Auto-refreshes hourly |
| Manual only | Used | Refreshes only when webhook is called |
| Every hour | Also used | Auto-refreshes hourly AND on-demand via webhook |
They don’t interfere with each other. A webhook trigger resets the refresh timer, so the next scheduled refresh happens a full interval after the webhook-triggered refresh.