Deleting a Deploy Key
Function
This API is used to delete a deploy key.
URI
DELETE /v2/repositories/{repository_id}/deploy-keys/{key_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key_id | Yes | Integer | Explanation: Deploy key ID, which can be obtained by calling the Adding a Deployment Key API. Constraints: N/A Range: 1–2147483647 Default value: N/A |
| repository_id | Yes | Integer | Explanation: Repository ID. Constraints: N/A Range: 1–2147483647 Default value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Explanation: User token. It can be obtained by calling the corresponding Obtaining a User Token. The value of X-Subject-Token in the response header is the user token. Constraints: N/A Range: The value is a string of 1–100,000 characters. Default value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| error | Error object | Explanation: Response error code. Range: N/A |
| result | Boolean | Explanation: Response result. Range: N/A |
| status | String | Explanation: Response status. Range:
|
Example Requests
DELETE https://{endpoint}/v2/repositories/{repository_id}/deploy-keys/{key_id} Example Responses
Status code: 200
OK
{
"result" : "false",
"status" : "success"
} Status Code
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.