Creating a Project Hook
Function
This API is used to create a project hook.
The request header parameter X-Repo-Auth needs to be added for this API. Its value is the name of the OAuth authorization created in Creating OAuth Authorization.
Request
Request parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| secret | String | Yes | Character string used to verify received payloads. |
| url | String | Yes | URL that is called back when a hook is triggered. |
Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| id | String | Hook ID. |
| type | String | Hook type. |
| callback_url | String | Callback URL. |
Example
Example request
{
"secret": "string",
"url": "string"
} Example response
{
"id": "string",
"type": "string",
"callback_url": "string"
} Status Code
| HTTP Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
Error code must be in the format of SVCSTG.REPO.[Error_ID]. Example: SVCSTG.REPO.0401. See ServiceStage Error Codes.
Last Article: Obtaining a Project Hook
Next Article: Deleting a Project Hook
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.