Deployment APIs

Deployment in v2 uses SQLite files generated by tx-server during deployment. These files contain all the objects (flows, maps, and files) defined in the definition of the package being deployed.

After the file has been sent to the hip-rest server, it is merged into the master SQLite file for that server which can be found at the location specified for the catalog.dir property in tx-rest.properties.

Packages can be started, paused, and stopped. They are automatically started when they are deployed. After they are started, the flows, maps, and files within the SQLite file are unpacked to the file system under a directory named after the package located inside the directory specified for the property map.dirs in tx-rest.properties. If multiple locations are specified, the first one is used.

When stopped, the files are removed from the file system and the flows and maps cannot be run until it is started again.

If the package is paused, maps and flows can still be invoked through the REST API but listeners are paused until the package is un-paused.

These APIs in this table can be called:

API Description
GET /v2/packages/{package_name} Returns detailed information about the specified package.
DELETE /v2/packages/{package_name} Deletes the specified package. This API has a Boolean query parameter stop that if set to true will allow you to delete a package that has been started, otherwise the package must first be stopped.
GET /v2/packages Returns basic information about each deployed package. Has a Boolean query parameter details. If set to true will return more detailed information for each package.
POST /v2/packages Deploys a package. Takes an SQLite file containing a package as the request body. Has a Boolean query parameter start which will cause the package to automatically start after it is deployed
PUT /v2/{package_name}/actions/start Starts the specified package if it is stopped or paused.
PUT /v2/{package_name}/actions/stop Stops the specified package if it is started or paused.
PUT /v2/{package_name}/actions/pause Pauses the specified package if it is started.
PUT /v2/{package_name}/actions/resume Un-pauses the specified package if it is paused.