aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorrajesh.kumar <rk00747546@techmahindra.com>2024-12-24 13:40:06 +0530
committerrajesh.kumar <rk00747546@techmahindra.com>2025-03-05 11:19:34 +0530
commita6e58e73589e12cd52992bdf6177971dc88dd4c5 (patch)
tree1f6b732ee0ac323c4ac08cb948a37d0f88ecb783 /docs
parent4c645ef7d6e5a76a7d26991c247533cb75e64e22 (diff)
Add APIs to control notification subscription
- Add API for notification subscription - Add API for notification unsubscription - Add API for getting notification subscription information Issue-ID: CPS-2428 Change-Id: I56c34400dc73c71b936a51260efd241224dccdba Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/api/swagger/cps/openapi.yaml224
1 files changed, 223 insertions, 1 deletions
diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml
index 330c2ca7f7..154548797b 100644
--- a/docs/api/swagger/cps/openapi.yaml
+++ b/docs/api/swagger/cps/openapi.yaml
@@ -332,7 +332,7 @@ paths:
- cps-admin
/{apiVersion}/admin/dataspaces/{dataspace-name}/actions/clean:
post:
- description: Clean the dataspace (remove orphaned modules)
+ description: Clean the dataspace (remove orphaned schema sets and modules)
operationId: cleanDataspace
parameters:
- description: apiVersion
@@ -2562,6 +2562,208 @@ paths:
tags:
- cps-query
x-codegen-request-body-name: xpath
+ /v2/notification-subscription:
+ delete:
+ description: Delete cps notification subscription
+ operationId: deleteNotificationSubscription
+ parameters:
+ - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
+ examples:
+ subscription by dataspace xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']"
+ subscription by anchor xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
+ in: query
+ name: xpath
+ required: true
+ schema:
+ default: /dataspaces
+ type: string
+ responses:
+ "204":
+ content: {}
+ description: No Content
+ "400":
+ content:
+ application/json:
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Forbidden
+ "409":
+ content:
+ application/json:
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Conflict
+ "500":
+ content:
+ application/json:
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Internal Server Error
+ summary: Delete cps notification subscription
+ tags:
+ - cps-admin
+ get:
+ description: Get cps notification subscription
+ operationId: getNotificationSubscription
+ parameters:
+ - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
+ examples:
+ subscription by dataspace xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']"
+ subscription by anchor xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
+ in: query
+ name: xpath
+ required: true
+ schema:
+ default: /dataspaces
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotificationSubscriptionsDataSample'
+ description: OK
+ "400":
+ content:
+ application/json:
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Forbidden
+ "409":
+ content:
+ application/json:
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Conflict
+ "500":
+ content:
+ application/json:
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Internal Server Error
+ summary: Get cps notification subscription
+ tags:
+ - cps-admin
+ post:
+ description: Create cps notification subscription
+ operationId: createNotificationSubscription
+ parameters:
+ - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
+ examples:
+ subscription by dataspace xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']"
+ subscription by anchor xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
+ in: query
+ name: xpath
+ required: true
+ schema:
+ default: /dataspaces
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ dataSample:
+ $ref: '#/components/examples/NotificationSubscriptionsDataSample'
+ value: null
+ schema:
+ type: object
+ required: true
+ responses:
+ "201":
+ description: Created without response body
+ "400":
+ content:
+ application/json:
+ example:
+ status: 400
+ message: Bad Request
+ details: The provided request is not valid
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ example:
+ status: 403
+ message: Request Forbidden
+ details: This request is forbidden
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Forbidden
+ "409":
+ content:
+ application/json:
+ example:
+ status: 409
+ message: Conflicting request
+ details: The request cannot be processed as the resource is in use.
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Conflict
+ "500":
+ content:
+ application/json:
+ example:
+ status: 500
+ message: Internal Server Error
+ details: Internal Server Error occurred
+ schema:
+ $ref: '#/components/schemas/ErrorMessage'
+ description: Internal Server Error
+ summary: Create cps notification subscription
+ tags:
+ - cps-admin
components:
examples:
dataSample:
@@ -2615,6 +2817,12 @@ components:
name: SciFi
- code: 2
name: kids
+ NotificationSubscriptionsDataSample:
+ value:
+ cps-notification-subscriptions:dataspaces:
+ dataspace:
+ - name: dataspace01
+ - name: dataspace02
parameters:
dataspaceNameInQuery:
description: dataspace-name
@@ -2795,6 +3003,19 @@ components:
schema:
example: 10
type: integer
+ notificationSubscriptionXpathInQuery:
+ description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
+ examples:
+ subscription by dataspace xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']"
+ subscription by anchor xpath:
+ value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
+ in: query
+ name: xpath
+ required: true
+ schema:
+ default: /dataspaces
+ type: string
responses:
Created:
content:
@@ -2956,6 +3177,7 @@ components:
type: string
title: Module reference object
type: object
+ NotificationSubscriptionsDataSample: {}
getDeltaByDataspaceAnchorAndPayload_request:
properties:
json: