api-notify

module
v0.0.0-...-eb50f0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: AGPL-3.0

README

api-notify

Api for supporting subscriptions and notifications

API

GET /subscriptions
POST /subscriptions
GET /subscriptions/{subscriptionId}
PUT /subscriptions/{subscriptionId}
DELETE /subscriptions/{subscriptionId}

Quirks

CrateDB container fails to start with vm heap memory error - sysctl -w vm.max_map_count=262144 in the host should fix it.

Examples

Add subscription

POST to /subscriptions with body

{
  "entities": [
    {
      "id": "string",
      "type": "string",
      "idPattern": "string"
    },
     {
      "id": "str2",
      "type": "Device",
      "idPattern": "*.??"
    }   
  ],
  "name": "sub2",
  "description": "string",
  "watchedAttributes": [
    "string"
  ],
  "timeInterval": 0,
  "expires": "2021-06-17T12:19:13.877Z",
  "isActive": true,
  "throttling": 0,
  "q": "string",

  "csf": "string",
  "id": "sub2",
  "type": "Subscription",
  "notification": {
    "attributes": [
      "string"
    ],
    "format": "string",
    "endpoint": {
      "uri": "http://localhost:8668/v2/notify",
      "accept": "application/json"
    },
    "status": "ok",
    "timesSent": 0,
    "lastNotification": "2021-06-17T12:19:13.877Z",
    "lastFailure": "2021-06-17T12:19:13.877Z",
    "lastSuccess": "2021-06-17T12:19:13.877Z"
  },
  "status": "active",
  "createdAt": "2021-06-17T12:19:13.877Z",
  "modifiedAt": "2021-06-17T12:19:13.877Z"
}

Id: Id for Subscription. If exists the subscription will be updated

entities: What entities should the subscription create notifications for. Equal ID or equal type is implementetd.

Directories

Path Synopsis
cmd
internal
pkg
models
* ETSI ISG CIM / NGSI-LD API * * This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group.
* ETSI ISG CIM / NGSI-LD API * * This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL