webhooks

Изменить вебхук

Изменить подписку: адрес, состав объектов, события, окно, фильтры, включённость. Передавайте только то, что меняется.

patch/v3/webhooks/{webhook_id}

Request

  • Base URL: https://api.rewio.ru
  • URL: https://api.rewio.ru/v3/webhooks/{webhook_id}
  • Auth: API key in header X-API-Key

Path parameters

webhook_idinteger required

Request body

targetstring nullable

Новый адрес доставки.

object_idsinteger[] nullable

Новый список объектов.

event_typesstring[] nullable

Новый набор событий.

bucket_windowstring nullable

Delivery cadence. immediate — one POST shortly after each scrape batch; daily_<hour> — one digest per day at the given UTC hour (0–23), e.g. daily_9 = 09:00 UTC, daily_14 = 14:00 UTC.

is_activeboolean nullable

Включить или выключить подписку.

Example request

{
  "bucket_window": "immediate",
  "filters": {
    "allowed_ratings": [
      1,
      2
    ],
    "allowed_sources": [
      "yandex_maps"
    ],
    "has_images": false,
    "has_text": true
  }
}

Response

Successful Response

idinteger required

Идентификатор подписки.

targetstring required

Адрес доставки.

object_idsinteger[] nullable

Объекты, по которым приходят события. null — по всем.

event_typesstring[] required

События подписки.

bucket_windowstring required

Окно группировки событий в одну доставку.

is_activeboolean required

Включена ли подписка.

failure_countinteger required

Сколько неудачных доставок подряд.

last_failure_atstring date-time nullable

Момент последней неудачи (UTC, ISO 8601).

created_atstring date-time required

Момент создания подписки (UTC, ISO 8601).

updated_atstring date-time required

Момент последнего изменения (UTC, ISO 8601).

Example response

{
  "filters": {
    "allowed_ratings": [
      1,
      2
    ],
    "allowed_sources": [
      "yandex_maps"
    ],
    "has_images": false,
    "has_text": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.