Edit

Edit an existing event hook

It is only allowed to edit an event hook that you created: if the event hook was created by a user, that user must be used to edit the event hook, and if the event hook was created by an application, that application must be used to edit the event hook. If that application is used to create user sessions, the event hook can not be edited when a user session is active.

Tokens

This action requires the following tokens:

  • eventhook-manage

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
eventhook Hash   ID of the event hook to edit
event String   If given, the new name of the event to hook to using this event hook
type String   If given, the new type of this event hook
target String   If given, the new target of this event hook

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash ID of this event hook
event String Name of the event this event hook reacts on
account

Account that this event hook reacts on; if not set, this event is not limited to an account

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
type String Label of the type of this event hook
target String Target of this event hook
createduser

If set, the user that created this event hook

The value of this field is an object containing the following fields:

Name Type Description
id Hash User ID
username String User name
createdapplication

If set, the application that created this event hook

The value of this field is an object containing the following fields:

Name Type Description
id Hash Application ID
name String Application name
description String Application description
iplock IP Mask IP-lock data for this application
datecreated DateTime When the application was created
datemodified DateTime When the application was last modified
active Boolean Whether this application is active
account Hash Account for this application
customer Hash Customer for this application
timezone TimeZone Timezone for this application

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_EVENT_HOOK_NOT_FOUND (160)
The given ID does not correspond to a known event hook in the currently active account.
STATUS_ACCESS_DENIED (4)
You are not allowed to delete this event hook, because you do not have the correct token or you did not specify the correct actor information.
STATUS_EVENT_NOT_FOUND (150)
The given event name is not a known event.
STATUS_EVENT_HOOK_TYPE_NOT_FOUND (170)
The given event hook type is not known.
STATUS_EVENT_HOOK_INVALID_TARGET (161)