webhook

Create project webhook policy.

This endpoint create a webhook policy if the project does not have one.

post/projects/{project_name_or_id}/webhook/policies

Path parameters

project_name_or_idstring required

The name or id of the project

Headers

X-Request-Idstring

An unique ID for the request

X-Is-Resource-Nameboolean

The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name.

Request body

idinteger

The webhook policy ID.

namestring

The name of webhook policy.

descriptionstring

The description of webhook policy.

project_idinteger

The project ID of webhook policy.

event_typesstring[]
creatorstring

The creator of the webhook policy.

creation_timestring date-time

The create time of the webhook policy.

update_timestring date-time

The update time of the webhook policy.

enabledboolean

Whether the webhook policy is enabled or not.

Example request

{
  "targets": [
    {
      "payload_format": "CloudEvents"
    }
  ]
}

Response

Project webhook policy create successfully.

Changes

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