camara-service-capability-openapi
---
openapi: 3.0.3
info:
title: CAMARA Service Capability API
description: |
The CAMARA Service Capability API provides programmable interface for developers and other users (capabilities consumers) to discover and be notified
about active/inactive capabilities (functions) for APIs.
It delivers a tailored service capability based on consumer context, supporting complex request bodies, endpoint removal, and dynamic restrictions.
This API enables feature discovery and near-real-time feature status notifications for APIs provided by the gateway / provider.
Overlay-based restrictions use JSON Schema Validation (draft-bhutton-json-schema-validation-01) keywords and ensure restriction-only constraints.
The specification supports dynamic tailoring via `POST /camara/service/capability/v0`, which returns a restriction mapping with bit positions, capability identifiers,
and a mapping version. Initial restriction states are included in the successful response. Restriction state changes are notified via CloudEvents using bitmap-only
payloads for restrictions and leveraging the restriction mapping for synchronization. Versioning ensures consumers adapt to mapping changes.
Overlays conform to the OpenAPI Overlay specification (https://spec.openapis.org/overlay/latest.html) and are evaluated at run-time rather than build-time on API consumer side using
context-aware logic. Only schema-restrictive updates are allowed (e.g., narrowing enums, removing operations). These extensions enable fine-grained control over API capabilities
by applying restriction-only constraints to schemas, body fields, and headers/parameters, respectively.
An **API** (Application Programming Interface) often includes **features** that can be *active* or *inactive* during
interactions with API consumers. For example, feature negotiation during session establishment or events such as high congestion that
change a feature's status.
**Capabilities** represent a collection of features and their **status** (*active* or *inactive*) at runtime.
These capabilities provide a way to describe what an API can do.
**Footprints** define the coverage area where specific capabilities are available. A device must be located within the footprint to access
these capabilities. If no footprint is specified, the capabilities *may* be available to *any* device connected to the network. Footprints
have a *usage type* that determines their visibility and use. For example, some footprints may only be visible to Access Networks where
devices are attached, while others may be visible to Internet servers or services in a Non-Access network. Some footprints
may even be used in both types of networks.
The API provider MAY have full knowledge of whereabout of the device, thus directly notifying the capabilities consumers
with near-real-time capability changes resulting of device location change without using footprints. This would reduce the additional footprint processing requirement at the consumer side
when the device receives the capability notification and capability info.
When footprints are used, they are presented as part of a collection. A device is considered to be covered by a footprint collection if it
falls within at least one footprint in the collection. Footprint *precedence* specifies the search execution order of footprints in the
collection. The lower the numerical value of precedence, the higher the footprint precedence. Footprints with equal precedence MAY be
executed in parallel if supported by the system. (see *Usage* for more detail).
To convey the impact of capability status to API consumers in a meaningful way, capabilities are directly tied to a set of **Runtime Restrictions**.
These restrictions affect optional or alternative structures, parameters, and other aspects of API usage.
The Camara Service Capability API enables clients to discover and manage CAMARA API capabilities
through a simple, RESTful interface and receive automatic CloudEvents when state changes.
```mermaid
Client Webhook/Sink Capability API CloudEvents Broker
| | | |
|---------------------------------------->| |
| POST /camara/service/capability/v0 | |
|<----------------------------------------| |
| 201 + CapabilityInfo | |
| | | |
| | |----------------------> |
| | | Create Subscription |
| | | for capability |
| | | changes |
| | |----------------------->|
| | | Capability Changed |
| |<-------------------------------------------|
| | POST CloudEvent to Webhook |
| | | |
| |------------------------------------------->|
| | 204 |
| | | |
The Capability API responds with the supported capabilities and then internally
registers for capability change events if 'subscriptionRequest' is provided in the request.
As capabilities change event notifications are forwarded through a CloudEvents Broker to
the client-provided Webhook (Sink).
```
**How it works**
1. **Query capabilities**
Client sends one or more `CamaraCapabilityQuery` objects to `/camara/service/capability/v0`.
2. **Inspect response**
API returns a `CapabilityInfo` object with per-capability details, overlays, and restriction sets.
3. **Receive updates automatically**
Whenever capability bitmaps or info change, the API emits a CloudEvent (via implicit subscription)
to your configured webhook sink endpoint.
**Supported CloudEvent types:**
- `org.camaraproject.capability.v0.capability-bitmap-changed`
- `org.camaraproject.capability.v0.capability-info-changed`
For full schema definitions and examples, see the components section below.
1. `POST /camara/service/capability/v0`: Returns tailored CapabilityBitmap that assigns bit positions of each restriction, a mappingVersion for versioning for new restrictions.
2. CloudEvents Notifications: Signals restriction state changes (active/inactive) via bitmap change event and new restrictions via info change event, ensuring efficient synchronization.
3. Versioning: Uses mappingVersion to handle changes in the restriction mapping, preventing synchronization errors.
* **Authentication**:
Security access keys such as OAuth 2.0 client credentials used by client applications to invoke the Capability API.
* **API (Application Programming Interface)**:
A set of protocols and tools for building software and applications.
* **Features**:
Specific functions or capabilities of an API that can be *active* or *inactive*.
* **Capabilities**:
A collection of features and their status (*active* or *inactive*) at a specific point in time.
* **Footprints**:
Define the coverage area where specific capabilities are available.
* **Runtime Restrictions**:
Restrictions that affect optional or alternative structures, parameters, and other aspects of API usage using a collection of overlays.
There are two kinds of overlays. The openAPI Overlays specification is at https://spec.openapis.org/overlay/latest.html.
One kind is the static version of overlays which can be applied to the API spec at the build time of the
Client. The actions of the overlays are known to the Client before any runtime. Second kind is the one we're specifying in this CAMARA
Service Capability API specification where the overlays take effect at the runtime of the Client if the Client supports this specification.
The actions of any overlays are not known to the Client until they're communicated from the API provider at the runtime of the Client.
Please see examples within this yaml on what options the gateway may return in the response.
1. What is the purpose of the API described in the text?
The API enables feature discovery and near-real-time feature status notifications
for APIs provided by the gateway.
2. What are capabilities and how do they relate to API features?
Capabilities represent a collection of features and their
status (*active* or *inactive*) at a specific point in time. These capabilities provide a way to describe what an API can do.
3. What are footprints and how do they affect the availability of capabilities?
Footprints define the coverage area where specific
capabilities are available. A device must be located within the footprint to access these capabilities. If no footprint is specified,
the capabilities may be available to any device connected to the network.
4. What is the role of footprint precedence in the search execution order?
Footprint precedence specifies the search execution order of
Footprints in the collection. The lower the numerical value of precedence, the higher the Footprint precedence. Footprints with equal
precedence may be executed in parallel if supported by the system.
5. How do runtime restrictions affect API usage?
To convey the impact of capability status to API consumers in a meaningful way,
capabilities are directly tied to a set of runtime restrictions. These restrictions affect optional or alternative structures,
parameters, and other aspects of API usage using a collection of overlays.
6. What if a Client does not support this API?
They can send requests without using this API. The downside
is that they may send requests that are invalid and could have been avoided with information from this API. They
could be more proactive by disabling / hiding options that are not enabled in the Client which improves user
experience.
7. What if a Client does not support Footprints or a specific Footprint type?
They should ignore enforcing the
state of the specific capability. This may result in sending invalid requests.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: tbd
externalDocs:
description: Product documentation at Camara
url: https://github.com/camaraproject/
servers:
- url: '{apiRoot}/camara-service-capability-openapi/vwip'
variables:
apiRoot:
default: http://localhost:9091
description: API root
tags:
- name: CAMARA Service Capability Query
description: Returns the Service Capability for specified CAMARA service APIs
on the API gateway / producer side.
- name: CAMARA Service Capability notifications callback
description: Callback endpoint for receiving notifications on capability changes.
paths:
/camara/service/capability/v0:
post:
tags: [CAMARA Service Capability Query]
summary: Retrieve tailored service capabilities based on consumer context
description: |
Returns service capability information tailored to the consumer's context, including active/inactive restrictions and mapping metadata.
Successful response is with sets of restrictions based on consumer context, along with a restriction mapping assigning bit positions,
capability identifiers, and a mapping version. It includes response with initial bitmaps which should be enforced on the API consumer side.
operationId: postServiceCapability
parameters:
- $ref: '#/components/parameters/x-correlator'
- $ref: '#/components/parameters/If-None-Match'
- $ref: '#/components/parameters/If-Modified-Since'
security:
- openId: [camara-capability:read]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CamaraCapabilityQueryRequest'
examples:
CAMARA_CAPABILITY_QUERY_REQUEST_EXAMPLE:
$ref: '#/components/examples/CAMARA_CAPABILITY_QUERY_REQUEST_EXAMPLE'
callbacks:
notifications:
'{$request.body#/subscriptionRequest/sink}':
post:
tags: [CAMARA Service Capability notifications callback]
summary: CAMARA Service Capability notifications callback
description: |
Important: this endpoint is to be implemented by the API consumer.
The API provider will call this endpoint whenever any CAMARA Service Capability change related event occurs.
Currently only EVENT_CAPABILITY_CHANGED and EVENT_CAPABILITY_REMOVED events are defined.
operationId: postCapabilityNotification
parameters:
- $ref: '#/components/parameters/x-correlator'
requestBody:
required: true
content:
application/cloudevents-batch+json:
schema:
type: array
items:
$ref: '#/components/schemas/CloudEvent'
examples:
EVENT_CAPABILITY_BITMAP_CHANGED_BATCH_EXAMPLE:
$ref: '#/components/examples/EVENT_CAPABILITY_BITMAP_CHANGED_BATCH_EXAMPLE'
EVENT_CAPABILITY_INFO_CHANGED_BATCH_EXAMPLE:
$ref: '#/components/examples/EVENT_CAPABILITY_INFO_CHANGED_BATCH_EXAMPLE'
responses:
'204':
description: Successful notification
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
'400':
$ref: '#/components/responses/Generic400'
'401':
$ref: '#/components/responses/Generic401'
'403':
$ref: '#/components/responses/Generic403'
'410':
$ref: '#/components/responses/Generic410'
security:
- notificationsBearerAuth: []
responses:
'201':
description: Tailored Capability info with current restriction mapping
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
ETag:
$ref: '#/components/headers/ETag'
Cache-Control:
$ref: '#/components/headers/Cache-Control'
Last-Modified:
$ref: '#/components/headers/Last-Modified'
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilityInfo'
examples:
CAMARA_CAPABILITY_QUERY_REQUEST_RESPONSE_EXAMPLE:
$ref: '#/components/examples/CAMARA_CAPABILITY_QUERY_REQUEST_RESPONSE_EXAMPLE'
'304':
$ref: '#/components/responses/CapabilityNotModified304'
'400':
$ref: '#/components/responses/CapabilityApiBadRequest400'
'401':
$ref: '#/components/responses/Generic401'
'403':
$ref: '#/components/responses/Generic403'
'404':
$ref: '#/components/responses/CapabilityApiNotFound404'
'500':
$ref: '#/components/responses/Generic500'
'503':
$ref: '#/components/responses/Generic503'
components:
securitySchemes:
openId:
$ref: ../common/CAMARA_common.yaml#/components/securitySchemes/openId
notificationsBearerAuth:
$ref: ../common/CAMARA_common.yaml#/components/securitySchemes/notificationsBearerAuth
parameters:
x-correlator:
$ref: ../common/CAMARA_common.yaml#/components/parameters/x-correlator
If-None-Match:
$ref: ../common/CAMARA_common.yaml#/components/parameters/If-None-Match
If-Modified-Since:
$ref: ../common/CAMARA_common.yaml#/components/parameters/If-Modified-Since
headers:
x-correlator:
$ref: ../common/CAMARA_common.yaml#/components/headers/x-correlator
Cache-Control:
$ref: ../common/CAMARA_common.yaml#/components/headers/Cache-Control
ETag:
$ref: ../common/CAMARA_common.yaml#/components/headers/ETag
Last-Modified:
$ref: ../common/CAMARA_common.yaml#/components/headers/Last-Modified
schemas:
Contexts:
description: |
An extensible container for reusable objects referenced by Overlays. It may reflect state of the API Service, client state, etc.
type: object
properties:
url:
type: string
format: uri
description: The resolved request URL.
method:
type: string
description: HTTP method in upper-case.
request:
$ref: '#/components/schemas/HttpMessage'
additionalProperties: true
required: [url, method, request]
HttpMessage:
type: object
description: Common structure for $request and, if supported, $response.
properties:
header:
type: object
description: |
A map of HTTP header fields.
**Header names (object keys)** SHOULD conform to the RFC-7230 `token` syntax:
`^[!#$%&'*+\-\.^_`|~0-9A-Za-z]+$`
Note: OpenAPI 3.0.3 cannot enforce key-name patterns natively.
additionalProperties:
type: string
pattern: ^[\t\x20-\x7E\x80-\xFF]*$
description: Value of the header field (matches `field-value` ABNF)
query:
type: object
description: Query-string parameters; keys are already decoded.
additionalProperties: true
path:
type: object
description: Captured path parameters.
additionalProperties: true
body:
description: Request or response payload. Its shape depends on Content-Type.
additionalProperties: false
VersionedName:
description: |
An abstract base object containing names with versioning
type: object
properties:
name:
description: The item's name. Ideally, it is a unique value for its type.
This value MUST NOT contain the semicolon - ';'
type: string
example: cap1
minLength: 3
maxLength: 256
pattern: ^[^;]*$
version:
description: |
The semantic version of the object instance following [SemVer 2.0.0](https://semver.org/).
Examples:
- `1.0.0`
- `2.3.1-beta`
- `1.4.5+build.2025`
type: string
example: 1.0.0
minLength: 1
pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$
specifyingBody:
description: Entity's specification organization (reversed fqdn format)
type: string
minLength: 1
required: [name, version]
Footprint:
description: |
The coverage area to which capabilities apply. They help define the context in which the features are relevant.
There are many ways to describe a footprint -- for example, by address range (e.g., IPv4 CIDR or IPv6 CIDR (Classless Inter-Domain Routing),
network ID (e.g., Autonomous System Number (ASN)), nation boundaries (e.g., country code) or GPS coordinates.
When a **Footprint** value is not present, the capabilities apply to *any* connected device.
allOf:
- $ref: '#/components/schemas/VersionedName'
- type: object
properties:
footprintType:
description: |
Types include:
* [Content Delivery Network Interconnection](https://www.iana.org/assignments/cdni-parameters/cdni-parameters.xhtml#metadata-footprint-types) types
* [Geo position](https://www.iana.org/assignments/method-tokens/method-tokens.xhtml) types
* [Civic Address](https://datamodel.tmforum.org/en/latest/Common/Address/) types
* [Geographic Address type](https://github.com/tmforum-apis/TMF673_GeographicAddress) types
* [Geographic Location type](https://github.com/tmforum-apis/TMF675_GeographicLocation) types
* [Geographic Site type](https://github.com/tmforum-apis/TMF674_GeographicSite) types
* [ITU E.212 Mobile Country Code and Mobile Network Code](https://en.wikipedia.org/wiki/Mobile_country_code) values
* [GeoJSON](https://github.com/geojson/schema)
* [TopoJSON](https://github.com/topojson/topojson)
* [IP Geolocation Feeds (geofeed)](https://datatracker.ietf.org/doc/rfc8805/)
type: string
enum:
- ipv4cidr
- ipv6cidr
- asn
- countrycode
- altopid
- subdivisioncode
- footprintunion
- civicaddress
- geoposition
- itue212countrynetworkcode
- postaladdress
- geographicaddress
- geographiclocation
- geographicsite
- geojson
- topojson
- geofeedRFC8805
footprintValue:
description: A list of footprint values.
type: array
items:
oneOf:
- type: string
- type: object
footprintUsage:
description: Indicates that the footprint value represents an Access
Network, a non Access Network, i.e., networks facing the Internet,
or both.
type: string
enum: [access, non_access, both]
precedence:
description: |
Specifies the search execution order of Footprints when they are part of a collection. The lower the numerical value of precedence,
the higher the rule precedence. Rules with equal precedence MAY be executed in parallel if supported.
type: integer
minimum: 0
required:
- name
- version
- footprintType
- footprintValue
- footprintUsage
- precedence
Metadata:
description: >
Tighten validation, avoid client/server drift, and make structures robust.
type: object
properties:
description:
type: string
description: Human-readable description of the entity
createdAt:
type: string
format: date-time
description: |
RFC 3339 timestamp when this mapping was first published.
Providers must not set times in the future.
example: '2025-05-09T14:25:38Z'
lastModifiedAt:
type: string
format: date-time
description: |
RFC 3339 timestamp of the last non-breaking update.
Providers must not set times in the future.
example: '2025-05-10T12:03:00Z'
deprecatedAt:
type: string
format: date-time
description: RFC 3339 timestamp after which this entity is no longer be
applicable.
mappingHash:
type: string
pattern: ^[A-Fa-f0-9]{64}$
description: SHA-256 digest of the canonical JSON representation of this
mapping.
example: 5d41402abc4b2a76b9719d911017c592cf0c58f2b3b65af6f88ab3a2b4d6996f
traceID:
type: string
description: Trace Identifier used across multiple systems.
Overlay:
$ref: ../modules/overlay-openapi.yaml#/components/schemas/Overlay
Action:
$ref: ../modules/overlay-openapi.yaml#/components/schemas/Action-Object
Extends:
$ref: ../modules/overlay-openapi.yaml#/components/schemas/Extends
CamaraOverlay:
description: |
Common attributes of a CAMARA Overlay.
It extends OpenAPI Overlay Specification v1.0.0 for restriction-only schema patches.
allOf:
- $ref: '#/components/schemas/Overlay'
- $ref: '#/components/schemas/VersionedName'
- $ref: '#/components/schemas/Metadata'
- type: object
properties:
actions:
description: A ordered list of actions
type: array
minItems: 1
maxItems: 20
uniqueItems: true
items:
$ref: '#/components/schemas/CamaraAction'
operator:
description: |
Logical operator combining the results of all actions:
- **and**: all actions must succeed; processing stops on first failure
- **or**: failed actions are skipped
type: string
enum: [and, or]
default: and
required: [name, version, actions]
CamaraAction:
type: object
description: |
Extends a standard Overlay Action-Object by
a. refining update to ONLY accept SchemaRestriction
b. letting the API provider pre-compute exactly which nodes will be
affected, using either JSON Pointers or OpenAPI runtime expressions.
This makes it possible to:
1. **target** an OpenAPI document fragment (via JSONPath).
2. **Resolve** that target against an instance of the Open API schema
into one or more concrete locations—each expressed as either a JSON Pointer
or an OpenAPI runtime expression.
3. **Apply** the `update` or `remove` action deterministically to those
resolved locations.
By including `targetLocations`, clients can skip the extra step of evaluating
`target` themselves against instances of the schema, ensuring precise,
unambiguous application and enabling robust validation through attached `SchemaRestrictions`.
When targetLocations is present, any target value MUST be ignored.
allOf:
- $ref: '#/components/schemas/Action'
properties:
id:
type: string
description: Identifier for this action. Used for tracability. Each id MUST
be unique within the overlay.
targetLocations:
description: |
A non-empty list of explicit document locations—specified as a
InstanceLocation. These values override the generic `target`
selector.
All entries MUST use the same syntax (Runtime Expression or JSON Pointer).
type: array
minItems: 1
maxItems: 30
items:
$ref: '#/components/schemas/InstanceLocation'
update:
description: update of schema restrictions
type: object
additionalProperties:
$ref: '#/components/schemas/SchemaRestrictions'
instanceUpdate:
description: An update of an instance document's value.
type: object
instanceRemove:
description: A boolean indicating the result's value should be removed from
the instance's document.
type: boolean
forceAction:
type: boolean
description: |
When **true**, and **restrictions** are satisfied, the specified
**instanceUpdate** or **instanceRemove** MUST be enforced (no silent failures).
If **forceAction** is present, either **instanceUpdate** or **instanceRemove**
MUST also be present.
default: true
example: true
anyOf:
- required: [target]
- required: [targetLocations]
not:
required: [instanceUpdate, instanceRemove]
oneOf:
- not:
required: [forceAction]
- allOf:
- required: [forceAction]
- oneOf:
- required: [instanceUpdate]
- required: [instanceRemove]
InstanceLocation:
description: |
A location in the JSON document that is an instance of an OpenAPI Schema.
It provides an optional endpoint to restrict it as well as the location.
All strings follow a Open API Runtime Expression or JSON Pointer (RFC 6901) format.
type: object
properties:
endpoint:
description: Optional endpoint path of a URI that MUST be present in the
request/response.
allOf:
- $ref: '#/components/schemas/InstanceLocationSyntax'
location:
description: The location of the target result.
allOf:
- $ref: '#/components/schemas/InstanceLocationSyntax'
additionalProperties: false
required: [location]
InstanceLocationSyntax:
description: A string whose format is Open API Runtime Expression or JSON Path.
type: string
minLength: 1
oneOf:
- x-camara-targetSyntax: runtimeexpression
pattern: ^\$(?:url|method|statusCode|request\.(?:header\.[!#$%&'*+\-\.\^_`|~0-9A-Za-z]+|query\.[^\s\/]+|path\.[^\s\/]+|body(?:#\/(?:[^\/~]|~0|~1)+(?:\/(?:[^\/~]|~0|~1)+)*)?)|response\.(?:header\.[!#$%&'*+\-\.\^_`|~0-9A-Za-z]+|body(?:#\/(?:[^\/~]|~0|~1)+(?:\/(?:[^\/~]|~0|~1)+)*)?))
minLength: 1
- x-camara-targetSyntax: jsonPointer
pattern: ^(/([^/~]|~[01])*)*$
minLength: 1
SchemaRestrictions:
description: |
A set of schema constraints evaluated against a single target.
- **restrictions** - An array (min = 1) of `SchemaRestriction` objects.
Each restriction returns a Boolean result when applied to the target.
- **operator** - Optional logical operator that combines the restriction
results. Supported values are: **and** (default), **or**, **not**.
When a single restrictions is supplied, **not** negates that result.
If `operator` is omitted, **and** is assumed.
If only one restriction is present, `operator: not` will negate it. Values of `operator: and` and
`operator: or` are ignored.
If `operator` is present, `restrictions` **MUST** also be present.
type: object
properties:
restrictions:
description: An array of `SchemaRestriction` objects.
type: array
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/SchemaRestriction'
operator:
description: |
Logical operator that combines the results of all restrictions.
- **and** - All restrictions MUST be true.
- **or** - At least one restriction MUST be true.
- **not** - No restriction MAY be true. For a single restriction this simply negates the result.
type: string
enum: [and, or, not]
default: and
required: [restrictions]
SchemaRestriction:
description: |
Single schema update that refines and restricts the target.
This update **MUST** be compatible with the referenced target.
type: object
anyOf:
- $ref: '#/components/schemas/SchemaRestrictionMeta'
- $ref: '#/components/schemas/SchemaRestrictionAnyInstance'
- $ref: '#/components/schemas/SchemaRestrictionNumeric'
- $ref: '#/components/schemas/SchemaRestrictionString'
- $ref: '#/components/schemas/SchemaRestrictionArray'
- $ref: '#/components/schemas/SchemaRestrictionObject'
- $ref: '#/components/schemas/SchemaRestrictionParameter'
- $ref: '#/components/schemas/SchemaRestrictionOperation'
- $ref: '#/components/schemas/SchemaRestrictionPresence'
SchemaRestrictionMeta:
type: object
description: >
Restriction applicable to any target at runtime.
Based upon the JSON Schema [A Vocabulary for Basic Meta-Data Annotations](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-a-vocabulary-for-basic-meta).
additionalProperties: false
properties:
deprecated: {type: boolean, description: Mark as deprecated.}
readOnly: {type: boolean, description: Mark as read-only.}
writeOnly: {type: boolean, description: Mark as write-only.}
default: {type: string, description: Default value to apply.}
SchemaRestrictionAnyInstance:
type: object
description: >
Restriction applicable to any target at runtime.
Based upon the JSON Schema [Validation keywords for Any instances](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-validation-keywords-for-any).
additionalProperties: false
properties:
type:
type: string
enum: [boolean, object, array, number, string, integer]
nullable: true
description: >
Restrict the type of the value. Only applicable when the type was
not initially specified or matches the target's current type.
enum:
type: array
items: {type: string}
description: Restrict allowed values (must be a subset of the original enum).
const:
type: string
description: Force the field to have a constant value.
SchemaRestrictionNumeric:
type: object
description: >
Restriction applicable to numeric ranges (for example min/max values).
Based upon the JSON Schema [Validation keywords for Numeric Instances](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-validation-keywords-for-num).
additionalProperties: false
properties:
multipleOf: {type: number, minimum: 1, description: Value MUST be a multiple
of this number.}
maximum: {type: number, description: Value MUST be less than or equal to this
number.}
minimum: {type: number, description: Value MUST be greater than or equal to
this number.}
exclusiveMaximum: {type: number, description: Value MUST be strictly less
than this number.}
exclusiveMinimum: {type: number, description: Value MUST be strictly greater
than this number.}
SchemaRestrictionString:
type: object
description: >
Restriction applicable to string fields (length or pattern).
Based upon the JSON Schema [Validation keywords for Strings](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-validation-keywords-for-str).
additionalProperties: false
properties:
maxLength: {type: integer, minimum: 0, description: Maximum string length.}
minLength: {type: integer, minimum: 0, description: Minimum string length.}
pattern: {type: string, description: Regular-expression pattern the string
MUST match.}
SchemaRestrictionArray:
type: object
description: >
Restriction applicable to arrays (size or uniqueness).
Based upon the JSON Schema [Validation keywords for Array Instances](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-validation-keywords-for-arr).
additionalProperties: false
properties:
maxItems: {type: integer, minimum: 0, description: Maximum number of items.}
minItems: {type: integer, minimum: 0, description: Minimum number of items.}
uniqueItems: {type: boolean, description: 'If **true**, all items MUST be
unique.'}
maxContains: {type: integer, minimum: 0, description: Maximum count for items
that match the `contains` schema.}
minContains: {type: integer, minimum: 0, description: Minimum count for items
that match the `contains` schema.}
SchemaRestrictionObject:
type: object
description: >
Restriction applicable to object structures.
Based upon the JSON Schema [Validation keywords for Object Instances](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html#name-validation-keywords-for-obj).
additionalProperties: false
properties:
maxProperties: {type: integer, minimum: 0, description: Maximum number of
object properties.}
minProperties: {type: integer, minimum: 0, description: Minimum number of
object properties.}
required:
type: array
items: {type: string}
description: List of required properties (MUST already exist in the schema).
dependentRequired:
type: array
items: {type: string}
description: '[`dependentRequired`](https://json-schema.org/draft/2020-12/json-schema-validation#name-validation-keywords-for-obj)'
excludedProperties:
type: array
items: {type: string}
description: Properties that MUST be absent.
SchemaRestrictionParameter:
type: object
description: >
Restriction that applies only to HTTP request parameters (e.g. query
parameters).
Based upon the OpenAPI *Parameter Object* and provides:
- Mandating the use of an optional parameter - Allowing empty values
additionalProperties: false
properties:
allowEmptyValue:
type: boolean
description: >
Permits empty values. MAY be **true** only if the original schema
did not explicitly specify `allowEmptyValue: false`.
mandatory:
type: boolean
description: >
Mandates the use of an otherwise-optional parameter. Allowed only
when: 1. The original schema does **not** declare `deprecated: true`,
and 2. The original schema does **not** set `mandatory` to the opposite
value.
SchemaRestrictionOperation:
type: object
description: >
Restriction that applies to an absolute or relative path (operation).
Based upon the OpenAPI *Operation Object* and provides:
- `notImplemented` - `notAvailable`
additionalProperties: false
properties:
notImplemented:
type: boolean
description: Marks the operation as unimplemented. Invocation MUST return
**501 Not Implemented**.
notAvailable:
type: boolean
description: Marks the operation as temporarily unavailable. Invocation
MUST return **503 Service Unavailable**.
SchemaRestrictionPresence:
type: object
description: >
Restriction that applies to runtime presence of the target.
properties:
presence:
type: boolean
description: >
When **true**, at least one instance matching the target JSON Pointer
or JSON Path **MUST** be present. When **false**, no such instance **MAY**
be present.
SchemaRestrictionsSet:
description: Base restriction type
type: object
allOf:
- $ref: '#/components/schemas/VersionedName'
properties:
restrictions:
description: restrictions
type: array
uniqueItems: true
minItems: 1
maxItems: 10
items:
$ref: '#/components/schemas/CamaraOverlay'
footprints:
description: footprints
type: array
uniqueItems: true
minItems: 1
maxItems: 10
items:
$ref: '#/components/schemas/Footprint'
resourceServers:
description: resourceServers
type: array
uniqueItems: true
maxItems: 10
items:
type: string
format: uri
required: [restrictions]
CapabilityBitmap:
description: Common attributes of CAMARA capability bitmap
type: object
allOf:
- $ref: '#/components/schemas/CamaraCapabilityQuery'
properties:
mappingVersion:
type: string
description: Version of the capability to restriction mapping, used to detect
changes.
example: 1.0.0
camaraCapabilitiesBitmap:
description: |
Bitmap value of the capabilities to show current state (active or inactive) of the RestrictionSet.
Decimal representation of a binary bitmask indicating active capabilities.
This integer should be interpreted as a binary string (bitfield), where:
- The **least significant bit (rightmost bit)** corresponds to key **"0"** in the `bitmapCapabilities` object.
- The next bit to the left corresponds to key **"1"**, and so on.
- Bit at position `n` (counting from right, 0-based) maps to key `"n"`.
For example:
- If `CapabilityBitmap` = `13`, the binary form is `1101`.
- Interpreted as:
- Bit 0 (LSB, rightmost) → "0" → active
- Bit 1 → "1" → inactive
- Bit 2 → "2" → active
- Bit 3 (MSB) → "3" → active
- This means `bitmapCapabilities["0"]`, `["2"]`, and `["3"]` apply.
Implementors of API provider should preserve this bit order when interpreting or generating the bitmask, so that capability indices remain consistent over time.
type: integer
minimum: 0
format: int64
maximum: 18446744073709551615
example: 6
required: [mappingVersion, camaraCapabilitiesBitmap]
CapabilityInfo:
description: A list of CapabilityDetail.
type: object
properties:
details:
description: a list of CapabilityDetail.
type: array
minItems: 1
maxItems: 1000
uniqueItems: true
items:
$ref: '#/components/schemas/CapabilityDetail'
CapabilityDetail:
description: |
A self-contained snapshot of what each capability means (CapabilityBitmap) and its current active/inactive state.
When these are CapabilitySetFootprint the state is always active.
When it is CapabilitySetBitmap, then CapabilityBitmap is included that conveys the active/inactive state of each
bit position.
type: object
anyOf:
- $ref: '#/components/schemas/CapabilitySetFootprint'
- allOf:
- $ref: '#/components/schemas/CapabilitySetBitmap'
- $ref: '#/components/schemas/CapabilityBitmap'
minProperties: 1
CapabilitySetFootprint:
description: |
Associates a capability with one or more RestrictionSets that
defined by footprint constraints.
type: object
additionalProperties: false
allOf:
- $ref: '#/components/schemas/VersionedName'
- $ref: '#/components/schemas/Metadata'
properties:
footprints:
description: An array of restrictions that apply when the endpoint is present
in one of the entry's footprints.
type: array
minItems: 1
maxItems: 64
uniqueItems: true
items:
allOf:
- $ref: '#/components/schemas/SchemaRestrictionsSet'
- required: [footprints]
required: [footprints]
CapabilitySetBitmap:
description: |
Associates a capability with one or more RestrictionSets
define through a bitmap position.
type: object
allOf:
- $ref: '#/components/schemas/VersionedName'
- $ref: '#/components/schemas/Metadata'
properties:
bitmapCapabilities:
type: object
description: >
Map of bitPosition → SchemaRestrictionsSet. Keys are stringified bitPosition
indices (duplicates impossible). **Header names (object keys)** SHOULD
consist of one or more digits, matching `^[0-9]+$`. (Note: OpenAPI 3.0.3
cannot enforce key-name patterns natively.)
additionalProperties:
$ref: '#/components/schemas/SchemaRestrictionsSet'
required: [bitmapCapabilities]
CamaraCapabilityQueryRequest:
description: A list of queries in the request.
type: object
additionalProperties: true
properties:
queries:
description: A list of CamaraCapabilityQuery
type: array
minItems: 1
maxItems: 100
uniqueItems: true
items:
$ref: '#/components/schemas/CamaraCapabilityQuery'
subscriptionRequest:
$ref: '#/components/schemas/CamaraExtendedSubscriptionRequest'
required: [queries]
CamaraCapabilityQuery:
description: Common attributes of CAMARA capability query
type: object
properties:
resourceScopes:
$ref: '#/components/schemas/ResourceScopes'
overlayExtends:
description: list of unique overlay extends in the query
type: array
minItems: 1
maxItems: 20
uniqueItems: true
items:
$ref: '#/components/schemas/Extends'
required: [overlayExtends]
ResourceScopes:
$ref: ../common/CAMARA_common.yaml#/components/schemas/ResourceScopes
ErrorInfo:
$ref: ../common/CAMARA_common.yaml#/components/schemas/ErrorInfo
CamaraExtendedSubscriptionRequest:
$ref: ../common/CAMARA-subscriptions-openapi.yaml#/components/schemas/CamaraExtendedSubscriptionRequest
org.camaraproject.capability.v0.detail:
description: The detail of the requested capability event subscription.
type: object
allOf:
- $ref: ../common/CAMARA-subscriptions-openapi.yaml#/components/schemas/SubscriptionDetail
- type: object
properties:
resourceScopes:
$ref: '#/components/schemas/ResourceScopes'
additionalProperties: false
CloudEvent:
$ref: ../common/CAMARA-subscriptions-openapi.yaml#/components/schemas/CamaraExtendedCloudEventsAttribute
CloudEventData:
$ref: ../common/CAMARA-subscriptions-openapi.yaml#/components/schemas/CamaraCloudEventData
org.camaraproject.capability.v0.capability-bitmap-changed:
description: Event structure for capability bitmap changed
allOf:
- $ref: '#/components/schemas/CloudEvent'
- type: object
properties:
data:
$ref: '#/components/schemas/org.camaraproject.capability.v0.capability-bitmap-changed.data'
required: [data]
additionalProperties: false
example:
$ref: '#/components/examples/EVENT_CAPABILITY_BITMAP_CHANGED_EXAMPLE/value'
org.camaraproject.capability.v0.capability-bitmap-changed.data:
description: Event for capability bitmap changed
allOf:
- $ref: '#/components/schemas/CloudEventData'
- type: object
properties:
capabilityBitmap:
$ref: '#/components/schemas/CapabilityBitmap'
required: [capabilityBitmap]
additionalProperties: false
org.camaraproject.capability.v0.capability-info-changed:
description: Event structure for capability info changed
allOf:
- $ref: '#/components/schemas/CloudEvent'
- type: object
properties:
data:
$ref: '#/components/schemas/org.camaraproject.capability.v0.capability-info-changed.data'
required: [data]
additionalProperties: false
example:
$ref: '#/components/examples/EVENT_CAPABILITY_INFO_CHANGED_EXAMPLE/value'
org.camaraproject.capability.v0.capability-info-changed.data:
description: Event for capability info changed
allOf:
- $ref: '#/components/schemas/CloudEventData'
- type: object
properties:
capabilityInfo:
$ref: '#/components/schemas/CapabilityInfo'
required: [capabilityInfo]
additionalProperties: false
responses:
CapabilityNotModified304:
description: Not Modified (cached response)
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
Generic400:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic400
CapabilityApiBadRequest400:
description: Bad Request when query capability
headers:
x-correlator:
$ref: '#/components/headers/x-correlator'
content:
application/json:
schema:
title: CapabilityApiBadRequest400
allOf:
- $ref: '#/components/schemas/ErrorInfo'
- type: object
properties:
status:
enum: [400]
code:
enum:
- INVALID_ARGUMENT
- OUT_OF_RANGE
- INVALID_CREDENTIAL
- INVALID_TOKEN
examples:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
value:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query
param.
GENERIC_400_OUT_OF_RANGE:
description: Out of Range. Specific Syntax Exception used when a given
field has a pre-defined range or a invalid filter criteria combination
is requested
value:
status: 400
code: OUT_OF_RANGE
message: Client specified an invalid range.
GENERIC_400_INVALID_CREDENTIAL:
value:
status: 400
code: INVALID_CREDENTIAL
message: Only Access token is supported
GENERIC_400_INVALID_TOKEN:
value:
status: 400
code: INVALID_TOKEN
message: Only bearer token is supported
Generic401:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic401
Generic403:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic403
Generic404:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic404
CapabilityApiNotFound404:
description: Capability API not found
content:
application/json:
schema:
title: CapabilityApiNotFound404
allOf:
- $ref: '#/components/schemas/ErrorInfo'
- type: object
properties:
status:
enum: [404]
code:
enum: [NOT_FOUND]
example:
status: 404
code: NOT_FOUND
message: No Capability API found
Generic409:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic409
Generic410:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic410
Generic429:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic429
Generic500:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic500
Generic503:
$ref: ../common/CAMARA_common.yaml#/components/responses/Generic503
examples:
CAMARA_CAPABILITY_QUERY_REQUEST_EXAMPLE:
summary: Example of capability query
description: query capability request
value:
queries:
- resourceScopes:
- phoneNumber: '+123456788'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
subscriptionRequest:
sink: https://application-server.com/notifications
protocol: HTTP
types:
- org.camaraproject.capability.v0.capability-info-changed
- org.camaraproject.capability.v0.capability-bitmap-changed
config:
subscriptionDetail:
resourceScopes:
- phoneNumber: '+123456788'
CAMARA_CAPABILITY_QUERY_REQUEST_RESPONSE_EXAMPLE:
summary: Example of capability query response
description: query capability response
value:
details:
- name: cap-qod-adi
version: 1.0.1
createdAt: '2025-05-09T14:25:38Z'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
resourceScopes:
- phoneNumber: '+123456788'
mappingVersion: 1.0.0
camaraCapabilitiesBitmap: 63
bitmapCapabilities:
'0':
name: rr-qod-adi
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.object-instance-restriction.accepted-device-identifiers
version: 0.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['Device'].properties['ipv4Address']
remove: true
- target: $.components.schemas['Device'].properties['networkAccessIdentifier']
remove: true
'1':
name: rr-qod-xcor
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.parameter-restriction.x-cor-required
version: 0.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.parameters['x-correlator']
update:
xcor-required:
restrictions:
- mandatory: true
'2':
name: rr-session-extend-unavailable
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.operation-restriction.session-extend-unavailable
version: 0.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.paths['/sessions/{sessionId}/extend'].post
update:
session-extend-unavailable:
restrictions:
- notAvailable: true
'3':
name: rr-session-accept-qos
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.enum-restriction.accepted-qos-profiles
version: 0.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
operator: and
actions:
- targetLocations:
- location: $method
update:
accepted-qos-profiles:
restrictions:
- enum: [POST]
- targetLocations:
- location: $request.path.sessionId
update:
accepted-qos-profiles:
restrictions:
- enum: [/sessions]
- targetLocations:
- location: $request.body#/qosProfile
update:
accepted-qos-profiles:
restrictions:
- enum: [QoS_XR, QoS_VC]
'4':
name: rr-ipv6-portspec-max-5
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.object-instance-restriction.appserv-ipv6
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['ApplicationServer'].properties['ipv4Address']
remove: true
- name: org.camaraproject.capability.v0.array-size-restriction.portspec-ports-max5
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['PortsSpec'].properties['ports']
update:
portspec-ports-max5:
restrictions:
- maxItems: 5
'5':
name: rr-sessioninfo-duration-multipleof-60
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.numeric-restriction.sessioninfo-duration-min60-multiple60
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['SessionInfo'].properties['duration']
update:
sessioninfo-duration-min60-multiple60:
restrictions:
- minimum: 60
- multipleOf: 60
'6':
name: rr-qosprofile-get-unavailable
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.operation-restriction.qosprofile-get-unavailable
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
actions:
- target: $.paths['/qos-profiles/{name}'].get
remove: true
EVENT_CAPABILITY_BITMAP_CHANGED_EXAMPLE:
summary: Cloud event example for capability bitmap changed
description: Cloud event example for capability bitmap changed
value:
id: cb1
source: https://api.example.com/capability/capability-subscriptions/bitmap
datacontenttype: application/json
specversion: '1.0'
type: org.camaraproject.capability.v0.capability-bitmap-changed
time: '2025-05-06T00:00:00.000Z'
data:
capabilityBitmap:
resourceScopes:
- phoneNumber: '+123456788'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
mappingVersion: 1.0.0
camaraCapabilitiesBitmap: 127
EVENT_CAPABILITY_BITMAP_CHANGED_BATCH_EXAMPLE:
summary: Batch (single item) - capability bitmap changed
description: Cloud event batch example for capability bitmap changed
value:
- id: cb1
source: https://api.example.com/capability/capability-subscriptions/bitmap
datacontenttype: application/json
specversion: '1.0'
type: org.camaraproject.capability.v0.capability-bitmap-changed
time: '2025-05-06T00:00:00.000Z'
data:
capabilityBitmap:
resourceScopes:
- phoneNumber: '+123456788'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
mappingVersion: 1.0.0
camaraCapabilitiesBitmap: 127
EVENT_CAPABILITY_INFO_CHANGED_EXAMPLE:
description: Cloud event example for capability info changed
value:
id: ci1
source: https://api.example.com/capability/capability-subscriptions/info
specversion: '1.0'
datacontenttype: application/json
type: org.camaraproject.capability.v0.capability-info-changed
time: '2025-05-06T00:00:00.000Z'
data:
capabilityInfo:
details:
- name: cap-qod-adi
version: 1.0.2
createdAt: '2025-05-09T14:25:38Z'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
resourceScopes:
- phoneNumber: '+123456788'
mappingVersion: 1.0.0
camaraCapabilitiesBitmap: 1
bitmapCapabilities:
'0':
name: rr-qod-adi
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.object-instance-restriction.accepted-device-identifiers
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['Device'].properties['ipv4Address']
remove: true
- target: $.components.schemas['Device'].properties['networkAccessIdentifier']
remove: true
EVENT_CAPABILITY_INFO_CHANGED_BATCH_EXAMPLE:
summary: Batch (single item) - capability info changed
description: Cloud event batch example for capability info changed
value:
- id: ci1
source: https://api.example.com/capability/capability-subscriptions/info
specversion: '1.0'
datacontenttype: application/json
type: org.camaraproject.capability.v0.capability-info-changed
time: '2025-05-06T00:00:00.000Z'
data:
capabilityInfo:
details:
- name: cap-qod-adi
version: 1.0.2
createdAt: '2025-05-09T14:25:38Z'
overlayExtends:
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
- https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/qos-profiles.yaml
resourceScopes:
- phoneNumber: '+123456788'
mappingVersion: 1.0.0
camaraCapabilitiesBitmap: 1
bitmapCapabilities:
'0':
name: rr-qod-adi
version: 1.0.1
restrictions:
- name: org.camaraproject.capability.v0.object-instance-restriction.accepted-device-identifiers
version: 1.0.1
extends: https://github.com/camaraproject/QualityOnDemand/blob/r2.2/code/API_definitions/quality-on-demand.yaml
actions:
- target: $.components.schemas['Device'].properties['ipv4Address']
remove: true
- target: $.components.schemas['Device'].properties['networkAccessIdentifier']
remove: true