/mgmt/catalogs

Documentation

VoltDB Home » Documentation » Enterprise Manager Guide

/mgmt/catalogs

/mgmt/catalogs — Manage catalog resources

Synopsis

/mgmt/catalogs

/mgmt/catalogs/{catalog-id}

Methods

GET

Fetches information about the current catalogs defined within the Enterprise Manager. A call without a catalog ID returns a list of the known catalogs. A call with a catalog ID returns information about that catalog specifically.

POST

Adds a catalog to the Enterprise Manager. Since you must provide the contents of the catalog itself, this is the only call that does not use JSON to encode the body of the request. Instead, you must provide the catalog JAR file as a multipart-form element.

DELETE

Deletes the specified catalog from the Enterprise Manager. You must specify a valid catalog ID in the URL.

Arguments

For the POST method, you must provide the catalog JAR file in the body of the call. Since the catalog is a binary file, you must Base64-encode the file's contents to pass it to the service as part of the JSON input. The valid input arguments are the following:

Argument NameTypeDescription
nametextThe name of the catalog
catalogbytes*file dataThe binary contents of a VoltDB catalog JAR file

*Required

When performing a GET, the REST interface returns information about the catalog rather than the catalog file itself. The structure of the JSON object returned for catalogs is as follows:

Attribute NameTypeDescription
nametextThe name of the catalog
versiontext (read-only)The version specified in the catalog
descriptiontext (read-only)The description specified in the catalog

Examples

The following example uses curl to create a new catalog object, encoding the JAR file examples/voter/voter.jar:

CATALOG =$( base64 examples/voter/voter.jar )
JSON="{\"Catalog\":{\"name\":\"Voter\",\"catalogbytes\":\"$CATALOG\"}}"
curl --data "$JSON" http://voltdbmgr:9000/man/api/1.0/mgmt/catalogs
>