Autoruns/Plugins Endpoints (2020/10)

These endpoints allow users to manage autorun plugins on a network. 

Base URL for these endpoints:  https://api.bsn.cloud/2020/10/REST/Autoruns/Plugins

_________________________________________________________________________

GET /

Returns a list of autorun plugins on a network

Required Scope Token

bsn.api.main.autoruns.plugins.retrieve

______________________________________________________________

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").

 

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 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 optional

The maximum number of autorun plugin instances that can be contained in the response body

______________________________________________________________

Response

Success Response Body

200: Returns a paged list of Autorun Plugin Entity instances 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 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

 

POST /

Create a new autorun plugin on a network

Required Scope Token

bsn.api.main.autoruns.plugins.create

______________________________________________________________

Request Body

The  Autorun Plugin Entity

______________________________________________________________

Response

Success Response Body

201: Returns the Autorun Plugin Entity created and referenced by the Uri (given by the Location header field) in the response. 

Failure

300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)

400: Either the request or the 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 autorun plugins, specified by a filter, from a network. This allows multiple autorun plugins to be deleted at once.

Required Scope Token

bsn.api.main.autoruns.plugins.delete

______________________________________________________________

Query String Parameters

filter string required

An expression for filtering search results to find the autorun plugins to delete

______________________________________________________________

Response Body

Success

200: Returns the number of affected autorun plugins 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/ 

Returns the number of autorun plugins on the network

Required Scope Token

bsn.api.main.autoruns.plugins.retrieve

______________________________________________________________

Query String Parameters

filter string optional

An expression for filtering search results.

______________________________________________________________

Response Body

Success

200: The autorun plugin 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}/ 

Returns the specified autorun plugin

Required Scope Token

bsn.api.main.autoruns.plugins.retrieve

______________________________________________________________

Segment

id int

A unique identifier for an autorun plugin instance

______________________________________________________________

Response Body

Success

200: Returns the Autorun Plugin Entity

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: An autorun plugin with the specified id 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 a specified autorun plugin

Required Scope Token

bsn.api.main.autoruns.plugins.update

______________________________________________________________

Segment

id int

A unique identifier for an autorun plugin instance

______________________________________________________________

Request Body

The Autorun Plugin Entity

______________________________________________________________

Response Body

Success

204: The specified autorun plugin has been 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

406: The server cannot return the data representation that you requested (as specified in the "Accept" header)

412: Precondition failed (the resource/autorun plugin 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}/ 

Remove the specified autorun plugin

Required Scope Token

bsn.api.main.autoruns.plugins.delete

______________________________________________________________

Segment

id int

A unique identifier for the autorun plugin 

______________________________________________________________

Response Body

Success

204: The specified autorun plugin has been deleted

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 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