Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

1. Overview

This service shall be used to map the erstwhile Config-DB-like REST APIs to appropriate CPS API calls. The purpose of this service is to abstract the details of (possibly multiple, and complex) XPath queries from the users of CPS. It enables CPS-users to continue using simple REST API calls that are intuitive and easy-to-understand and implement. The mapping to appropriate queries to CPS (including mapping of one API call to many Xpath queries) shall be done in a generic way by the API Mapper service.


2. Architecture

 

3. API definition guide

Swagger file: api-mapper-service-swagger.yaml

Template CRUD operations

Create xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationPUT
URI/api/v1/templates

Request Body

AttributeRequiredTypeDescription
idYStringIdentifier for the template
modelYStringschema set on which xpath query should be executed
xpathTemplateYStringxpath template

Response Codes

CodeDescription
201Template created successfully
400Bad Request (Error in request attributes)
500Internal server error

List all xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationGET
URI/api/v1/templates

Response Codes

CodeDescription
200Templates returned successfully
404No templates found
500Internal server error

Response Body

AttributeRequiredTypeDescription
templatesYListList of template objects

Template Object

AttributeRequiredTypeDescription
idYStringIdentifier for the template
modelYStringschema set on which xpath query should be executed
xpathTemplateYStringxpath template
apiTypeYStringAPI type to be used towards CPS (get, query, edit)

Get a xpath template by id

Interface definitionDescription
Content-Typeapplication/json
OperationGET
URI/api/v1/templates/{schema}/{id}

Response Codes

CodeDescription
200Template found and returned
404Template not found
500Internal server error

Response Body

Same as template Object

Delete xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationDELETE
URI/api/v1/templates/{schema}/{id}

Response Codes

CodeDescription
200Template deleted successfully
400Bad Request (Error in request attributes)
500Internal server error

Execute template

Interface definitionDescription
Content-Typeapplication/json
OperationPOST
URI/api/v1/execute/{schema}/{id}

Request Body

AttributeRequiredTypeDescription
inputYJSON blobInput dictionary to be applied to the template
payloadNJSON blobPayload to be used during edit/patch

Response Codes

CodeDescription
200Template executed successfully
400Bad Request (Error in request attributes)
404Template Not  found
500Internal server error

Response Body

AttributeRequiredTypeDescription
resultYJSON BlobResult of the xpath query as JSON object

4. Dependencies

Definition of templates

Sample xpath query

/NearRTRIC[idNearRTRIC=11]/GNBDUFunction[idGNBDUFunction=1]/NRCellDU[idNRCellDU=15296]/attributes/RRMPolicyRatio[id=123]

Sample xpath template

/NearRTRIC[idNearRTRIC={{nearrtric_id}}]/GNBDUFunction[idGNBDUFunction={{gnbdu_id}}]/NRCellDU[idNRCellDU={{nrcelldu_id}}]/attributes/RRMPolicyRatio[id={{rrmpolicy_id}}]

Sample API for above template


Response Object

5. Output Transformation

TEMPLATE TABLE :(existing)

templateIdmodelxpathTemplaterequestType
1ran-network/NearRTRICget
2ran-network/NearRTRIC[idNearRTRIC={{nearrtric_id}}]get

TRANSFORMATION TABLE:(proposed)

transformationIdtemplateIdrequesttransformParam
11TrakingAreaidNearRTRIC
22TrakingAreaattributes
32TrakingAreatrakingArea

6. Deployment aspects


To be updated


  • No labels