This endpoint allows you to manage content files (and content tags) on the network.
Base URL for these endpoints: https://api.bsn.cloud/2020/10/REST/Content/
_________________________________________________________________________
GET
Returns a list of content files on a network.
Query String Parameters
filter
string
optional
An expression for filtering search results.
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 (e.g. "[Device].[Serial] ASC
"). 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 content 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 content instances that can be contained in the response body. This defaults to the maximum allowed page size (100).
______________________________________________________________
Response Body
Success
200: Returns a paged list of content entities (generic data type) on a network. This will return not more than 100 entities along with the information necessary to return any other remaining pages.
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or 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 specified representation of the content entity is not acceptable
5XX: Any 500 code is an internal server error
DELETE
Removes content files, specified by a filter, from a network. This allows multiple content files to be deleted at once.
Query String Parameter
filter
string required
An expression for filtering search results to find the content files to delete
______________________________________________________________
Response Body
Success
204: Returns the number of affected content files as an integer value.
Failure
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
5XX: Any 500 code is an internal server error
Root/{*virtualPath}/GET
Retrieves a list of content files in the specified virtual directory folder. This resource maps to the virtual folder in the content library, accordingly the virtual path is either complete or a partial path to a destination content folder or file.
Segment
virtualPath
string
The location of the content file in the BSN.cloud virtual directory
Query String Parameters
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 (e.g. "[Content].[FileName] ASC").
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 content instances exceeds the pageSize
.
pageSize
int optional
The maximum number of content file instances that can be contained in the response body
______________________________________________________________
Response Body
Success
200: Returns a paged list of Content Folder entities on a network. This will return not more than 100 entities along with the information necessary to return any other remaining pages.
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or 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 specified representation of the content entity or virtual path is not acceptable
5XX: Any 500 code is an internal server error
Endpoints:
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Root/{*virtualPath}/POST
Creates a content folder in the specified virtual directory folder and returns the URL link to the folder location. This resource maps to the virtual folder in the content library, accordingly the virtual path is either complete or a partial path to a destination content folder or file.
Segment
virtualPath
string
The location of the content instance in the BSN.cloud virtual directory
______________________________________________________________
Request Body
______________________________________________________________
Response Body
Success
201: Returns the new resource created and referenced by the Uri (given by the Location header field) in the response. The response includes the Content Folder Entity.
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or multiple requested representations)
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)
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
Count/GET
Retrieves the number of content files on the network matching the specified filter criteria. If no filter is included, this call returns the total number of content files on the network.
Query String Parameter
filter
string optional
An expression for filtering search results.
______________________________________________________________
Response Body
Success
200: The content file count is returned as an integer value.
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or 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 specified representation of the content entity is not acceptable
5XX: Any 500 code is an internal server error
{id:int}/GET
Retrieves the specified content files on a network.
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
Query String Parameters
These parameters should only be used when requesting an image (they depend on the representation type):
maxWidth
uShort optional
The maximum width of the content instance (this should equal 100).
maxHeight
uShort optional
The maximum height of the content instance (this should equal 100).
______________________________________________________________
Response Body
Success
200: Returns either the Content Entity or the file associated with the requested content, depending on what is specified in the request.
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or 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 specified representation of the content entity is not acceptable
5XX: Any 500 code is an internal server error
{id:int}/PUT
Update the specified content files.
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
The Content Entity
______________________________________________________________
Response Body
Success
204: The specified content file has been updated on the networkDELETE /
Removes content files, specified by a filter, from a network. This allows multiple content files to be deleted at once.
Required Scope Token
bsn.api.main.content.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[VirtualPath] IS '\\Shared\\Presentations\\Archive\\*' AND [UploadDate] IS BEFORE '2020-01-01'
Code Block |
---|
DELETE /2022/06/REST/Content/?filter=%5BVirtualPath%5D%20IS%20%27%5C%5CShared%5C%5CPresentations%5C%5CArchive%5C%5C*%27%20AND%20%5BUploadDate%5D%20IS%20BEFORE%20%272020-01-01%27 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 the number of affected content files 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 or request body is malformed and therefore invalid, or it is rejected in accordance to the business rules
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 /Root/{*virtualPath}/
Retrieves a list of content files in the specified virtual directory folder. This resource maps to the virtual folder in the content library, accordingly the virtual path is either complete or a partial path to a destination content folder or file.
Required Scope Token
bsn.api.main.content.retrieve
______________________________________________________________
Segment
virtualPath
string
The location of the content file in the BSN.cloud virtual directory
______________________________________________________________
Query String Parameters
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 (e.g. "[Content].[FileName] ASC").
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 content instances exceeds the pageSize
.
pageSize
int optional
The maximum number of content file instances that can be contained in the response body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
virtualPath
is set toUsers/JohnDoe@brightsign.biz/
Code Block |
---|
GET /2022/06/REST/Content/Root/Users/JohnDoe@brightsign.biz/ 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 Content and Content Folder entities on a network. This will return not more than 100 entities along with the information necessary to return any other remaining pages.
Example
Code Block | ||
---|---|---|
| ||
{
"items": [
{
"id": 123456,
"name": "My Images",
"virtualPath": "\\Users\\JohnDoe@brightsign.biz\\",
"thumbPath": "https://bsncloud.s3.amazonaws.com:443/public/icons/100x100/icon_folder.png",
"mediaType": "Folder",
"creationDate": "2020-07-09T19:09:05.103Z",
"lastModifiedDate": "2020-07-09T19:09:05.103Z",
"hasSubFolders": false,
"hasFiles": false,
"permissions": []
},
{
"id": 1234567,
"name": "My Incoming",
"virtualPath": "\\Users\\JohnDoe@brightsign.biz\\",
"thumbPath": "https://bsncloud.s3.amazonaws.com:443/public/icons/100x100/icon_folder_incoming.png",
"mediaType": "Folder",
"creationDate": "2020-07-09T19:09:05.067Z",
"lastModifiedDate": "2020-07-09T19:09:05.067Z",
"hasSubFolders": false,
"hasFiles": false,
"permissions": []
},
{
"id": 12345678,
"name": "My Videos",
"virtualPath": "\\Users\\JohnDoe@brightsign.biz\\",
"thumbPath": "https://bsncloud.s3.amazonaws.com:443/public/icons/100x100/icon_folder.png",
"mediaType": "Folder",
"creationDate": "2020-07-09T19:09:05.143Z",
"lastModifiedDate": "2020-07-09T19:09:05.143Z",
"hasSubFolders": false,
"hasFiles": false,
"permissions": []
}
],
"totalItemCount": 3,
"matchingItemCount": 3,
"pageSize": 100,
"nextMarker": "LDYwMjg0Nw==",
"isTruncated": false,
"sortExpression": "[Content].[FileName] ASC",
"filterExpression": "[Type] IN ('Image', 'Video', 'Audio', 'Folder') AND [VirtualPath] = \\Users\\JohnDoe@brightsign.biz\\"
} |
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 /Root/{*virtualPath}/
Creates a content folder in the specified virtual directory folder and returns the URL link to the folder location. This resource maps to the virtual folder in the content library, accordingly the virtual path is either complete or a partial path to a destination content folder or file.
Required Scope Token
bsn.api.main.content.create
______________________________________________________________
Segment
virtualPath
string optional
The location of the content instance in the BSN.cloud virtual directory
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
virtualPath
is set to/Users/JohnDoe@brightsign.biz/
Code Block |
---|
POST /2022/06/REST/Content/Root/Users/JohnDoe@brightsign.biz/ 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: 95 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{
"id": 0,
"name": "Testing",
"virtualPath": "\\Users\\JohnDoe@brightsign.biz\\",
"thumbPath": "",
"mediaType": "Folder",
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"hasSubFolders": false,
"hasFiles": false,
"permissions": []
} |
______________________________________________________________
Response
Success Response Body
201: Returns the new resource created and referenced by the Uri (given by the Location header field) in the response. The response includes theContent Folder Entity.
Example
Code Block | ||
---|---|---|
| ||
{
"id": 123456,
"name": "Testing",
"virtualPath": "\\Users\\JohnDoe@brightsign.biz\\",
"thumbPath": "",
"mediaType": "Folder",
"creationDate": "2023-06-07T19:00:08.156Z",
"lastModifiedDate": "2023-06-07T19:00:08.156Z",
"hasSubFolders": false,
"hasFiles": false,
"permissions": []
} |
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, or it is rejected in accordance to the business rules
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)
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
GET /Count/
Retrieves the number of content files on the network matching the specified filter criteria. If no filter is included, this call returns the total number of content files on the network.
Required Scope Token
bsn.api.main.content.retrieve
______________________________________________________________
Query String Parameter
filter
string optional
An expression for filtering search results.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
filter
is set to[FileName] CONTAINS '*.jpeg'
Code Block |
---|
GET /2022/06/REST/Content/Count/?filter=%5BFileName%5D%20CONTAINS%20%27*.jpeg%27 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: The content file count 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}/
Retrieves the specified content file
Required Scope Token
bsn.api.main.content.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Query String Parameters
These parameters should only be used when requesting an image (they depend on the representation type):
maxWidth
uShort optional
The maximum width of the content instance (this should equal 100).
maxHeight
uShort optional
The maximum height of the content instance (this should equal 100).
______________________________________________________________
Request Examples
This example request returns JSON metadata. The parameters and headers are set as follows (since the header specifies application/json
, the maxWidth
and maxHeight
parameters are not needed):
id
is set to123456
Code Block |
---|
GET /2022/06/REST/Content/123456/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept-Encoding: gzip,deflate
Accept: application/json, application/vnd.bsn.error+json |
This example request returns an image file. The parameters and headers are set as follows:
id
is set to123456
maxWidth
is set to100
maxHeight
is set to100
Code Block |
---|
GET /2022/06/REST/Content/123456/?maxWidth=100&maxHeight=100 HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept-Encoding: gzip,deflate
Accept: image/png, image/jpeg, image/gif |
______________________________________________________________
Response
Success Response with Body
200: Returns either the Content Entity or the file associated with the requested content, depending on what is specified in the request.
Example
This is an example of a 200 level response:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
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}/
Update the specified content files.
Required Scope Token
bsn.api.main.content.update
______________________________________________________________
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is123456
Code Block |
---|
PUT /2022/06/REST/Content/123456/ 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: 861 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{
"id": 0,
"fileName": "Display.jpeg",
"physicalPath": null,
"virtualPath": "\\Users\\Night\\",
"thumbPath": null,
"mediaType": "Image",
"fileSize": 0,
"fileHash": null,
"uploadDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"fileLastModifiedDate": "0001-01-01T00:00:00",
"probeData": null,
"metadata": null,
"dynamicPlaylists": null,
"liveMediaFeeds": null,
"taggedPlaylists": null,
"presentations": null,
"tags": {},
"permissions": []
} |
______________________________________________________________
Response
Success
204: The specified content file has been updated on the network
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, or it is rejected in accordance to the business rules
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
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 content file.
Required Scope Token
bsn.api.main.content.delete
______________________________________________________________
Segment
id
int
A unique identifier for the content instance to delete.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
Code Block |
---|
DELETE /2022/06/REST/Content/123456/ 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
204: The specified content file has been removed
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, or it is rejected in accordance to the business rules
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 /{id:int}/Tags/
Returns tags associated with the specified content file.
Required Scope Token
bsn.api.main.content.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for the content file. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
Code Block |
---|
GET /2022/06/REST/Content/123456/Tags/ 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 list of properties and their values.
Example
Code Block | ||
---|---|---|
| ||
{
"string::[Content].<Anon>": "image",
"number::[Content].<BillingRate>": "30"
} |
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}/Tags/
Adds one or more tags to the specified content file. The following are valid system-defined values for content tags: "FileName", "FileSize", "ContentType", and "UploadDate".
Required Scope Token
bsn.api.main.content.update
______________________________________________________________
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
tags
DynamicObject
A collection of key value pairs where the key is tag name, and the value is tag value. See the Tags
entry in Player Entity for more information.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
A tag is added to set the Billing Rate to 30
Code Block |
---|
POST 2022/06/REST/Content/123456/Tags/ 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: 34 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{
"[Content].<BillingRate>": 30
} |
______________________________________________________________
Response
Success
204: A new tag has been successfully added to the specified content file
Failure
400: Either a tag with the specified key was already defined, the request is malformed and therefore invalid, or there is a conflict
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}/Tags/
Removes one or more tags from the specified content file
Required Scope Token
bsn.api.main.content.update
______________________________________________________________
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
list
List<string>
A list of key/value pairs that specify the tags to delete from the content file
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to123456
The
"string::[Content].<Anon>"
tag will be deleted
Code Block |
---|
DELETE /2022/06/REST/Content/123456/Tags/ 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: 28 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[
"string::[Content].<Anon>"
] |
______________________________________________________________
Response
Success
204: The specified tags have been removed from the specified content file
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, or it is rejected in accordance to the business rules
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:
Code Block |
---|
GET /2022/06/REST/Content/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
Origin: http://localhost/ |
______________________________________________________________
Response
Success Response Body
200: Returns the Business Operations Entity
Example
Expand | |||||
---|---|---|---|---|---|
| |||||
|
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
406: The specified representation of the content entity is not acceptable
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 sent406: 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/
Returns object permissions for a given content instance.
Required Scope Token
bsn.api.main.content.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for the content instance
. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Response Body
Success
204: The specified content file has been removed
Failure
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)
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
{id:int}/Tags/GET
Returns tags associated with the specified content file.
Segment
id
int
Request Example
The example request parameters and headers are set as follows:
id
is set to1234567
Code Block |
---|
GET /2022/06/REST/Content/1234567/Permissions/ 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
"string::[sys].[Content].<MediaType>": "Image", "int::[Content].<Category>": 42
: Returns an array of Permission entities
Example
Code Block | ||
---|---|---|
| ||
[
{
"entityId": 1234567,
"operationUID": "39e69897-8d9a-f634-95cf-7419a3e93c23",
"principal": {
"login": "JohnDoe@brightsign.biz",
"type": "User",
"id": 101026
},
"isFixed": true,
"isInherited": false,
"isAllowed": true,
"creationDate": "2023-09-08T17:15:36.013Z"
}
] |
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 to the specified content
Segment
id
int
instance
Required Scope Token
bsn.api.main.content.update
______________________________________________________________
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
tags
DynamicObject
Tags
entry in Player Entity for more information.Operations/GET
Returns the operational permissions granted to roles for specific business operations
Response Body
Success
200: Returns the Business Operations Entity
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or 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 specified representation of the business operations tree is not acceptable
5XX: Any 500 code is an internal server error
{id:int}/Permissions/GET
Returns object permissions for a given content instance.
Segment
id
int
An array of Permission entities
______________________________________________________________
Response Body
Success
204: A new tag has been successfully added to the specified content file
Failure
400: Either a tag with the specified key was already defined, the request is malformed and therefore invalid, or there is a conflict
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
{id:int}/Tags/DELETE
Removes one or more tags from the specified content file
Segment
id
int
A unique identifier for the content instance. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
[string[]] list
: A list of key/value pairs that specify the tags to delete from the content file.
______________________________________________________________
Response Body
Success
204: The specified tags have been removed from the specified content file
Failure
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)
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
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
POST /2022/06/REST/Content/12345/Permissions/ 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: 313 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[
{
"entityId": 12345,
"operationUID": "39e69897-8d9a-f634-95cf-7419a3e93c23",
"principal": {
"login": "JohnDoe@brightsign.biz",
"type": "User",
"id": 101026
},
"isFixed": true,
"isInherited": false,
"isAllowed": true,
"creationDate": "0001-01-01T00:00:00"
},
{
"entityId": 12345,
"operationUID": "ff7314eb-8094-42c7-8d86-9741d29ce7f1",
"principal": {
"name": "Custom",
"isCustom": true,
"type": "Role",
"id": 10498
},
"isFixed": false,
"isInherited": false,
"isAllowed": false,
"creationDate": "0001-01-01T00:00:00"
}
] |
______________________________________________________________
Response
Success
200: Returns the permissions property value of the Content Entity as a paged list of content entities.
Failure
204: The permissions were successfully added to the specified content instance
Failure
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance to the business rules
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/
Adds permissions to the specified content instance
Segment
id
int
Removes permissions from the specified content file
Required Scope Token
bsn.api.main.content.update
______________________________________________________________
Segment
id
int
A unique identifier for the content
file. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
An array of Permission entities
_____________________________________________________________
Request Body
______________________________________________________________
Response Body
Success
204: The permissions were successfully added to the specified content instance
Failure
300: The requested representation could not be returned because it is ambiguous (there are either zero or multiple requested representations)
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)
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
{id:int}/Permissions/DELETE
Removes permissions from the specified content file
Segment
id
int
A unique identifier for the content file. This value is generated by the server when the content file is uploaded.
______________________________________________________________
Request Body
The Permission Entity to delete_
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
DELETE /2022/06/REST/Content/12345/Permissions/ 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: 313 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[
{
"entityId": 12345,
"operationUID": "39e69897-8d9a-f634-95cf-7419a3e93c23",
"principal": {
"login": "JohnDoe@brightsign.biz",
"type": "User",
"id": 101026
},
"isFixed": true,
"isInherited": false,
"isAllowed": true,
"creationDate": "0001-01-01T00:00:00"
},
{
"entityId": 12345,
"operationUID": "ff7314eb-8094-42c7-8d86-9741d29ce7f1",
"principal": {
"name": "Custom",
"isCustom": true,
"type": "Role",
"id": 10498
},
"isFixed": false,
"isInherited": false,
"isAllowed": false,
"creationDate": "0001-01-01T00:00:00"
}
] |
______________________________________________________________
Response
Success
204: The specified permissions have been removed from the specified content
file
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, or it is rejected in accordance to the business rules
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