Clear an absence
DELETE
/v1/rotations/{rotationId}/availability/{absenceId}
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Delete, RequestUri = new Uri("https://api.roundrobinbot.eu/v1/rotations/example/availability/example"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.roundrobinbot.eu/v1/rotations/example/availability/example"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.roundrobinbot.eu/v1/rotations/example/availability/example") .delete(null) .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'DELETE', url: 'https://api.roundrobinbot.eu/v1/rotations/example/availability/example', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.roundrobinbot.eu/v1/rotations/example/availability/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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.roundrobinbot.eu/v1/rotations/example/availability/example \ --header 'Authorization: Bearer <token>'Removes the absence, so hand-overs stop passing over the person it named. Answers 204 with no body, and a second delete of the same absence answers 404. It does not put anybody back on duty. A shift that was dealt to somebody else while this absence stood stays theirs, because a hand-over is decided once and never revisited. An absence that covers every rotation is cleared everywhere, not only for the rotation in the path.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”rotationId
required
string
absenceId
required
string
Responses
Section titled “Responses”No Content
Media typeapplication/json
Bad Request
Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}