Skip to main content
Version: v5.0

Subscription

The Subscription API allows you to list, create, update, search by ID, and delete subscriptions.

List subscriptions#

Endpoints#

GET notificationsvc/api/v1/subscription

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_countIntegerNumber of subscriptions. Default is 10.Required
_offsetIntegerPosition in list of subscriptions to begin listingRequired
_namespaceStringProject namespaceOptional
_group.idStringID of groupRequired
_device.idStringID of deviceRequired
_nameStringName of subscriptionRequired
_namespaceStringProject namespaceOptional
Request body example#

None

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _offset?: integer  _pageSize?: integer  _total?: integer  _list: {    _id?: string    _group: {      _id?: string    }    _device:#/components/schemas/Ref    _namespaces?: string[]    _status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]    _createdAt?: string    _updatedAt?: string    _requestedAt?: string    _acceptedAt?: string    _cancelledAt?: string    _version?: integer  }[]}

Create subscription#

Endpoints#

POST notificationsvc/api/v1/subscription

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional

Request body example#

{  _namespaces?: string[]  _device: {    _id?: string  }  _group:#/components/schemas/Ref}

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _group: {    _id?: string  }  _device:#/components/schemas/Ref  _namespaces?: string[]  _status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]  _createdAt?: string  _updatedAt?: string  _requestedAt?: string  _acceptedAt?: string  _cancelledAt?: string  _version?: integer}

Get subscription by ID#

Endpoints#

GET notificationsvc/api/v1/subscription/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
Request body example#

None

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _group: {    _id?: string  }  _device:#/components/schemas/Ref  _namespaces?: string[]  _status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]  _createdAt?: string  _updatedAt?: string  _requestedAt?: string  _acceptedAt?: string  _cancelledAt?: string  _version?: integer}

Update subscription by ID#

Endpoints#

PUT notificationsvc/api/v1/subscription/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_versionIntegerVersion of groupOptional
Request body example#
{
}

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _group: {    _id?: string  }  _device:#/components/schemas/Ref  _namespaces?: string[]  _status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]  _createdAt?: string  _updatedAt?: string  _requestedAt?: string  _acceptedAt?: string  _cancelledAt?: string  _version?: integer}

Delete subscription by ID#

Endpoints#

DELETE notificationsvc/api/v1/subscription/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_versionStringVersion to apply
Request body example#


Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#