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 and returns 204 with no body. Deleting the same absence again returns 404. Removing an absence can return current duty to the person whose turn applies. Other absences and assignments still apply. Time already served is unchanged. Read GET /v1/rotations/{rotationId}/on-call to check the result; 204 confirms the deletion, not that a duty change has completed. An absence that applies to all rotations is removed from all of them, not only 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 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 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 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 format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}