newsfilter
Subscriptions

Replace subscriptions

PUT
/v1/subscriptions/{app}

Replaces an app's full ticker list. Send the revision you last read. If the list changed since, the request is refused with 409; read it again and retry.

Authorization

apiKey
headerAuthorizationBearer <token>

Path Parameters

app*string

Request Body

application/json
  1. body
tickers*array<>

The full list. It replaces the current one.

Itemsitems <= 5000
revision*integer

The revision you last read (0 for a new app).

Range0 <= value

Response Body

The new ticker list and what changed

application/json
  1. response
app*string

Your app id.

revision*integer

Goes up by one each time the list changes.

Range0 <= value
tickers*array<>

The tickers, sorted.

added*array<>

Tickers this request added.

removed*array<>

Tickers this request removed.

Example Request
curl -X PUT 'https://api.newsfilter.dev/v1/subscriptions/string' \  -H 'Content-Type: application/json' \  -d '{  "tickers": [    "ACME"  ],  "revision": 3}'
Example Response
{  "app": "string",  "revision": 3,  "tickers": [    "ACME"  ],  "added": [    "ACME"  ],  "removed": [    "ACME"  ]}