Presentations Endpoints (2022/06) http examples
These endpoints allow for creation, modification, and retrieval of presentation objects.
Base URL for these endpoints: https://api.bsn.cloud/2022/06/REST/Presentations
_________________________________________________________________________
GET /
Retrieves a list of presentations on the network.
Required Scope Token
bsn.api.main.presentations.retrieve
______________________________________________________________
Query String Parameters
filter
string optional
An expression for filtering search results. The default value is null.
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). The default value is null.
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 presentations 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 presentations 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:
marker
value is set to the[PagedList].[NextMarker]
property value from the previous BSN.cloud API response.pageSize
is set to1
filter
is set to[Status] IS 'Published'
sort
is set to[Name] ASC
GET /2022/06/REST/Presentations/?marker=MDAxIC0gVXBwZXIgTGVmdCBNYXN0ZXIsOTQwODI%3D&pageSize=1&filter=%5BStatus%5D%20IS%20%27Published%27&sort=%5BName%5D%20ASC 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
______________________________________________________________
Response
Success Response Body
200: Returns a paged list of Presentation Entity instances on a network. This will return not more than 100 entities along with the information necessary to return any other remaining pages.
Example
{
"items": [ {
"id": 098765,
"type": "Complete",
"name": "001-LeftScreen-Years",
"creationDate": "2023-05-10T16:20:37.37Z",
"lastModifiedDate": "2023-06-20T15:14:13.063Z",
"projectFile": {
"id": 1234567,
"path": "https://bsncloud.s3.amazonaws.com/JaneDoeTesting/6391b7b4fa3cfd6213b053506824b940",
"type": "Stored",
"name": "001-LeftScreen-Years.bpfx",
"size": 194873,
"hash": "SHA1:9C36970CD4337F9D83D932500A173B590436F94CC",
"creationDate": "2023-06-20T15:14:12.74Z",
"lastModifiedDate": "2023-06-20T15:14:12.207Z"
},
"autorun": {
"version": "10.0.97",
"isCustom": false
},
"deviceWebPage": {
"id": 2345678,
"name": "Default_PresentationWebPage"
},
"deviceModel": "XT1144",
"screenSettings": {
"videoMode": "1920x1080x60p",
"orientation": "Landscape",
"connector": "HDMI",
"backgroundColor": "RGB:000000",
"overscan": "NoOverscan"
},
"language": "English",
"status": "Published",
"autoplayFile": {
"id": 12345,
"path": "https://bsncloud.s3.amazonaws.com/JaneDoeTesting/98b3a8e5f8179331bd54c5bd95178687",
"type": "Stored",
"name": "autoplay-001-LeftScreen-Years.json",
"size": 128875,
"hash": "SHA1:BB9C840B156B799389B78F404438456A861BFD67",
"creationDate": "2023-06-20T15:14:12.613Z",
"lastModifiedDate": "2023-06-20T15:14:12.207Z"
},
"resourcesFile": {
"id": 12345,
"path": "https://bsncloud.s3.amazonaws.com/JaneDoeTesting/cd420f1f6e497e845e2b8350dda09e23",
"type": "Stored",
"name": "resources.txt",
"size": 0,
"hash": "SHA1:AA39B34B5E6B4B0D3255BFEF95601890AFD80709",
"creationDate": "2023-05-10T16:25:06.717Z",
"lastModifiedDate": "2023-05-10T16:25:06.02Z"
},
"userDefinedEventsFile": null,
"thumbnailFile": {
"id": 12345,
"path": "https://bsncloud.s3.amazonaws.com/JaneDoeTesting/cc79c72f771fa58dac9b23788381b337",
"type": "Stored",
"name": "001-LeftScreen-Years.thmb.jpg",
"size": 1977,
"hash": "SHA1:52G80141B47757FA2C540EBE6338FFC91EA6A52D",
"creationDate": "2023-05-11T04:15:51.913Z",
"lastModifiedDate": "2023-05-11T04:15:51.12Z"
},
"files": null,
"autorunPlugins": null,
"applications": [],
"dependencies": null,
"groups": [],
"permissions": []
}],
"totalItemCount": 163,
"matchingItemCount": 110,
"pageSize": 1,
"nextMarker": "MDAxLUxlZnRTY3JlZW4tWWVhcnMsMTcyMDU4",
"isTruncated": true,
"sortExpression": "[Name] ASC",
"filterExpression": "[Status] IS 'Published'"
}
Failure
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
Endpoints:
- 1 GET /
- 2 POST /
- 3 DELETE /
- 4 GET /Count/
- 5 GET /{id:int}/
- 6 PUT /{id:int}/
- 7 DELETE /{id:int}/
- 8 GET /{name}/
- 9 PUT /{name}/
- 10 DELETE /{name}/
- 11 GET /Operations/
- 12 GET /{id:int}/Permissions/
- 13 POST /{id:int}/Permissions/
- 14 DELETE /{id:int}/Permissions/
- 15 GET /{name}/Permissions/
- 16 POST /{name}/Permissions/
- 17 DELETE /{name}/Permissions/
POST /
Creates a new presentation on the network.
Required Scope Token
bsn.api.main.presentations.create
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2022/06/REST/Presentations/ 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
Content-Type: application/json
Content-Length: 1184
This is the example request body:
______________________________________________________________
Response
Success Response Body
201: Returns the Presentation Entity created and referenced by the Uri (given by the Location header field) in the response.
Example
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: Either the request or request body 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)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /
Removes presentations, specified by a filter, from a network. This allows multiple presentations to be deleted at once.
Required Scope Token
bsn.api.main.presentations.delete
______________________________________________________________
Query String Parameter
filter
string required
An expression for filtering search results
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
filter
is set to[Status] IS 'Draft'
______________________________________________________________
Response
Success Response Body
200: Returns the number of affected presentations as an integer value
Failure
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
GET /Count/
Retrieves the number of presentations on the network matching the specified filter criteria. If no filter is included, this call returns the total number of presentations on the network.
Required Scope Token
bsn.api.main.presentations.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:
filter
is set to[LastModifiedDate] IS IN THE RANGE '2020-07-01' AND '2020-08-01'
______________________________________________________________
Response
Success Response Body
200: The number of presentations is returned as an integer value.
Failure
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
GET /{id:int}/
Returns the specified presentation
Required Scope Token
bsn.api.main.presentations.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
______________________________________________________________
Response
Success Response with Body
200: Returns the Presentation Entity
Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Example
This is an example of a 200 level response:
Failure
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
404: The server cannot find the requested resource (the path does not exist)
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
PUT /{id:int}/
Modifies the specified presentation
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
This is the example request body:
______________________________________________________________
Response
Success
204: The specified presentation instance was successfully updated
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: Either the request or request body 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
404: The server cannot find the requested resource (the path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{id:int}/
Removes the specified presentation
Required Scope Token
bsn.api.main.presentations.delete
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
______________________________________________________________
Response
Success
204: The specified presentation was successfully deleted from the network
Failure
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
404: The server cannot find the requested resource (the path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
5XX: Any 500 code is an internal server error
GET /{name}/
Returns the specified presentation
Required Scope Token
bsn.api.main.presentations.retrieve
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
is set toJaneDoeTest
______________________________________________________________
Response
Success Response with Body
200: Returns the Presentation Entity
Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Example
This is an example of a 200 level response:
Failure
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
404: The server cannot find the requested resource (the path does not exist)
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
PUT /{name}/
Modifies the specified presentation
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
is set toJaneDoeTest
This is the example request body:
______________________________________________________________
Response
Success
204: The specified presentation instance was successfully updated
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: Either the request or request body 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
404: The server cannot find the requested resource (the path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{name}/
Removes the specified presentation
Required Scope Token
bsn.api.main.presentations.delete
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
is set toJaneDoeTest
______________________________________________________________
Response
Success
204: The specified presentation was successfully deleted from the network
Failure
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
404: The server cannot find the requested resource (the path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
5XX: Any 500 code is an internal server error
GET /Operations/
Returns the operational permissions granted to roles for specific business operations
Required Scope Token
bsn.api.main.operations.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
______________________________________________________________
Response
Success Response Body
200: Returns the Business Operations Entity
Example
Failure
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
GET /{id:int}/Permissions/
Includes object permissions for a given presentation.
Required Scope Token
bsn.api.main.presentations.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
______________________________________________________________
Response
Success Response Body
200: Returns an array of Permission entities
Example
Failure
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
404: The server cannot find the requested resource (the path does not exist)
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
POST /{id:int}/Permissions/
Adds permissions for the specified presentation.
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is12345
This is the example request body:
______________________________________________________________
Response
Success
204: The permissions were successfully added to the specified presentation
Failure
400: The request or request body 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
404: The server cannot find the requested resource (the path does not exist)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{id:int}/Permissions/
Removes permissions for the specified presentation instance.
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
id
int
A unique identifier for the presentation
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is12345
This is the example request body:
______________________________________________________________
Response
Success
204: The specified permissions were successfully deleted
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body 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
404: The server cannot find the requested resource (the path does not exist)
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
GET /{name}/Permissions/
Includes object permissions for a given presentation.
Required Scope Token
bsn.api.main.presentations.retrieve
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
is set toOctober2023Prez
______________________________________________________________
Response
Success Response Body
200: Returns an array of Permission entities
Example
Failure
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
404: The server cannot find the requested resource (the path does not exist)
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
POST /{name}/Permissions/
Adds permissions for the specified presentation.
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
is set toOctober2023Prez
This is the example request body:
______________________________________________________________
Response
Success
204: The permissions were successfully added to the specified presentation
Failure
400: The request or request body 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
404: The server cannot find the requested resource (the path does not exist)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{name}/Permissions/
Removes permissions for the specified presentation.
Required Scope Token
bsn.api.main.presentations.update
______________________________________________________________
Segment
name
string
The name of the presentation
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
name
isOctober2023Prez
This is the example request body:
______________________________________________________________
Response
Success
204: The specified permissions were successfully deleted
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body 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
404: The server cannot find the requested resource (the path does not exist)
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