Sets the period over which the members of a team may schedule themselves.
curl --request POST \
--url https://api.example.com/api/schedule/configurations.update-self-schedule-date-range \
--header 'Content-Type: application/json' \
--data '
{
"team_id": "872815618512410358",
"self_schedule_date_range": "2019-11-11/2019-12-12"
}
'import requests
url = "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range"
payload = {
"team_id": "872815618512410358",
"self_schedule_date_range": "2019-11-11/2019-12-12"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
team_id: '872815618512410358',
self_schedule_date_range: '2019-11-11/2019-12-12'
})
};
fetch('https://api.example.com/api/schedule/configurations.update-self-schedule-date-range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'team_id' => '872815618512410358',
'self_schedule_date_range' => '2019-11-11/2019-12-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range"
payload := strings.NewReader("{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/schedule/configurations.update-self-schedule-date-range")
.header("Content-Type", "application/json")
.body("{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/schedule/configurations.update-self-schedule-date-range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}"
response = http.request(request)
puts response.read_bodyConfigurations
Sets the period over which the members of a team may schedule themselves.
Set the period the members of a team are allowed to schedule themselves over. The route only narrows a feature that the instance configuration opens: it cannot forbid self-scheduling altogether.
POST
/
api
/
schedule
/
configurations.update-self-schedule-date-range
Sets the period over which the members of a team may schedule themselves.
curl --request POST \
--url https://api.example.com/api/schedule/configurations.update-self-schedule-date-range \
--header 'Content-Type: application/json' \
--data '
{
"team_id": "872815618512410358",
"self_schedule_date_range": "2019-11-11/2019-12-12"
}
'import requests
url = "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range"
payload = {
"team_id": "872815618512410358",
"self_schedule_date_range": "2019-11-11/2019-12-12"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
team_id: '872815618512410358',
self_schedule_date_range: '2019-11-11/2019-12-12'
})
};
fetch('https://api.example.com/api/schedule/configurations.update-self-schedule-date-range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'team_id' => '872815618512410358',
'self_schedule_date_range' => '2019-11-11/2019-12-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/schedule/configurations.update-self-schedule-date-range"
payload := strings.NewReader("{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/schedule/configurations.update-self-schedule-date-range")
.header("Content-Type", "application/json")
.body("{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/schedule/configurations.update-self-schedule-date-range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"team_id\": \"872815618512410358\",\n \"self_schedule_date_range\": \"2019-11-11/2019-12-12\"\n}"
response = http.request(request)
puts response.read_bodyThis endpoint is in preview: it may change without notice until it becomes part of a stable version.
Body
application/json
The team to restrict self-scheduling on, which must be an enabled sector.
Example:
"872815618512410358"
May be left open on either side; send an unbounded period to allow self-scheduling at any time. It cannot overlap the period the schedules of the team are hidden for, nor start on a day they are locked on.
Example:
"2019-11-11/2019-12-12"
Response
204
Configuration self schedule date range updated.