{"type":"api","title":"Create connectionless subscription","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/59d48f60-cd88-3cf8-8862-0da20c3d549d","info":{"title":"Connectionless Subscription APIs","description":"Connectionless subscription APIs exposed by Notification service.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"1.0.0"},"tags":[{"name":"Connectionless Subscriptions","description":"Points to note: \nThe actual response will,\n- Have namespace prefixed in the attribute name\n- Not have attributes whose values are null\n- Have the attribute names \"-\" separated in some cases\n- Have additional section with firstIndex and lastIndex attributes"}],"x-parser-conf":{"overview":{"markdownPath":"reference/EMF/Notification/cnctnless-api-overview.md"}},"openapi":"3.1.0","servers":[{"url":"https://{server_ip}:30603/crosswork/notification/restconf/data/v2","description":"Generated server url"}]},"spec":{"tags":["Connectionless Subscriptions"],"summary":"Create connectionless subscription","description":"Payload attributes: \n\u003cb\u003eclient-url\u003c/b\u003e: string (url of the rest endpoint running at the client \n \\\u003cscheme\u003e:\\\u003cipaddress of the client\u003e:\\\u003cport\u003e/\\\u003cpath\u003e Example- http://172.20.127.117:7080/notifications) \n\u003cb\u003etopic\u003c/b\u003e: string (possible values [alarm, inventory]) \n\u003cb\u003eformat\u003c/b\u003e: string (possible values [xml, json]) \n\u003cb\u003efilters\u003c/b\u003e: string (Supported for alarm [productType,productFamily,severity,deviceUUId]) \n(Supported for Inventory [productType,productFamily]) \n\n\u003cb\u003e**Note**:\u003c/b\u003e Filters are not applicable for delete inventory notification","operationId":"subscribe","requestBody":{"content":{"application/json":{"schema":{"type":"object","xml":{"name":"subscription","namespace":"urn:cisco:params:xml:ns:yang:yang-push:v1","prefix":"ns1"},"description":"This is the record of a subscriber in the database","properties":{"clientUrl":{"type":"string","description":"This references the subscription topic for which the notification is sent"},"topic":{"type":"string","description":"This references the subscription topic for which the notification is sent"},"format":{"type":"string","description":"This references the format in which the notifications are sent. For ex. json or xml"}},"$$ref":"#/components/schemas/SubscriptionRequest"},"examples":{"example":{"summary":"Sample request","value":{"ietf-restconf:notification.client-url":"http://10.78.102.218:7080/notifications","ietf-restconf:notification.topic":"alarm","ietf-restconf:notification.format":"json","ietf-restconf:notification.filters":[{"ietf-restconf:notification.key":"productFamily","ietf-restconf:notification.value":"Routers"}]},"$$ref":"#/components/examples/SubscriptionRequestJson"}}},"application/xml":{"schema":{"type":"object","xml":{"name":"subscription","namespace":"urn:cisco:params:xml:ns:yang:yang-push:v1","prefix":"ns1"},"description":"This is the record of a subscriber in the database","properties":{"clientUrl":{"type":"string","description":"This references the subscription topic for which the notification is sent"},"topic":{"type":"string","description":"This references the subscription topic for which the notification is sent"},"format":{"type":"string","description":"This references the format in which the notifications are sent. For ex. json or xml"}},"$$ref":"#/components/schemas/SubscriptionRequest"},"examples":{"example":{"summary":"Sample request","value":{"ns1:client-url":"http://10.78.102.218:7080/notifications","ns1:topic":"alarm","ns1:format":"json"},"$$ref":"#/components/examples/SubscriptionRequestXml"}}}},"required":true},"responses":{"200":{"description":"Success with response message-body","content":{"application/json":{"schema":{"type":"object","description":"response","xml":{"name":"response-message","namespace":"urn:cisco:params:xml:ns:yang:nrf-common:v1","prefix":"ns15"},"properties":{"header":{"type":"object","description":"header","properties":{"firstIndex":{"type":"integer","format":"int64","description":"firstIndex","xml":{"prefix":"ns15"}},"lastIndex":{"type":"integer","format":"int64","description":"lastIndex","xml":{"prefix":"ns15"}}},"xml":{"prefix":"ns15"},"$$ref":"#/components/schemas/Header"},"data":{"type":"object","description":"data","xml":{"prefix":"ns15"},"properties":{"subscription":{"type":"array","description":"subscription","items":{"type":"object","description":"This is the record of a subscriber in the database","xml":{"name":"subscription","prefix":"ns19"},"properties":{"entityTag":{"type":"string","description":"Generic tag"},"subscriptionId":{"type":"integer","xml":{"name":"subscription-id","prefix":"ns19"},"description":"This references the subscription because of which the notification is sent"},"subscribedUser":{"type":"string","description":"This references the user who has subscribed to the current topic","xml":{"name":"subscribed-user","prefix":"ns19"}},"endpointUrl":{"type":"string","description":"This references the subscription topic for which the notification is sent","xml":{"name":"client-url","prefix":"ns19"}},"sessionId":{"type":"string","description":"This references an optional identifier the client can use to distinguish their session","xml":{"name":"session-id","prefix":"ns19"}},"topic":{"type":"string","description":"This references the subscription topic for which the notification is sent","xml":{"name":"topic","prefix":"ns19"}},"creationTime":{"type":"string","description":"This contains the time of the creation, i.e. the time at which the change was observed","xml":{"name":"creation-time","prefix":"ns19"}},"creationTimeIso8601":{"type":"string","description":"This contains the time of the creation, i.e. the time at which the change was observed"},"timeOfUpdate":{"type":"string","description":"This contains the time of the update, i.e. the time at which the change was observed","xml":{"name":"time-of-update","prefix":"ns19"}},"timeOfUpdateIso8601":{"type":"string","description":"This contains the time of the update, i.e. the time at which the change was observed"},"format":{"type":"string","description":"This references the format in which the notifications are sent. For ex. json or xml","xml":{"name":"format","prefix":"ns19"}},"clientIp":{"type":"string","description":"IP Address of client machine","xml":{"name":"client-ip"}},"connectionType":{"type":"string","description":"This references the type of connection - connectionless or connection-oriented","xml":{"name":"connection-type","prefix":"ns19"}},"filters":{"type":"array","description":"Filters to apply for this subscription","items":{"type":"object","description":"Filters to apply for this subscription","properties":{"entityTag":{"type":"string","description":"Generic tag"},"key":{"type":"string","description":"This references the criteria against which to filter"},"value":{"type":"string","description":"This references the value for the criteria identified by the key"},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/Filters"}},"authHeaders":{"type":"array","description":"Authentication header and value of client to use as headers when sending notifications","items":{"type":"object","description":"Authentication header and value of client to use as headers when sending notifications","properties":{"entityTag":{"type":"string","description":"Generic tag"},"authKey":{"type":"string","description":"This references the authentication type to use"},"authValue":{"type":"string","description":"Authentication value used with the auth type"},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/AuthHeaders"}},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/NotificationSubscription"}}},"$$ref":"#/components/schemas/Data"}},"$$ref":"#/components/schemas/ResponseMessage"},"examples":{"example":{"summary":"Sample response","value":{"com.response-message":{"com.header":{"com.firstIndex":0,"com.lastIndex":0},"com.data":{"ietf-restconf:notification.subscription":[{"ietf-restconf:notification.subscription-id":11173,"ietf-restconf:notification.subscribed-user":"admin","ietf-restconf:notification.client-url":"http://10.78.102.218:7080/notifications","ietf-restconf:notification.client-ip":"10.78.102.218","ietf-restconf:notification.session-id":471472,"ietf-restconf:notification.topic":"alarm","ietf-restconf:notification.creation-time":"Wed Oct 02 02:28:21 UTC 2024","ietf-restconf:notification.time-of-update":"Wed Oct 02 02:28:21 UTC 2024","ietf-restconf:notification.format":"json","ietf-restconf:notification.connection-type":"connection-less"}]}}},"$$ref":"#/components/examples/GetConnectionLessSubscriptionJson"}}},"application/xml":{"schema":{"type":"object","description":"response","xml":{"name":"response-message","namespace":"urn:cisco:params:xml:ns:yang:nrf-common:v1","prefix":"ns15"},"properties":{"header":{"type":"object","description":"header","properties":{"firstIndex":{"type":"integer","format":"int64","description":"firstIndex","xml":{"prefix":"ns15"}},"lastIndex":{"type":"integer","format":"int64","description":"lastIndex","xml":{"prefix":"ns15"}}},"xml":{"prefix":"ns15"},"$$ref":"#/components/schemas/Header"},"data":{"type":"object","description":"data","xml":{"prefix":"ns15"},"properties":{"subscription":{"type":"array","description":"subscription","items":{"type":"object","description":"This is the record of a subscriber in the database","xml":{"name":"subscription","prefix":"ns19"},"properties":{"entityTag":{"type":"string","description":"Generic tag"},"subscriptionId":{"type":"integer","xml":{"name":"subscription-id","prefix":"ns19"},"description":"This references the subscription because of which the notification is sent"},"subscribedUser":{"type":"string","description":"This references the user who has subscribed to the current topic","xml":{"name":"subscribed-user","prefix":"ns19"}},"endpointUrl":{"type":"string","description":"This references the subscription topic for which the notification is sent","xml":{"name":"client-url","prefix":"ns19"}},"sessionId":{"type":"string","description":"This references an optional identifier the client can use to distinguish their session","xml":{"name":"session-id","prefix":"ns19"}},"topic":{"type":"string","description":"This references the subscription topic for which the notification is sent","xml":{"name":"topic","prefix":"ns19"}},"creationTime":{"type":"string","description":"This contains the time of the creation, i.e. the time at which the change was observed","xml":{"name":"creation-time","prefix":"ns19"}},"creationTimeIso8601":{"type":"string","description":"This contains the time of the creation, i.e. the time at which the change was observed"},"timeOfUpdate":{"type":"string","description":"This contains the time of the update, i.e. the time at which the change was observed","xml":{"name":"time-of-update","prefix":"ns19"}},"timeOfUpdateIso8601":{"type":"string","description":"This contains the time of the update, i.e. the time at which the change was observed"},"format":{"type":"string","description":"This references the format in which the notifications are sent. For ex. json or xml","xml":{"name":"format","prefix":"ns19"}},"clientIp":{"type":"string","description":"IP Address of client machine","xml":{"name":"client-ip"}},"connectionType":{"type":"string","description":"This references the type of connection - connectionless or connection-oriented","xml":{"name":"connection-type","prefix":"ns19"}},"filters":{"type":"array","description":"Filters to apply for this subscription","items":{"type":"object","description":"Filters to apply for this subscription","properties":{"entityTag":{"type":"string","description":"Generic tag"},"key":{"type":"string","description":"This references the criteria against which to filter"},"value":{"type":"string","description":"This references the value for the criteria identified by the key"},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/Filters"}},"authHeaders":{"type":"array","description":"Authentication header and value of client to use as headers when sending notifications","items":{"type":"object","description":"Authentication header and value of client to use as headers when sending notifications","properties":{"entityTag":{"type":"string","description":"Generic tag"},"authKey":{"type":"string","description":"This references the authentication type to use"},"authValue":{"type":"string","description":"Authentication value used with the auth type"},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/AuthHeaders"}},"any":{"type":"array","description":"Generic object","items":{"type":"object"}}},"$$ref":"#/components/schemas/NotificationSubscription"}}},"$$ref":"#/components/schemas/Data"}},"$$ref":"#/components/schemas/ResponseMessage"},"examples":{"example":{"summary":"Sample response","value":{"header":{"firstIndex":0,"lastIndex":0},"data":{"subscription":[{"ns19:subscription-id":11173,"ns19:subscribed-user":"admin","ns19:client-url":"http://10.78.102.218:7080/notifications","ns19:client-ip":"10.78.102.218","ns19:session-id":471472,"ns19:topic":"alarm","ns19:creation-time":"Wed Oct 02 02:28:21 UTC 2024","ns19:time-of-update":"Wed Oct 02 02:28:21 UTC 2024","ns19:format":"json","ns19:connection-type":"connection-less"}]}},"$$ref":"#/components/examples/GetConnectionLessSubscriptionXml"}}}}},"400":{"description":"Bad Request - Invalid request"},"401":{"description":"Unauthorized. The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"description":"Forbidden. The server recognizes the authentication credentials, but the client is not authorized to perform this request."},"500":{"description":"Internal Server Error - operation-failed"}},"method":"post","path":"/notifications:subscription"}}