Delete an existing SSH key
DELETE
/ssh_keys/{ssh_key_id}
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/ssh_keys/example"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <credentials>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.wpengineapi.com/v1/ssh_keys/example';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.wpengineapi.com/v1/ssh_keys/example \ --header 'Authorization: Basic <credentials>'Description
This will delete the SSH key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” ssh_key_id
required
string format: uuid
The ID of the SSH key to delete
Responses
Section titled “ Responses ”Deleted
Media type application/json
Bad Request
Media type application/json
Authentication Error
Media type application/json
Not authorized
Media type application/json
Too many requests
Media type application/json
Service unavailable
Media type application/json