Skip to content

Commit 83232fb

Browse files
committed
TELCODOCS#1912: Added API endpoints for delete subscription and delete all subscriptions
1 parent 05e9773 commit 83232fb

File tree

2 files changed

+58
-10
lines changed

2 files changed

+58
-10
lines changed

modules/cnf-fast-event-notifications-api-refererence.adoc

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,44 @@ Creates a new subscription. If a subscription is successfully created, or if it
6363
}
6464
----
6565

66+
[discrete]
67+
=== HTTP method
68+
69+
`DELETE api/ocloudNotifications/v1/subscriptions`
70+
71+
[discrete]
72+
=== Description
73+
74+
Deletes all subscriptions.
75+
76+
.Example API response
77+
[source,json]
78+
----
79+
{
80+
"status": "deleted all subscriptions"
81+
}
82+
----
83+
6684
[id="api-ocloud-notifications-v1-subscriptions-subscription_id_{context}"]
67-
== api/ocloudNotifications/v1/subscriptions/<subscription_id>
85+
== api/ocloudNotifications/v1/subscriptions/{subscription_id}
6886

6987
[discrete]
7088
=== HTTP method
7189

72-
`GET api/ocloudNotifications/v1/subscriptions/<subscription_id>`
90+
`GET api/ocloudNotifications/v1/subscriptions/{subscription_id}`
7391

7492
[discrete]
7593
=== Description
7694

77-
Returns details for the subscription with ID `<subscription_id>`
95+
Returns details for the subscription with ID `subscription_id`.
7896

79-
.Query parameters
97+
.Global path parameters
8098
[cols=2*, width="60%", options="header"]
8199
|====
82100
|Parameter
83101
|Type
84102

85-
|`<subscription_id>`
103+
|`subscription_id`
86104
|string
87105
|====
88106

@@ -97,6 +115,34 @@ Returns details for the subscription with ID `<subscription_id>`
97115
}
98116
----
99117

118+
[discrete]
119+
=== HTTP method
120+
121+
`DELETE api/ocloudNotifications/v1/subscriptions/{subscription_id}`
122+
123+
[discrete]
124+
=== Description
125+
126+
Deletes the subscription with ID `subscription_id`.
127+
128+
.Global path parameters
129+
[cols=2*, width="60%", options="header"]
130+
|====
131+
|Parameter
132+
|Type
133+
134+
|`subscription_id`
135+
|string
136+
|====
137+
138+
.Example API response
139+
[source,json]
140+
----
141+
{
142+
"status": "OK"
143+
}
144+
----
145+
100146
[id="api-ocloudnotifications-v1-health_{context}"]
101147
== api/ocloudNotifications/v1/health
102148

@@ -286,7 +332,7 @@ $ oc logs -f linuxptp-daemon-cvgr6 -n openshift-ptp -c cloud-event-proxy
286332
----
287333

288334
[id="resource-address-current-state_{context}"]
289-
== api/ocloudNotifications/v1/<resource_address>/CurrentState
335+
== api/ocloudNotifications/v1/{resource_address}/CurrentState
290336

291337
[discrete]
292338
=== HTTP method
@@ -306,13 +352,13 @@ Configure the `CurrentState` API endpoint to return the current state of the `os
306352
* `ptp-clock-class-change` notifications describe the current state of the PTP clock class.
307353
* `lock-state` notifications describe the current status of the PTP equipment lock state. Can be in `LOCKED`, `HOLDOVER` or `FREERUN` state.
308354

309-
.Query parameters
355+
.Global path parameters
310356
[cols=2*, width="60%", options="header"]
311357
|====
312358
|Parameter
313359
|Type
314360

315-
|`<resource_address>`
361+
|`resource_address`
316362
|string
317363
|====
318364

networking/ptp/using-ptp-events.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@ Use the following API endpoints to subscribe the `cloud-event-consumer` DU appli
3636
* xref:../../networking/ptp/using-ptp-events.adoc#api-ocloud-notifications-v1-subscriptions_{context}[`/api/ocloudNotifications/v1/subscriptions`]
3737
- `POST`: Creates a new subscription
3838
- `GET`: Retrieves a list of subscriptions
39+
- `DELETE`: Deletes all subscriptions
3940

40-
* xref:../../networking/ptp/using-ptp-events.adoc#api-ocloud-notifications-v1-subscriptions-subscription_id_{context}[`/api/ocloudNotifications/v1/subscriptions/<subscription_id>`]
41+
* xref:../../networking/ptp/using-ptp-events.adoc#api-ocloud-notifications-v1-subscriptions-subscription_id_{context}[`/api/ocloudNotifications/v1/subscriptions/{subscription_id}`]
4142
- `GET`: Returns details for the specified subscription ID
43+
- `DELETE`: Deletes the subscription associated with the specified subscription ID
4244

4345
* xref:../../networking/ptp/using-ptp-events.adoc#api-ocloudnotifications-v1-health_{context}[`/api/ocloudNotifications/v1/health`]
4446
- `GET`: Returns the health status of `ocloudNotifications` API
4547

4648
* xref:../../networking/ptp/using-ptp-events.adoc#api-ocloudnotifications-v1-publishers_{context}[`api/ocloudNotifications/v1/publishers`]
4749
- `GET`: Returns an array of `os-clock-sync-state`, `ptp-clock-class-change`, `lock-state`, and `gnss-sync-status` messages for the cluster node
4850

49-
* xref:../../networking/ptp/using-ptp-events.adoc#resource-address-current-state_{context}[`/api/ocloudnotifications/v1/<resource_address>/CurrentState`]
51+
* xref:../../networking/ptp/using-ptp-events.adoc#resource-address-current-state_{context}[`/api/ocloudnotifications/v1/{resource_address}/CurrentState`]
5052
- `GET`: Returns the current state of one the following event types: `os-clock-sync-state`, `ptp-clock-class-change`, `lock-state`, or `gnss-state-change` events
5153

5254
[NOTE]

0 commit comments

Comments
 (0)