Cancel build
POST
/v1/accounts/{account}/apps/{app}/environments/{environment}/builds/{build}:cancel
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/builds/example:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <credentials>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/builds/example:cancel';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/builds/example:cancel \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{}'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”account
required
string
Name of your WP Engine Headless Platform account
app
required
string
Name of your Headless Platform application
environment
required
string
ID of your environment
build
required
string
ID of your build
Request Body
Section titled “Request Body”Media typeapplication/json
Request to cancel build.
object
Examplegenerated
{}Responses
Section titled “Responses”A successful response.
Media typeapplication/json
This resource represents a long-running operation that is the result of a network API call
object
done
Information if the operation is done or still in progress
boolean
metadata
Long running operation metadata
object
@type
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message
string
build
Build name in the format of: accounts/{account}/apps/{app}/environments/{environment}/builds/{build}
string
envID
Environment ID
string
name
Operation name in the format of: accounts/{account}/apps/{app}/environments/{environment}/operations/{operation}
string
Examplegenerated
{ "done": true, "metadata": { "@type": "example", "build": "example", "envID": "example" }, "name": "example"}