These endpoints allow users to manage device subscriptions on a network.
Base URL for these endpoints: https://api.bsn.cloud/2022/06/REST/Subscriptions
_________________________________________________________________________
GET /
Returns a list of device subscriptions
...
bsn.api.main.subscriptions.retrieve
______________________________________________________________
Query String Parameters
filter
string optional
A search expression for narrowing the result set
sort
string optional
An expression for sorting the search results. The sort expression specifies the entry used for sorting and the ascending/descending (ASC/DESC) sorting order (see this page for more information).
marker
string optional
A value specifying which page to retrieve. This value is useful if the isTruncated
entry in the response body of the previous GET call indicates that the number of device subscription instances exceeds the pageSize
.
This parameter is only required if you need more elements in the paged list than the pageSize
(100).
pageSize
int optional
The maximum number of device subscription instances that can be contained in the response body. This defaults to the maximum allowed page size (100).
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
...
Code Block |
---|
GET /2022/06/REST/Subscriptions/?marker=NDI0NTY0LDQyNDU2NA%3D%3D&pageSize=1&filter=%5BDevice%5D%20IS%20NULL%20AND%20%5BStatus%5D%20IS%20IN%20%28%27Active%27%2C%20%27Suspending%27%29&sort=%5BCreationDate%5D%20DESC HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate |
______________________________________________________________
Success Response Body
200: Returns a paged list of Player Subscription entities on a network. This will return not more than 100 entities along with the information necessary to return any other remaining pages.
...
Code Block | ||
---|---|---|
| ||
{ "items": [ { "id": 424574, "device": null, "type": "Commercial", "activityPeriod": "365.00:00:00", "status": "Active", "creationDate": "2023-06-02T07:02:52.99Z", "lastModifiedDate": "2023-06-02T07:02:52.99Z", "activationDate": "2023-06-02T07:02:52.99Z", "suspensionDate": null, "expirationDate": null }], "totalItemCount": 20, "matchingItemCount": 9, "pageSize": 1, "nextMarker": "MjAyMy0wNi0wMlQwNzowMjo1Mi45OTBaLDQyNDU3NA==", "isTruncated": true, "sortExpression": "[CreationDate] DESC", "filterExpression": "[Device] IS NULL AND [Status] IS IN ( 'Active' , 'Suspending' )" } |
Failure Response
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request is malformed and therefore invalid
401: The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this method
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
5XX: Any 500 code is an internal server error
...
bsn.api.main.subscriptions.retrieve
______________________________________________________________
Query String Parameter
filter
string optional
An expression for filtering search results. The default value is null.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
...
Code Block |
---|
GET /2022/06/REST/Subscriptions/Count/?pageSize=0&filter=%5BId%5D%20IS%20GREATER%20THAN%200%20AND%20%5BStatus%5D%20IS%20IN%20%28%27Active%27%2C%20%27Suspending%27%29 HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate |
______________________________________________________________
Success Response Body
200: The subscription instance count is returned as an integer value.
...
bsn.api.main.operations.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
Code Block |
---|
GET /2022/06/REST/Subscriptions/Operations/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate |
______________________________________________________________
Success Response Body
200: Returns theBusiness Operations Entity
...