Skip to main content
Network APIs for Connectivity Quality

CAMARA Connectivity Insights Subscriptions

warning

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​

The "Connectivity Insights Subscriptions" API lets application developers receive continuous updates about network quality through event notifications. This allows developers to monitor network performance for their application users and receive alerts when network conditions change, helping them take informed decisions related to optimizing the application's end user experience (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml info.description; /subscriptions POST callbacks notifications description).

This API is the continuous counterpart to the one-shot Connectivity Insights API: instead of a single check, the consumer subscribes once and the network pushes notifications when quality changes (CAMARA ConnectivityInsights main@db9c0de connectivity-insights.yaml info.description API functionality; CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions POST callbacks notifications).

Information: Connectivity Insights Subscriptions project page and GitHub repository

The API definitions can be obtained here: ConnectivityInsights API_definitions folder

The Connectivity Insights Subscriptions API definition (YAML) is available at: connectivity-insights-subscriptions.yaml

Operations and dependencies​

Connectivity Insights Subscriptions API​

  • POST /subscriptions with the request body containing sink, protocol, types and a config with subscriptionDetail (device, applicationServer, applicationServerPorts, applicationProfileId) and optionally subscriptionExpireTime, subscriptionMaxEvents and initialEvent. Response contains the subscription id.
    • Dependency: Requires applicationProfileId from a previous call to the Application Profiles API (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml CreateSubscriptionDetail required applicationProfileId, applicationServer).
  • GET /subscriptions - Operation to list subscriptions authorised to be retrieved by the provided access token (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions GET description).
  • GET /subscriptions/{subscriptionId} - Retrieve a given subscription by ID (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions/{subscriptionId} GET description).
  • DELETE /subscriptions/{subscriptionId} - Delete a given subscription by ID (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions/{subscriptionId} DELETE description)

Standardisation context​

The event-driven counterpart of Connectivity Insights. It follows the CAMARA explicit-subscription pattern: POST /subscriptions with a sink URL and the event types, after which the provider pushes CloudEvents 1.0 notifications. A subscription is bounded by subscriptionExpireTime and subscriptionMaxEvents; initialEvent: true sends an event on creation; sinkCredential says how the provider authenticates to the sink.

Payloads are qualitative, as in the one-shot API. The value for media is timeliness: a production can react when quality degrades without polling, provided the sink is reachable and authenticated.

Workflow: Media application subscribing to Connectivity Insights events​

A user of a media application would like to obtain Connectivity Insights events. An example figure is shown in the context of using Application Profiles and Connectivity Insights. The following steps are executed:

Architecture drawing: a planning tool at the field location invokes the Application Profiles, Connectivity Insights and Connectivity Insights Subscriptions APIs, and a booking tool at the production centre invokes the Application Profiles API, both through a Network API Platform linked to the mobile network. The connectivity under monitoring is between the device and the application server, according to the Application Profile.
API consumers (a planning tool and a booking tool) invoke the Application Profiles, Connectivity Insights and Connectivity Insights Subscriptions APIs through the Network API Platform. The connectivity under monitoring is that between the device and the application server, according to the Application Profile (figure text).

Step 0: Pre-conditions​

  • Create an application profile using the Application Profiles API (with the relevant application requirements) (CAMARA ConnectivityInsights main@db9c0de connectivity-insights.yaml info.description API functionality usage step 1; CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml CreateSubscriptionDetail.applicationProfileId).
  • Create a device object for the device which media flow is to be monitored; this is needed only with a two-legged access token, as with a three-legged access token the device is identified from the token and the device object must not be provided (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml CreateSubscriptionDetail.device; info.description Relevant terms).
  • Obtain IP address and port of the application server (Ingest Server of Production).

Step 1: Subscribe to recurrent events/notifications on network quality​

  • POST /subscriptions, passing the applicationProfileId obtained in step 0, the address/port of an application server, and a device object (two-legged access token only). Indicate expiration time and maximum number of events (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions POST; Config.subscriptionExpireTime/subscriptionMaxEvents via CAMARA Commonalities main@b1a9f08 CAMARA-API-Event-Subscription-and-Notification-Guide.md section 2.2.3).

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.

The APIs are likely to be invoked to obtain information about the ability of the network to meet the requirements during operation. However:

  • The information received is qualitative (e.g. "targetMinDownstreamRate": "meets the application requirements"). An application would be unable to understand which parameters to be adapted in order to revert a situation in which requirements cannot be met.

