Cloud APIs
...
BSN.Cloud Main APIs
Main API version 2020/10

Content Endpoints (2020/10)

21min
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 required scope token bsn api main content retrieve query string parameters filter string string optional an filtering and sorting expressions in the main api docid 3l0afyd3xooe ytvfk2vs for filtering search results sort string 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 ") marker string 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 autorun plugin instances exceeds the pagesize this parameter is only required if you need more elements in the paged list than the pagesize (100) pagesize int int optional the maximum number of autorun plugin instances that can be contained in the response body response success response body 200 200 returns a paged list entity (2020/10) docid\ joielmbbiwrnzeqzvpqqa 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 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 required scope token bsn api main content delete query string parameter filter string string required required an filtering and sorting expressions in the main api docid 3l0afyd3xooe ytvfk2vs for filtering search results response success response body 200 200 returns the number of affected content files as an integer value failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 string the location of the content file in the bsn cloud virtual directory query string parameters sort string 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 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 int optional the maximum number of content file instances that can be contained in the response body response success response body 200 200 returns a paged list entity (2020/10) docid\ joielmbbiwrnzeqzvpqqa of content folder entity (2020/10) docid\ tqbyity3dv qrkxdjdd8m 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 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 string the location of the content instance in the bsn cloud virtual directory request body the content folder entity (2020/10) docid\ tqbyity3dv qrkxdjdd8m response success response body 201 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 (2020/10) docid\ tqbyity3dv qrkxdjdd8m failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request or request body is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 415 415 the server cannot accept the data representation that you sent (as specified in the "content type" header) 5xx 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 parameters filter string string optional optional an filtering and sorting expressions in the main api docid 3l0afyd3xooe ytvfk2vs for filtering search results response success response body 200 200 the content file count is returned as an integer value failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 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 maxwidth ushort ushort optional optional the maximum width of the content instance (this should equal 100) maxheight ushort ushort optional optional the maximum height of the content instance (this should equal 100) response success response body 200 200 returns either the content entity (2020/10) docid\ ugbjfzgwfpuoznnmhawhj or the file associated with the requested content, depending on what is specified in the request success response 304 304 the resource was not modified since the time specified in the “if modified since” header failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 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 (2020/10) docid\ ugbjfzgwfpuoznnmhawhj response success 204 204 the specified content file has been updated on the network failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 either the request or request body is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 412 412 precondition failed (the resource changed since the time specified in the “if unmodified since” header value) 415 415 the server cannot accept the data representation that you sent (as specified in the "content type" header) 5xx 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 int a unique identifier for the content instance this value is generated by the server when the content file is uploaded response success 204 204 the specified content file has been removed failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 412 412 precondition failed (the resource changed since the time specified in the “if unmodified since” header value) 5xx 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 int a unique identifier for the content instance this value is generated by the server when the content file is uploaded response success response body 200 200 returns a list of properties and their values for example "string \[sys] \[content] \<mediatype>" "image", "int \[content] \<category>" 42 failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 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 the array of key/value pairs that specify the tags to assign to the content file see the tags entry in player entity (2020/10) docid\ klxwxuju fg9an8cre3ww for more information response success 204 204 a new tag has been successfully added to the specified content file failure 400 400 either a tag with the specified key was already defined, the request is malformed and therefore invalid, or there is a conflict 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 415 415 the server cannot accept the data representation that you sent (as specified in the "content type" header) 5xx 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 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 response success 204 204 the specified tags have been removed from the specified content file failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request or request body is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 412 412 precondition failed (the resource changed since the time specified in the “if unmodified since” header value) 5xx 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 response success response body 200 200 returns the business operations entity (2020/10) docid\ ychro4ocgshfhae1gvygf failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 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 int a unique identifier for the content instance this value is generated by the server when the content file is uploaded response success response body 200 200 returns an array of permission entity (2020/10) docid 9p ncidl9xh7qdpkxgodl entities failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 5xx any 500 code is an internal server error post /{id\ int}/permissions/ adds permissions to the specified content instance required scope token bsn api main content update segment id int int a unique identifier for the content instance this value is generated by the server when the content file is uploaded request body an array of permission entity (2020/10) docid 9p ncidl9xh7qdpkxgodl entities response success 204 204 the permissions were successfully added to the specified content instance failure 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 415 415 the server cannot accept the data representation that you sent (as specified in the "content type" header) 5xx 5xx any 500 code is an internal server error delete /{id\ int}/permissions/ removes permissions from the specified content instance required scope token bsn api main content update segment id int int a unique identifier for the content instance this value is generated by the server when the content file is uploaded request body an array of permission entity (2020/10) docid 9p ncidl9xh7qdpkxgodl entities response success 204 204 the specified permissions have been removed from the specified content file failure 300 300 the requested representation could not be returned because it is ambiguous (there are multiple requested representations) 400 400 the request or request body is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 406 406 the server cannot return the data representation that you requested (as specified in the "accept" header) 5xx 5xx any 500 code is an internal server error