Hook

Duplicate hook

Duplicate a hook object. hook.queues is not copied by default, but can be copied using the copy_queues option. Duplicated hook is always inactive (hook.active = False).

post/api/v1/hooks/{hookID}/duplicate

Path parameters

hookIDinteger required

A unique integer value identifying this hook.

Request body

namestring required

Name of the duplicated hook.

copy_secretsboolean

Whether to copy secrets.

copy_dependenciesboolean

Whether to copy dependencies. If enabled, this option copies the dependency relations of the original hook. It duplicates the run_after references to preserve which hooks the original hook depended on, and it also updates all hooks that previously depended on the original hook to reference the new duplicated one. This ensures that both dependency directions—"runs after" and "is run after by"—are correctly maintained.

copy_queuesboolean

Whether to copy queue assignments from the original hook to the duplicated hook.

Response

Created

OR

Example response

{
  "id": 1500,
  "type": "webhook",
  "name": "Change of Status",
  "url": "https://example.rossum.app/api/v1/hooks/1500",
  "queues": [
    "https://example.rossum.app/api/v1/queues/8199",
    "https://example.rossum.app/api/v1/queues/8191"
  ],
  "run_after": [],
  "integration_credentials": [],
  "active": true,
  "events": [
    "annotation_status.changed"
  ],
  "sideload": [
    "queues"
  ],
  "metadata": {
    "some_key": "some_value"
  },
  "token_owner": "https://example.rossum.app/api/v1/users/2",
  "token_lifetime_s": 1000,
  "test": {
    "saved_input": {}
  },
  "description": "This hook does...",
  "extension_source": "custom",
  "settings": {},
  "settings_schema": {
    "type": "object",
    "properties": {}
  },
  "secrets": {},
  "secrets_schema": {
    "type": "object",
    "additionalProperties": {
      "type": "string"
    }
  },
  "guide": "Here we explain how the extension should be used.",
  "read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
  "extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
  "hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
  "created_by": "https://example.rossum.app/api/v1/users/2",
  "created_at": "2020-01-01T09:05:50.213451Z",
  "modified_by": "https://example.rossum.app/api/v1/users/10775",
  "modified_at": "2021-04-26T10:08:03.856648Z",
  "config": {
    "url": "https://myq.east-west-trading.com/api/hook1?strict=true",
    "secret": "secret-token",
    "client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
    "client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
    "schedule": {
      "cron": "*/10 * * * *"
    },
    "timeout_s": 30,
    "retry_count": 4,
    "max_polling_time_s": 300,
    "retry_after_polling_failure": true,
    "app": {
      "url": "https://myq.east-west-trading.com/api/hook1?strict=true",
      "settings": {},
      "display_mode": "drawer"
    }
  }
}

Changes

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