Get timeslots of a specific resource
curl --request GET \
--url https://b.anny.co/api/v1/resources/{resource_id}/timeslots \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/resources/{resource_id}/timeslots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/resources/{resource_id}/timeslots', 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://b.anny.co/api/v1/resources/{resource_id}/timeslots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/resources/{resource_id}/timeslots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/resources/{resource_id}/timeslots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/resources/{resource_id}/timeslots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "timeslots",
"id": "9a93435a-86b2-449f-85ef-d47d477b9abe",
"attributes": {
"title": "Session 1",
"title_i18n": {
"en-us": "Session 1"
},
"start_date": "2021-10-17T06:00:00+00:00",
"end_date": "2021-10-17T15:00:00+00:00",
"timezone": "Europe/Berlin",
"quota": 3,
"dynamic_capacity": true,
"base_quota": 0,
"max_dynamic_quota": 5,
"created_at": "2021-10-15T14:47:20+00:00"
},
"meta": {
"provisioned_quota": 1,
"active_booking_count": 0,
"pending_booking_count": 0,
"total_booking_count": 0,
"available_provisioned_slots": 1,
"pending_capacity": 2,
"protected": []
},
"links": {
"self": "https://b.anny.co/api/v1/timeslots/9a93435a-86b2-449f-85ef-d47d477b9abe"
}
}
]
}Resource Management
Get timeslots of a specific resource
GET
/
api
/
v1
/
resources
/
{resource_id}
/
timeslots
Get timeslots of a specific resource
curl --request GET \
--url https://b.anny.co/api/v1/resources/{resource_id}/timeslots \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/resources/{resource_id}/timeslots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/resources/{resource_id}/timeslots', 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://b.anny.co/api/v1/resources/{resource_id}/timeslots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/resources/{resource_id}/timeslots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/resources/{resource_id}/timeslots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/resources/{resource_id}/timeslots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "timeslots",
"id": "9a93435a-86b2-449f-85ef-d47d477b9abe",
"attributes": {
"title": "Session 1",
"title_i18n": {
"en-us": "Session 1"
},
"start_date": "2021-10-17T06:00:00+00:00",
"end_date": "2021-10-17T15:00:00+00:00",
"timezone": "Europe/Berlin",
"quota": 3,
"dynamic_capacity": true,
"base_quota": 0,
"max_dynamic_quota": 5,
"created_at": "2021-10-15T14:47:20+00:00"
},
"meta": {
"provisioned_quota": 1,
"active_booking_count": 0,
"pending_booking_count": 0,
"total_booking_count": 0,
"available_provisioned_slots": 1,
"pending_capacity": 2,
"protected": []
},
"links": {
"self": "https://b.anny.co/api/v1/timeslots/9a93435a-86b2-449f-85ef-d47d477b9abe"
}
}
]
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Abfrageparameter
Comma-separated. Allowed: resource, resource.parent, service, series, cover_image, resource_allocations, resource_allocations.resource, resource_allocations.resource.category, resource_allocations.resource.cover_image, model_syncs
Allowed: period, start_date, end_date, created_at
Return slots ending after this ISO 8601 timestamp.
Return slots starting before this ISO 8601 timestamp.
Boolean. Restrict to future timeslots.
Boolean. Restrict to past timeslots.
Organization ID
Antwort
OK
Show child attributes
Show child attributes