Delete SFTP user
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/sftp_users/install-developer"
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/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/sftp_users/install-developer';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/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/sftp_users/install-developer \ --header 'Authorization: Basic <credentials>'Deletes an SFTP user from the install.
Limitations & Warnings
- Not available for Autoscale accounts. Returns 403 for Autoscale accounts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of install
Example
294deacc-d8b8-4005-82c4-0727ba8ddde0Username of the SFTP user
Example
install-developerResponses
Section titled “Responses”No Content
Authentication Error
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Bad Credentials"}Not authorized (install not found, no access, or Autoscale account)
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "You don't have permission to perform that action"}Not found (SFTP user not found)
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Not Found"}Too many requests
Internal Server Error
object
A message regarding the error that occurred on the server
Example
{ "message": "An unexpected error occurred, please try again in a few minutes"}An invalid response was received from an upstream server
Service unavailable