...
Template CRUD operations
Create xpath template
Interface definition | Description |
---|
Content-Type | application/json |
Operation | POST |
URI | /api/v1/templates |
Request Body
Attribute | Required | Type | Description |
---|
id | Y | String | Identifier for the template |
schema-set | Y | String | schema set on which xpath query should be executed |
template | Y | String | xpath template |
Response Codes
Code | Description |
---|
201 | Template created successfully |
400 | Bad Request (Error in request attributes) |
500 | Internal server error |
List all xpath template
Interface definition | Description |
---|
Content-Type | application/json |
Operation | GET |
URI | /api/v1/templates |
Response Codes
Code | Description |
---|
200 | Templates returned successfully |
404 | No templates found |
500 | Internal server error |
Response Body
Attribute | Required | Type | Description |
---|
templates | Y | List | List of template objects |
Template Object
Attribute | Required | Type | Description |
---|
id | Y | String | Identifier for the template |
schema-set | Y | String | schema set on which xpath query should be executed |
template | Y | String | xpath template |
Get a xpath template by id
Interface definition | Description |
---|
Content-Type | application/json |
Operation | GET |
URI | /api/v1/templates/{schema-set}/{id} |
Response Codes
Code | Description |
---|
200 | Template found and returned |
404 | Template not found |
500 | Internal server error |
Response Body
Same as template Object
Delete xpath template
Interface definition | Description |
---|
Content-Type | application/json |
Operation | DELETE |
URI | /api/v1/templates/{schema-set}/{id} |
Response Codes
Code | Description |
---|
200 | Template deleted successfully |
400 | Bad Request (Error in request attributes) |
500 | Internal server error |
Execute template
Interface definition | Description |
---|
Content-Type | application/json |
Operation | POST |
URI | /api/v1/execute/{schema-set}/{id} |
Request Body
Attribute | Required | Type | Description |
---|
Input | Y | JSON blob | Input dictionary to be applied to the template |
Response Codes
Code | Description |
---|
200 | Template executed successfully |
400 | Bad Request (Error in request attributes) |
500 | Internal server error |
Response Body
Attribute | Required | Type | Description |
---|
result | Y | JSON Blob | Result 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
Elite soft json viewer |
---|
{
"input": {
"nearrtric_id": 11,
"gnbdu_id": 1,
"nrcelldu_id": 15296,
"rrmpolicy_id": 123
}
}
|
Response Object
Elite soft json viewer |
---|
{
"result": {
"key": "value"
}
} |
5. Deployment aspects
To be updated
...