-
Notifications
You must be signed in to change notification settings - Fork 4
/
subsUrls.js
22 lines (17 loc) · 959 Bytes
/
subsUrls.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
* Operation identification table. Each row of the table contains a Context Broker subscribe or unsubscribe operations with two fields:
* the method of the operation and a regular expression to identify the URL.
*/
module.exports = [
/* Standard NGSI operations */
['POST', /\/(v1\/registry|ngsi9)\/subscribecontextavailability$/, 'subscribe'],
['POST', /\/(v1\/registry|ngsi9)\/unsubscribecontextavailability$/, 'unsubscribe'],
['POST', /\/(v1|ngsi10)\/subscribecontext$/, 'subscribe'],
['POST', /\/(v1|ngsi10)\/unsubscribecontext$/, 'unsubscribe'],
/* "Classic" NGSI9 operations */
['POST', /^\/(ngsi9|v1\/registry)\/contextavailabilitysubscriptions$/, 'subscribe'],
['DELETE', /^\/(ngsi9|v1\/registry)\/contextavailabilitysubscriptions\/.+/, 'unsubscribe'],
/* "Classic" NGSI10 operations */
['POST', /^\/(ngsi10|v1)\/contextsubscriptions$/, 'subscribe'],
['DELETE', /^\/(ngsi10|v1)\/contextsubscriptions\/.+/, 'unsubscribe'],
];