メインコンテンツへスキップ

Webhook configs

公開日: 2019年6月26日· 更新日: 2023年1月23日

Cover image for: Webhook configs

The webhook config resource is used by the API to send events to your webhook receiver.

An organisation can have a default webook config which is used by all keys within that organisation that don't specify a webhook config of their own.

Attributes

nametypedescription
idwebhook config IDResource identifier.
resourcestring, always webhook_configResource type specifier.
organisationorganisation IDThe organisation the resource belongs to.
urlstringThe url to target when sending events.
secretstringThe shared secret used to verify event signatures.
statestringOne of: new, valid, invalid, deactivated.
date_createddatetimeWhen the resource was created.

Secret

When a webhook config is created, a secret will be generated alongside it that will be used to sign events sent by the API. It is highly recommended that you implement your webhook receiver to verify the signature of incoming events using this secret. For more details on the signature verification procedure see the webhook configuration docs.

States

  • new has just been created or recently updated but not yet tested.
  • valid has passed validation and is ready to be used. An organisation must have at least one webhook config in this state in order to be useable.
  • invalid has failed the validation test. Must be updated or retested.
  • deactivated has been turned off by the owning organisation.

Create POST /configs/webhook

This action will create a webhook_config.test task in order to validate the endpoint details. If the webhook receiver is not yet setup, this test will likely fail and set the config to the invalid state. However, the config can always be re-tested using the test action.

Parameters

nametypedescription
urlrequiredThe URL of your webhook receiver.

Using cURL

curl https://ricloud-api.reincubate.com/configs/webhook \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://www.mywebhook.com/webhooks/"
}'

Using ricloud-py

import ricloud

webhook_config = ricloud.WebhookConfig.create(url='https://www.mywebhook.com/webhooks/')

Retrieve GET /configs/webhook/{webhook_config ID}

Using cURL

curl https://ricloud-api.reincubate.com/configs/webhook/<webhook_config ID> \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

webhook_config = ricloud.WebhookConfig.retrieve(<webhook_config ID>)

List GET /configs/webhook

Webhook configs in the deactivated state are hidden by default and can only be listed by explicit filtering.

Parameters

nametypedescription
statestringFilter webhook configs by their state.
date_createddatetime filterFilter by resource creation date.

Update POST /configs/webhook/{webhook_config ID}

This action will create a webhook_confg.test task in the background to validate any changes made to the config.

The state attribute can only be changed to deactivated in the case you are essentially retiring a config.

Parameters

nametypedescription
urlstringUpdate the URL.
statestringOnly to new or deactivated.

Using cURL

curl https://ricloud-api.reincubate.com/configs/webhook/<webhook_config ID> \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://www.myupdatedwebhook.com/webhooks/",
}'

Using ricloud-py

import ricloud

webhook_config = ricloud.WebhookConfig.update_with_id(
  <webhook_config ID>,
  url='https://www.myupdatedwebhook.com/webhooks/'
)

# OR

webhook_config = ricloud.WebhookConfig.retrieve(<webhook_config ID>)

webhook_config.update(url='https://www.myupdatedwebhook.com/webhooks/')

Test POST /configs/webhook/{webhook_config ID}/test

This action creates a webhook_config.test task which sends a test event using the specified configuration. The outcome of the test will update the state attribute of the webook configuration accordingly.

Using cURL

curl https://ricloud-api.reincubate.com/configs/webhook/<webhook_config ID>/test \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

test_task = ricloud.WebhookConfig.test_with_id(<webhook_config ID>)

# OR

webhook_config = ricloud.WebhookConfig.retrieve(<webhook_config ID>)

test_task = webhook_config.test()

関連記事

お困りですか?

すべてのお問い合わせに1営業日以内に返信するよう努めています。

support@reincubate.com
King's Award for Enterprise のロゴ

King's Award for Enterprise:Reincubate は英国最高峰の公式ビジネス表彰を4度受賞しており、直近では過去3年間にわたる同社の卓越した成長が評価されました。

ユーザーやパートナーとの関係は、私たちの価値観と開発する製品の中心にあります。レビュー をご覧いただき、皆さまの声をお聞きください。

Centre for Assessment による ISO 27001 認証取得、UKAS 認定

© 2008-2026 Reincubate Ltd. 無断複写・転載を禁じます。イングランドおよびウェールズ登記番号 5189175、VAT 番号 GB151788978。Camo®、Streamlight®、Reincubate® は登録商標です。特許出願中。

ヘルプ