camara / original /DedicatedNetworks /code /API_definitions /dedicated-network-areas.yaml
emolero's picture
Upload folder using huggingface_hub
ab74ec2 verified
Raw
History Blame Contribute Delete
16 kB
openapi: 3.0.3
info:
title: Dedicated Network - Areas
description: |
# Introduction
This API allows for discovering available network service areas, which are the geographical areas offered by the network provider where consitent coverage according to indicated network profile(s) and QoS profiles is provided, and which is to be used in conjunction with the Dedicated Network API.
For more information about the Dedicated Network APIs, see the _GeneralDescription_ document in the Dedicated Networks [repository](https://github.com/camaraproject/DedicatedNetworks/).
# Network Service Areas
A Network Service Area represents a geographical area with coverage consistent with the characteristics of the network profiles and the QoS profiles supported in the area. It enables API Consumers to select the geographical area where they can expect to consume the reserved network connectivity resources. A Network Service Area may have been pre-agreed between the API Provider and API Consumer.
A Network Service Area contains information about its geographical boundaries and the supported network profiles and QoS profiles. It is uniquely identified by a UUID identifier and it contains a human readable name and description.
# Network Service Areas API
The key characteristics of the API include:
- Network Service Areas are read-only resources from the API Consumer perspective
- They are discoverable by POST operations
- They are readable by GET operations
- Each Network Service Area has a unique identifier (areaId)
- The areaId serves as a reference when creating a Dedicated Network
- The API returns only Network Service Areas that the API Consumer is eligible to use based on their agreements
# Authorization and authentication
The "Camara Security and Interoperability Profile" provides details of how an API consumer requests an access token. Please refer to Identity and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the profile.
The specific authorization flows to be used will be agreed upon during the onboarding process, happening between the API consumer and the API provider, taking into account the declared purpose for accessing the API, whilst also being subject to the prevailing legal framework dictated by local legislation.
In cases where personal data is processed by the API and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of three-legged access tokens is mandatory. This ensures that the API remains in compliance with privacy regulations, upholding the principles of transparency and user-centric privacy-by-design.
# Querying one or more Areas
All available network service areas of the API consumer can be queried by performing a `POST` operation on the `/retrieve-service-areas` endpoint.
The API Consumer may provide the following input parameters as search criteria which must be matched for the network service area to be returned:
- `atLocation` - to return the network service areas available at the given geographical location
- `overlappingArea` - to return the network service areas whose geographical area overlaps (but does not fully cover) the input geographical area, where the input geographical area may be a circle or polygon
- `coveringArea` - to return the network service areas whose geographical area fully covers the input geographical area will be returned, where the input geographical area may be a circle or polygon
- `byName` - to return the network service areas with a name matching exactly the input string
- `byNetworkProfileId` - to return the network service areas which support the input network profile identifier
- `byQosProfileName` - to return the network service areas which support the input QoS profile name
A specific network service area of the API consumer can be queried by performing a `GET` operation on the `/areas/{areaId}` endpoint.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: 0.6
servers:
- url: "{apiRoot}/dedicated-network-areas/vwip"
variables:
apiRoot:
default: http://localhost:9091
description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath`
paths:
/retrieve-service-areas:
post:
tags:
- Areas
summary: Retrieve dedicated network service areas, filtered by additional search criteria
operationId: retrieveNetworkServiceAreas
requestBody:
description: Parameters to query service areas
content:
application/json:
schema:
$ref: "#/components/schemas/RetrieveServiceAreasRequest"
required: true
responses:
'200':
description: List of available dedicated network service areas
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ServiceArea'
'400':
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"404":
$ref: "#/components/responses/Generic404"
/areas/{areaId}:
get:
tags:
- Areas
summary: Read a dedicated network service area
operationId: readNetworkServiceArea
parameters:
- name: areaId
in: path
required: true
schema:
$ref: "#/components/schemas/ServiceAreaId"
- $ref: "#/components/parameters/x-correlator"
responses:
'200':
description: Information about the dedicated network service area
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceArea'
'400':
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"404":
$ref: "#/components/responses/Generic404"
components:
headers:
x-correlator:
description: Correlation id for the different services
schema:
$ref: "#/components/schemas/XCorrelator"
parameters:
x-correlator:
name: x-correlator
in: header
description: Correlation id for the different services
schema:
$ref: "#/components/schemas/XCorrelator"
schemas:
XCorrelator:
type: string
pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$
example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46"
NetworkProfileId:
type: string
QosProfileName:
description: |
A unique name for identifying a specific QoS profile.
This may follow different formats depending on the service providers implementation.
Some options addresses:
- A UUID style string
- Support for predefined profiles QOS_S, QOS_M, QOS_L, and QOS_E
- A searchable descriptive name
The set of QoS Profiles that an operator is offering can be retrieved by means of the QoS Profile API.
type: string
example: QCI_1_voice
minLength: 3
maxLength: 256
format: string
pattern: "^[a-zA-Z0-9_.-]+$"
ServiceAreaId:
type: string
format: uuid
RetrieveServiceAreasRequest:
description: Request object to retrieve service areas that match all the given properties
type: object
properties:
atLocation:
$ref: "#/components/schemas/Point"
overlappingArea:
$ref: "#/components/schemas/Area"
coveringArea:
$ref: "#/components/schemas/Area"
byName:
type: string
byNetworkProfileId:
$ref: "#/components/schemas/NetworkProfileId"
byQosProfileName:
$ref: "#/components/schemas/QosProfileName"
ServiceArea:
description: Common attributes of a service area, i.e. where the dedicated network service is supported
properties:
id:
$ref: '#/components/schemas/ServiceAreaId'
name:
type: string
description:
type: string
area:
$ref: '#/components/schemas/Area'
networkProfiles:
description: Dedicated network profiles which are supported in this area.
type: array
items:
$ref: "#/components/schemas/NetworkProfileId"
minItems: 1
qosProfiles:
description: Qos Profiles which are supported in this area.
type: array
items:
$ref: '#/components/schemas/QosProfileName'
minItems: 1
required:
- id
- area
anyOf:
- required:
- networkProfiles
- required:
- qosProfiles
Area:
description: Common attributes of a geographical area, base schema for all area types
type: object
properties:
areaType:
$ref: "#/components/schemas/AreaType"
required:
- areaType
discriminator:
propertyName: areaType
mapping:
CIRCLE: "#/components/schemas/Circle"
POLYGON: "#/components/schemas/Polygon"
AreaType:
type: string
description: |
Type of this area.
CIRCLE - The area is defined as a circle.
POLYGON - The area is defined as a polygon.
enum:
- CIRCLE
- POLYGON
Circle:
description: Circular area
allOf:
- $ref: "#/components/schemas/Area"
- type: object
properties:
center:
$ref: "#/components/schemas/Point"
radius:
type: integer
description: |
Radius from `center` in meters.
minimum: 1
maximum: 200000
required:
- center
- radius
Polygon:
description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself.
allOf:
- $ref: "#/components/schemas/Area"
- type: object
required:
- boundary
properties:
boundary:
$ref: "#/components/schemas/PointList"
PointList:
description: List of points defining a polygon
type: array
items:
$ref: "#/components/schemas/Point"
minItems: 3
maxItems: 15
Point:
type: object
description: Coordinates (latitude, longitude) defining a location in a map.
required:
- latitude
- longitude
properties:
latitude:
$ref: "#/components/schemas/Latitude"
longitude:
$ref: "#/components/schemas/Longitude"
example:
latitude: 50.735851
longitude: 7.10066
Latitude:
description: Latitude component of a location.
type: number
format: double
minimum: -90
maximum: 90
Longitude:
description: Longitude component of location.
type: number
format: double
minimum: -180
maximum: 180
ErrorInfo:
type: object
required:
- status
- code
- message
properties:
status:
type: integer
description: HTTP response status code
code:
type: string
description: A human-readable code to describe the error
message:
type: string
description: A human-readable description of what the event represents
responses:
Generic400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
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.
Generic401:
description: Unauthorized
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_401_UNAUTHENTICATED:
description: Request cannot be authenticated
value:
status: 401
code: UNAUTHENTICATED
message: Request not authenticated due to missing, invalid, or expired credentials.
GENERIC_401_AUTHENTICATION_REQUIRED:
description: New authentication is needed, authentication is no longer valid
value:
status: 401
code: AUTHENTICATION_REQUIRED
message: New authentication is required.
Generic403:
description: Forbidden
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
value:
status: 403
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action.
GENERIC_403_INVALID_TOKEN_CONTEXT:
description: Reflect some inconsistency between information in some field of the API and the related OAuth2 Token
value:
status: 403
code: INVALID_TOKEN_CONTEXT
message: "{{field}} is not consistent with access token."
Generic404:
description: Not found
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_404_NOT_FOUND:
description: Resource is not found
value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
Generic410:
description: Gone
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_410_GONE:
description: Use in notifications flow to allow API Consumer to indicate that its callback is no longer available
value:
status: 410
code: GONE
message: Access to the target resource is no longer available.