Delete a Scheduled Change for a flag in an environment
1 min
DELETE
http://localhost:3002//projects/{project_id}/flags/{flag_key}/schedules/{schedule_id}
Path Parameters
- project_idintegerrequired
- flag_keystringrequired
- schedule_idintegerrequired
Responses
204
400
- ErrorResponseExample
{ "details": "Job with id 123 is already deleted", "status": 400 }- detailsstringrequiredDescription
- statusintegerrequiredExampleDescription
401
- ErrorResponseExample
{ "details": "Not authenticated", "status": 401 }- detailsstringrequiredDescription
- statusintegerrequiredExampleDescription
422
- HTTPValidationError
- detailValidationError[]
- locobject[]requiredDescription
- msgstringrequiredDescription
- typestringrequiredDescription
- statusintegerExampleDescription
curl
curl --request DELETE \
--url http://localhost:3002//projects/{project_id}/flags/{flag_key}/schedules/{schedule_id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://localhost:3002//projects/{project_id}/flags/{flag_key}/schedules/{schedule_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("http://localhost:3002//projects/{project_id}/flags/{flag_key}/schedules/{schedule_id}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "http://localhost:3002//projects/{project_id}/flags/{flag_key}/schedules/{schedule_id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
204
// Successful Response
400
// Bad Request
{
"details": "",
"status": 400
}401
// Not Authenticated
{
"details": "",
"status": 400
}422
// Validation Error
{
"detail": [
{
"loc": [
{}
],
"msg": "",
"type": ""
}
],
"status": 422
}