Hook

Test hook

Test a hook with custom payload. Test endpoint will return result generated by the specified Hook which would be normally processed by Rossum.

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

Path parameters

hookIDinteger required

A unique integer value identifying this hook.

Request body

configobject

You can override default configuration of hook being executed. The runtime attribute is required for function hook if custom config is set.

payloadobject required

Payload sent to the Hook, please note only supported combination of action and event can be passed.

Example request

{
  "config": {
    "insecure_ssl": true,
    "code": "exports.rossum_hook_request_handler = ..."
  },
  "payload": {
    "action": "started",
    "event": "annotation_content",
    "annotation": {},
    "document": {},
    "settings": {}
  }
}

Response

OK

responseobject

Response from the hook.

Example response

{
  "response": {
    "messages": [],
    "operations": []
  }
}

Changes

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