Account Webhooks

This contains APIs for Account Webhooks.

Lists all the Webhooks at Account level

Lists webhooks

Securityx-api-key
Request
query Parameters
page
integer
Default: 0

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page

limit
integer <= 1000
Default: 20

Number of items to return per page.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json

List webhooks request

webhook_type
string
Enum: "GIT" "GENERIC" "SLACK" "EVENT_BRIDGE_TRIGGER"
Responses
200

Example response

post/v1/webhooks/list
Request samples
application/json
{
  • "webhook_type": "GIT"
}
Response samples
application/json
[
  • {
    }
]

Create a webhook at Account level

Create webhooks at account level

Securityx-api-key
Request
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json

Create webhook request

webhook_identifier
required
string^[0-9a-zA-Z-_ ]{0,127}$
webhook_name
required
string
required
object (WebhookSpec)

Details of the Webhook defined in Harness

Responses
201

Example response

post/v1/webhooks
Request samples
application/json
{
  • "webhook_identifier": "string",
  • "webhook_name": "string",
  • "spec": {
    }
}
Response samples
application/json
{
  • "webhook_identifier": "string"
}

Fetch Webhook at Account level

Fetch Webhook at Account level

Securityx-api-key
Request
path Parameters
webhook
required
string

Webhook identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/webhooks/{webhook}
Request samples
Response samples
application/json
{
  • "webhook_identifier": "string",
  • "webhook_name": "string",
  • "is_enabled": true,
  • "event_trigger_time": 0,
  • "spec": {
    }
}

Updates a Webhook at Account level

Updates a Webhook at Account level

Securityx-api-key
Request
path Parameters
webhook
required
string

Webhook identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json

Update webhook request

webhook_name
required
string
is_enabled
required
boolean
required
object (WebhookSpec)

Details of the Webhook defined in Harness

Responses
200

Example response

put/v1/webhooks/{webhook}
Request samples
application/json
{
  • "webhook_name": "string",
  • "is_enabled": true,
  • "spec": {
    }
}
Response samples
application/json
{
  • "webhook_identifier": "string"
}

Deletes a Webhook at account level

Deletes a Webhook at account level

Securityx-api-key
Request
path Parameters
webhook
required
string

Webhook identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
204

No Content

delete/v1/webhooks/{webhook}
Request samples