Unsubscribe from subscription

Motivation

As a client, I want to remove a subscription from an existing channel, so that I stop receiving notifications when a specified entity.

Functional Design

  • The client initiates DELETE /api/v2/apps/{owner}/{app}/notifications/{channelId}/workspaces/{wsid}/subscriptions/{entity}

  • The subscription is removed from the channel, the client stops receiving notifications about changes in the specified entity.

Request headers

Key
Value

Content-Type

application/json

Authorization

Bearer {PrincipalToken}

Parameters

Parameter
Type
Description

Path

owner

string

name of a user who owns the application

app

string

name of an application

wsid

int64

the ID of workspace

channelId

string

the ID of the channel, returned by create channel

entity

string

Subscription entity, see terms

Headers

PrincipalToken

string

Token returned by login

Result

Code
Description
Body

204

Unsubscribed

400

Bad Request

401

Unauthorized

404

Not Found

429

Too may requests, rate limiting

500+

Server errors / service unavailable

Technical design

Components

  • ~cmp.routerUnsubscribeHandler~✅ function to handle the request in router

      • ~err.routerUnsubscribeInvalidToken~

Integration tests

  • ~it.Unsubscribe~

Last updated

Was this helpful?