Potential improvements:

  • If used to monitor resources for which QoS was requested (via a different API) harmonisation of Application Profile and QoS Profile for consistency.
  • an indication of the actual performance parameters (quantitative) for those defined in the Application Profile may provide better insight for potential remedies. E.g. latency cannot be fulfilled, but please respond with the actual latency the link device-AS is experiencing.

Application Profiles API Usage​

Check: Application Profiles API. The type of parameters that an applicationProfile defines is shown below (CAMARA ApplicationProfiles main@11066d6 application-profiles.yaml ApplicationProfile; NetworkQualityThresholds; ComputeResourcesThresholds).

{
"networkQualityThresholds": {
"packetDelayBudget": {
"value": 12,
"unit": "Milliseconds"
},
"targetMinDownstreamRate": {
"value": 10,
"unit": "Mbps"
},
"targetMinUpstreamRate": {
"value": 10,
"unit": "Mbps"
},
"packetLossErrorRate": 3,
"jitter": {
"value": 12,
"unit": "Milliseconds"
}
},
"computeResources": {
"targetMinCPU": 0.5,
"targetMinMemory": {
"value": 10,
"unit": "MB"
},
"gpuVendorType": "Nvidia",
"gpuModelName": "string",
"targetMinGPU": 1,
"targetMinGPUMemory": {
"value": 10,
"unit": "MB"
},
"targetMinEphemeralStorage": {
"value": 10,
"unit": "MB"
},
"targetMinPersistentStorage": {
"value": 10,
"unit": "MB"
}
}
}

Device object​

A device is defined by the common Device schema, which needs at least one of phoneNumber, ipv4Address and ipv6Address (networkAccessIdentifier is in the schema, but CAMARA does not currently allow its use); the API consumer can give several, and the API provider then uses one of them. The example below combines identifiers for illustration (CAMARA Commonalities main@b1a9f08 CAMARA_common.yaml schemas Device, DeviceIpv4Address; Glossary.md Phone Number; CAMARA QualityOnDemand main@471aa35 quality-on-demand.yaml examples; CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml info.description Relevant terms):

{
"device": {
"phoneNumber": "+123456789",
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
},
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
}
}

Connectivity Insights Subscriptions API Usage​

Create a subscription for a device​

With POST /subscriptions (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions POST)

The request below creates a subscription. The key fields are (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml SubscriptionRequest; Config):

