api~InstancesRestAPI()

new InstancesRestAPI()

Constructs the Instances REST API.

Methods

afterPropertiesSet()

Initialization after the components in the application context have been constructed.

connectToInstance()

Connects to the instance with :id. Returns HTTP status code 200 and the instance object if the connection was established successfully. Returns HTTP status code 404 if there is no instance with the given id. Returns HTTP status code 500 if the connection failed.

createInstance()

Creates an instance with the given :id and inserts it into the tree. Returns HTTP status code 201 and the instance object if the instance was created. Returns HTTP status code 409 if the instance already exists Returns HTTP status code 400 if the request has wrong parameters Returns HTTP status code 500 if the instance couldn't be created

disconnectFromInstance()

Disconnects from the instance with :id.

getInstance()

listInstances()

Lists all instances.

removeInstance()

Removes the instance with :id Returns HTTP status code 204 if the instance was successfully removed Returns HTTP status code 404 if there is no instance with the given id.

setDependencies()

Sets the dependencies from the application context.

startAllInstances()

Starts all existing instances.

startInstance()

Starts the instance with :id. Returns the instance object. Returns HTTP status code 404 if there is no instance with the given id. Returns HTTP status code 500 if the instance couldn't be started.

stopAllInstances()

Stops all existing instances.

stopInstance()

Stops the instance with :id. Returns the instance object. Returns HTTP status code 404 if there is no instance with the given id. Returns HTTP status code 500 if the instance couldn't be started.

synchronizeWithInstance()

Synchronizes an instance with Inexor Core. TODO: remove (we are synchronizing with events) Returns HTTP status code 200 and the instance object if the synchronization was performed successfully. Returns HTTP status code 404 if there is no instance with the given id. Returns HTTP status code 500 if the synchronization failed.