Update a Webhook

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Update an existing webhook.

Security: Requires an admin user

Usage: PUT /xray/api/v1/webhooks/{name}

Consumes: application/json

Produces: application/json

Required Parameters:

Parameter

Type

Description

url

string

Platform URL

description

string

Webhook description

Use_proxy (optional)

boolean

Optional, Default is false

Auth (optional)

Parameter

Type

Description

user_name

string

Optional User name

password

string

Optional password

Headers (optional) - you can have as many as you want.

Parameter

Type

Description

name

string

Optional Name of webhook header

Response codes:

Status code

Description

200

OK

404

Webhook is not found.

400

<<Invalid Input>> The message could vary,

  1. Failed to parse the request body.

  2. Webhook data is not valid, either Url is not valid or Name contains special characters.

  3. Mandatory fields missing

409

  1. Webhook with URL already exists.(When the same URL is reused)

401

Insufficient privileges, you need a user with admin privileges to update a webhook

500

Failed to update the webhook. Internal server issues.

Sample request:

{

"url": "http://somehost", //required

"description": "",

"use_proxy": false, // Optional, Default is false

"auth": { //Optional

"user_name": "",

"password": ""

},

"headers": { // Optional, underlying type is a map, so you can have as many as you want.

"name": "value"

}

}

Successful response:

{

"info": "Webhook has been successfully updated"

}