DeletePushRule - Delete a push rule
Deletes a specified push rule.
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
- Obtain an endpoint. Use this endpoint to replace {domain} in the request syntax.
- Obtain a personal access token.
- Obtain the organizationId. Required for Central only. You can obtain the organization ID from the Basic Information page in the Organization Management console.
|
Product |
Resource |
Required permission |
|
Code Management |
Push rule |
Read and write |
Request syntax
Central edition
DELETE https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/pushRules/{pushRuleId}
Region edition
DELETE https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/pushRules/{pushRuleId}
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 |
Position |
Required |
Description |
Example |
|
organizationId |
string |
path |
|
Organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
Repository ID or URL-encoded full path of the repository. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
pushRuleId |
integer |
path |
Yes |
Push rule ID. |
1 |
Request examples
Central edition
curl -X 'DELETE' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489/pushRules/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'DELETE' \
'https://{domain}/oapi/v1/codeup/repositories/{repository_id_or_encoded_path}/pushRules/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
object |
|
|
| result |
boolean |
Whether the request was successful. |
true |
Response example
{
"result": true
}
Error codes
For more information about API error codes, see Error Code Center.