Webhooks

add webhooks

POST https://ushahididocs.api.ushahidi.io/api/v3/webhooks

Request Body

{
    "id": 6,
    "url": "http://services.nationalmap.gov/ArcGIS/services/NEXRAD_Weather/MapServer/WMSServer",
    "user": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/users/1"
    },
    "form_id": null,
    "name": "test",
    "shared_secret": "test123estfds78#43fds",
    "webhook_uuid": "4472f128-4448-482a-b279-5a218d3ce559",
    "event_type": "create",
    "entity_type": "post",
    "source_field_key": null,
    "destination_field_key": null,
    "created": "2022-11-02T20:00:00+00:00",
    "updated": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

edit webhooks

PUT https://ushahididocs.api.ushahidi.io/api/v3/webhooks/2

Request Body

{
    "id": 6,
    "url": "http://services.nationalmap.gov/ArcGIS/services/NEXRAD_Weather/MapServer/WMSServer",
    "user": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/users/1"
    },
    "form_id": null,
    "name": "test",
    "shared_secret": "test123estfds78#43fds",
    "webhook_uuid": "4472f128-4448-482a-b279-5a218d3ce559",
    "event_type": "create",
    "entity_type": "post",
    "source_field_key": null,
    "destination_field_key": null,
    "created": "2022-11-02T20:00:00+00:00",
    "updated": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

edit a webhook post

PUT https://ushahididocs.api.ushahidi.io/api/v3/webhooks/posts/96

Request Body

{
  "id": 0,
  "url": "string",
  "user_id": 0,
  "parent_id": 0,
  "form_id": 0,
  "title": "string",
  "content": "string",
  "message": "string",
  "color": "string",
  "type": "string",
  "slug": "string",
  "author_email": "string",
  "author_realname": 0,
  "status": "string",
  "created": "string",
  "updated": "string",
  "locale": "string",
  "values": [
    "string"
  ],
  "post_date": "string",
  "tags": [
    "string"
  ],
  "published_to": [
    0
  ],
  "completed_stages": [
    0
  ],
  "sets": [
    0
  ],
  "lock": "string",
  "source": "string",
  "data_source_message_id": "string",
  "allowed_privileges": [
    "string"
  ]
}