GetWebHook - Query Webhook
Queries the details of a specified webhook.
|
Applicable editions |
Central edition, Region edition |
Endpoints and Authorization Information
- Retrieve endpoints: Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Retrieve organizationId: Required only for Central edition. Go to the Basic Information page in the Organization Management console to retrieve the organization ID.
|
Product |
Resource |
Required Permissions |
|
Code Management |
Webhook |
read-only |
Request Syntax
Central edition
GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/webhooks/{hookId}
Region edition
GET https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/webhooks/{hookId}
Request Headers
|
Parameter |
Type |
Required |
Description |
Example Value |
|
x-yunxiao-token |
string |
Yes |
Personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request Parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example Value |
|
organizationId |
string |
path |
|
Organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
Repository ID or URL-encoded full path. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
hookId |
integer |
path |
Yes |
Webhook primary key ID. |
1 |
Request Examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/webhooks/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/webhooks/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response Parameters
|
Parameter |
Type |
Description |
Example Value |
| - |
object |
|
|
| createdAt |
string |
Creation time. |
2024-10-05T15:30:45Z |
| description |
string |
Webhook description. |
Description content |
| enableSSLVerification |
boolean |
Whether SSL verification is enabled. |
false |
| id |
integer |
Webhook primary key ID. |
1 |
| mergeRequestEvents |
boolean |
Whether merge request events trigger this webhook. |
true |
| noteEvents |
boolean |
Whether note events trigger this webhook. |
true |
| pushEvents |
boolean |
Whether push events trigger this webhook. |
true |
| repositoryId |
integer |
Repository ID. |
1 |
| tagPushEvents |
boolean |
Whether tag push events trigger this webhook. |
true |
| token |
string |
User-defined token for identity verification. |
xxx |
| updatedAt |
string |
Update time. |
2024-10-05T15:30:45Z |
| url |
string |
Webhook URL. |
http://example/example |
Response Example
{
"createdAt": "2024-10-05T15:30:45Z",
"description": "Description content",
"enableSSLVerification": false,
"id": 1,
"mergeRequestEvents": true,
"noteEvents": true,
"pushEvents": true,
"repositoryId": 1,
"tagPushEvents": true,
"token": "xxx",
"updatedAt": "2024-10-05T15:30:45Z",
"url": "http://example/example"
}
Error Codes
For API error codes, see Error Code Center.