This documentation is currently under development and subject to change. It reflects outcomes elaborated by 5G-MAG members. If you are interested in becoming a member of the 5G-MAG and actively participating in shaping this work, please contact the Project Office
Description
Developers and other capabilities consumers use the "QoS Booking" (Quality of Service Booking) API to request specific network conditions from telco networks in advance, without needing in-depth knowledge of the underlying network complexity (e.g. the 4G/5G system in the case of a mobile network) (CAMARA QoSBooking main@4de93f1 qos-booking.yaml info.description).
How this differs from QoS Booking and Assignment: this API books a QoS profile for a device supplied at booking time (each booking targets one device). The related QoS Booking and Assignment API instead books for a device count (bookingDeviceCount) and lets you assign and release individual devices to the booking afterwards. Use QoS Booking when the devices are known up front; use Booking and Assignment when devices join later (CAMARA QoSBooking main@4de93f1 qos-booking.yaml /device-qos-bookings POST; CAMARA QoSBooking main@4de93f1 qos-booking-and-assignment.yaml /qos-bookings POST bookingDeviceCount, /qos-bookings/{bookingId}/devices/assign and /release).
Information: QoS Booking project page and GitHub repository
The API definitions can be obtained here: QoSBooking API_definitions folder
The QoS Booking API definition (YAML) is available at: qos-booking.yaml
Operations and dependencies
QoS Booking API
- POST /device-qos-bookings with a request body containing
qosProfile,applicationServer,applicationServerPorts,deviceobject,devicePorts,startTime,duration,serviceArea, it creates a time-bounded booking of a QoS profile for the specified device. The response includes abookingId(CAMARA QoSBooking main@4de93f1 qos-booking.yaml/device-qos-bookingsPOST CreateBooking and BookingInfo).- Dependency: Requires
qosProfilewhich can be retrieved from a previous call to the QoS Profiles API (CAMARA QoSBooking main@4de93f1 qos-booking.yaml info.description; QoSProfileName schema).
- Dependency: Requires
- GET /device-qos-bookings/{bookingId} - Get QoS Booking information (CAMARA QoSBooking main@4de93f1 qos-booking.yaml
/device-qos-bookings/{bookingId}GET getBookingById). - DELETE /device-qos-bookings/{bookingId} - Deletes a QoS Booking (CAMARA QoSBooking main@4de93f1 qos-booking.yaml
/device-qos-bookings/{bookingId}DELETE deleteBooking). - POST /retrieve-device-qos-bookings with a request body containing a
deviceobject, queries for QoS Booking resource information details for a device (CAMARA QoSBooking main@4de93f1 qos-booking.yaml/retrieve-device-qos-bookingsPOST retrieveBookingByDevice).
Standardisation context
QoS Booking is part of the CAMARA QoSBooking repository (OpenAPI 3.0.3) and takes a named profile from the QoS Profiles API. What it adds to Quality on Demand is advance reservation: a booking is created ahead of time (startTime, duration, serviceArea), so that resources are held for a scheduled event.
Device-bound bookings
The reservation is bound to the device supplied at booking time. POST /device-qos-bookings takes the device (optional with a 3-legged token), qosProfile, applicationServer, ports and the booking window, and returns a bookingId and a bookingStatus (REQUESTED, then SCHEDULED). POST /retrieve-device-qos-bookings finds a device's bookings; GET and DELETE /device-qos-bookings/{bookingId} read and cancel one. Use it when the device is known up front, otherwise QoS Booking and Assignment. Quality on Demand requests QoS at the moment of use, and QoS Provisioning applies a profile persistently.
Workflow: Media application booking QoS for a device
A user of a media application wants to reserve a QoS profile for a known device ahead of an event. The following steps are executed:
Step 0: Pre-conditions
- The API invoker has signed up with the API provider (CAMARA QoSBooking main@4de93f1 qos-booking.yaml info.description Authorization and authentication).
- A
qosProfilename has been obtained via the QoS Profiles API (CAMARA QoSBooking main@4de93f1 qos-booking.yaml info.description QoS profiles term).
Step 1: Create the booking
- POST /device-qos-bookings passing the
qosProfile, thedeviceobject, theserviceArea,startTimeandduration. The response returns abookingIdused to query or cancel the booking (CAMARA QoSBooking main@4de93f1 qos-booking.yaml/device-qos-bookingsPOST CreateBooking; BookingInfo bookingId;/device-qos-bookings/{bookingId}GET and DELETE).
5G-MAG's Self-Assessment
This section records 5G-MAG's practical reading of the API and the open points it raises for media use.
- Booking directly against a known device keeps the model simple for a single-device contribution feed (for example a MoJo uplink); for a small crew with fixed devices, each device would need its own booking, as the API definition books for "a specific device".
- Because the reservation is bound to the device given at booking time, substituting a device mid-event (for example replacing a failed camera) requires a new booking rather than reassigning the existing one. Where the exact devices are not known up front, or may change, QoS Booking and Assignment is the better fit.
- Like the other QoS-family APIs, there is no separate discovery step: availability is only confirmed once the booking is created.
Potential improvements:
- A lightweight way to substitute one device for another within an existing booking, without deleting and recreating it, would help productions where a device may need to be replaced mid-event.
Note on profile names
The profile-name values in the examples below (QCI_1_voice, QOS_L) are illustrative and operator-defined; the actual names come from the QoS Profiles API. Different examples on this page use different names for the same reason (CAMARA QoSBooking main@4de93f1 qos-booking.yaml QosProfileName schema).
QoS Booking API Usage
Request booking of QoS for a device
With POST /device-qos-bookings, and device parameters. The request specifies the device, the QoS profile, the application server and ports, and the booking window (CAMARA QoSBooking main@4de93f1 qos-booking.yaml /device-qos-bookings POST CreateBooking):
{
"device": {
"phoneNumber": "+123456789",
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
},
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"qosProfile": "QCI_1_voice",
"applicationServer": {
"ipv4Address": "198.51.100.0/24",
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"devicePorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"applicationServerPorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"sink": "https://endpoint.example.com/sink",
"sinkCredential": {
"credentialType": "ACCESSTOKEN",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR...",
"accessTokenExpiresUtc": "2024-12-01T12:00:00Z",
"accessTokenType": "bearer"
},
"startTime": "2024-06-01T12:00:00Z",
"duration": 3600,
"serviceArea": {
"areaType": "CIRCLE",
"center": {
"latitude": 50.735851,
"longitude": 7.10066
},
"radius": 100
}
}
Type of response: A bookingId and the booking status, with the other attributes of the booking. If more than one type of device identifier was provided, only one identifier is returned, at the implementation's choice; startedAt is not returned while the status is REQUESTED or SCHEDULED (CAMARA QoSBooking main@4de93f1 qos-booking.yaml /device-qos-bookings POST 201 BookingInfo; BookingInfo description; startedAt)
{
"device": {
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
}
},
"qosProfile": "QCI_1_voice",
"applicationServer": {
"ipv4Address": "198.51.100.0/24",
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"devicePorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"applicationServerPorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"sink": "https://endpoint.example.com/sink",
"startTime": "2024-06-01T12:00:00Z",
"duration": 3600,
"serviceArea": {
"areaType": "CIRCLE",
"center": {
"latitude": 50.735851,
"longitude": 7.10066
},
"radius": 100
},
"bookingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"bookingStatus": "REQUESTED"
}
Obtains the existing QoS booking for a device
With POST /retrieve-device-qos-bookings, and device parameters. The request identifies the device whose bookings are queried (CAMARA QoSBooking main@4de93f1 qos-booking.yaml /retrieve-device-qos-bookings POST RetrieveBookingByDevice):
{
"device": {
"phoneNumber": "+123456789",
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
},
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
}
}
Obtains the QoS booking information
With GET /device-qos-bookings/{bookingId}. The response returns the booking's profile, window, status and service area (CAMARA QoSBooking main@4de93f1 qos-booking.yaml /device-qos-bookings/{bookingId} GET 200 BookingInfo):
{
"bookingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"duration": 3600,
"device": {
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
}
},
"qosProfile": "QOS_L",
"sink": "https://application-server.com/notifications",
"startTime": "2024-06-01T12:00:00Z",
"startedAt": "2024-06-01T12:00:00Z",
"bookingStatus": "ACTIVATED",
"serviceArea": {
"areaType": "CIRCLE",
"center": {
"latitude": 50.735851,
"longitude": 7.10066
},
"radius": 100
}
}
Event notifications
The request can carry an optional sink (a callback URL) and a sinkCredential. When sink is included, the API provider sends notifications about status changes of the booking, for example when its duration expires, as CloudEvents; if sink is included, it is recommended to provide sinkCredential as well, and sinkCredential.credentialType must be ACCESSTOKEN or PRIVATE_KEY_JWT in the current version (CAMARA QoSBooking main@4de93f1 qos-booking.yaml info.description Notification URL and token).
| Event type | Meaning |
|---|---|
org.camaraproject.qos-booking.v0.status-changed | The status of the booking changed. The data carries bookingId, bookingStatus (SCHEDULED, ACTIVATED or TERMINATED) and optionally statusInfo (CAMARA QoSBooking main@4de93f1 qos-booking.yaml BookingEventType; EventStatusChanged; BookingStatusChanged). |
The CAMARA example for a booking that ended because its duration expired is below. The values of id, source and time come from that example (CAMARA QoSBooking main@4de93f1 qos-booking.yaml examples BOOKING_STATUS_CHANGED_EXAMPLE):
{
"id": "83a0d986-0866-4f38-b8c0-fc65bfcda452",
"source": "https://api.example.com/qod/v1/sessions/123e4567-e89b-12d3-a456-426614174000",
"type": "org.camaraproject.qos-booking.v0.status-changed",
"specversion": "1.0",
"time": "2024-06-01T13:00:00Z",
"data": {
"bookingId": "123e4567-e89b-12d3-a456-426614174000",
"bookingStatus": "TERMINATED",
"statusInfo": "DURATION_EXPIRED"
}
}