ParameterDescription
sinkthe callback URL (an https URL) to which the network delivers notifications (the consumer's endpoint must accept HTTP POST). (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions POST callbacks notifications; CAMARA Commonalities main@b1a9f08 CAMARA-API-Event-Subscription-and-Notification-Guide.md section 2.2.3)
sinkCredentialthe credential the API provider uses to authenticate against that endpoint (optional; not used in the example); if given, its credentialType is ACCESSTOKEN or PRIVATE_KEY_JWT (CAMARA Commonalities main@b1a9f08 CAMARA_event_common.yaml schemas Sink, SinkCredential).
typesthe event types the consumer subscribes to (here, network-quality change events). (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml SubscriptionRequest.types; ApiEventType)
initialEventwhen true, an event is sent as soon as the subscription is created if the current situation reflects the event request (it counts towards subscriptionMaxEvents).
subscriptionExpireTimeoptional; when the subscription should expire, as an RFC 3339 date-time with a time zone (CAMARA Commonalities main@b1a9f08 CAMARA_event_common.yaml schema ConfigBase).
subscriptionMaxEventsoptional; the maximum number of events to report, from 1 to 1000000; the subscription ends when it is reached (CAMARA Commonalities main@b1a9f08 CAMARA_event_common.yaml schema ConfigBase).
{
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": ["org.camaraproject.connectivity-insights-subscriptions.v0.network-quality"],
"config": {
"subscriptionDetail": {
"device": {
"phoneNumber": "+123456789",
"ipv4Address": {
"publicAddress": "203.0.113.0",
"publicPort": 59765
},
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"applicationServer": {
"ipv4Address": "192.168.0.1/24",
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"applicationServerPorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"applicationProfileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"subscriptionExpireTime": "2023-07-03T12:27:08.312Z",
"subscriptionMaxEvents": 5,
"initialEvent": true
}
}

Type of response: A subscription object. The response echoes the subscription configuration and adds the assigned id, startsAt/expiresAt window, and current status. If more than one device identifier was sent, only one is selected by the implementation and returned (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml info.description Device):

{
"protocol": "HTTP", "sink": "https://endpoint.example.com/sink",
"types": ["org.camaraproject.connectivity-insights-subscriptions.v0.network-quality"],
"config": {
"subscriptionDetail": {
"device": {
"phoneNumber": "+123456789"
},
"applicationServer": {
"ipv4Address": "192.168.0.1/24",
"ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
},
"applicationServerPorts": {
"ranges": [
{
"from": 5010,
"to": 5020
}
],
"ports": [5060, 5070]
},
"applicationProfileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"subscriptionExpireTime": "2023-07-03T12:27:08.312Z",
"subscriptionMaxEvents": 5,
"initialEvent": true
},
"id": "1119920371",
"startsAt": "2023-07-03T12:27:08.312Z",
"expiresAt": "2023-07-03T12:27:08.312Z",
"status": "ACTIVATION_REQUESTED"
}

Event notifications​

The whole point of this API is asynchronous delivery: once a subscription is created, the network pushes an event to the consumer whenever a connectivity event changes the network's ability to meet the application's demands (and, if initialEvent is true, also as soon as the subscription is created if the current situation reflects the event request), rather than the consumer polling.

Mechanism​

Notifications are delivered to the callback URL supplied as the sink parameter when the subscription is created with POST /subscriptions (see the request example above). Where present, sinkCredential describes the credential the API provider uses to authenticate against that endpoint. The consumer's sink must accept HTTP POST requests carrying the notification payload. The subscription stops delivering when it expires (subscriptionExpireTime) or reaches its event cap (subscriptionMaxEvents) (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml /subscriptions POST callbacks notifications; CAMARA Commonalities main@b1a9f08 CAMARA-API-Event-Subscription-and-Notification-Guide.md section 2.2.3, 2.2.5).

The payload follows the CloudEvents 1.0 specification (JSON format) (CAMARA Commonalities main@b1a9f08 CAMARA-API-Event-Subscription-and-Notification-Guide.md section 3.1; CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml callbacks notifications content application/cloudevents+json). A notification carries the required attributes id, source, specversion (1.0), type and time, and a data object; if datacontenttype is present it must be application/json. The sink must be an https URL (CAMARA Commonalities main@b1a9f08 CAMARA_event_common.yaml schemas CloudEvent, Sink).

Event types​

Event typeMeaning
org.camaraproject.connectivity-insights-subscriptions.v0.network-qualityThe network quality relative to the subscribed application profile changed. (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml ApiEventType; EventNetworkQuality; callbacks notifications description)
org.camaraproject.connectivity-insights-subscriptions.v0.subscription-started, …subscription-updated, …subscription-endedThe subscription lifecycle events, which the API definition says are managed by Commonalities and identical across the CAMARA APIs that support explicit subscriptions. (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml SubscriptionLifecycleEventType; EventSubscriptionStarted; EventSubscriptionUpdated; EventSubscriptionEnded)

The data object carries the network-quality assessment (the same qualitative per-threshold indications returned by the one-shot Connectivity Insights check, plus the applicationProfileId). The lifecycle events carry the subscriptionId and a reason: initiationReason (SUBSCRIPTION_CREATED) for subscription-started, updateReason (SUBSCRIPTION_ACTIVE or SUBSCRIPTION_INACTIVE) for subscription-updated, and terminationReason (MAX_EVENTS_REACHED, NETWORK_TERMINATED, SUBSCRIPTION_EXPIRED, ACCESS_TOKEN_EXPIRED or SUBSCRIPTION_DELETED) for subscription-ended (CAMARA Commonalities main@b1a9f08 CAMARA_event_common.yaml schemas SubscriptionStarted, SubscriptionUpdated, SubscriptionEnded). The v0 segment in the event type is the event version; for an initial API the event version starts at v0, and stable APIs use a version greater than 0.

note

The event type and payload structure above are taken from the CAMARA Connectivity Insights Subscriptions API definition. Confirm the exact values against the connectivity-insights-subscriptions.yaml for the version you are integrating against, as they can change between releases (CAMARA ConnectivityInsights main@db9c0de connectivity-insights-subscriptions.yaml ApiEventType; EventNetworkQuality; CAMARA Commonalities main@b1a9f08 CAMARA-API-Event-Subscription-and-Notification-Guide.md section 2.3 Event Versioning).