Skip to content

Application Management Commands (OLAP)

JoeWinter edited this page Feb 19, 2015 · 2 revisions

[Table of Contents](https://github.com/dell-oss/Doradus/wiki/OLAP Databases: Table-of-Contents) | Previous | Next
OLAP REST Commands: Application Management Commands


REST commands that create, modify, and list applications are sent to the `_applications` resource. Application management REST commands supported by Doradus OLAP are described in this section.

Create Application

A new application is created by sending a POST request to the _applications resource:

POST /_applications

The request must include the application’s schema as an input entity in XML or JSON format. If the request is successful, a 200 OK response is returned with no message body.

Because Doradus supports idempotent updates, using this command for an existing application is not an error and treated as a Modify Application command. If the identical schema is added twice, the second command is treated as a no-op.

A new application is automatically created as an OLAP application if the Doradus server is appropriately configured. However, an application can be explicitly managed by the OLAP server by setting the application-level option StorageService to OLAPService.

See The Email Sample Application section for an example schema in XML and JSON.

Modify Application

An existing application’s schema is modified with the following REST command:

POST /_application/{application}

where {application} is the application’s name. The request must include the application’s modified schema in XML or JSON as specified by the request’s content-type header. Because an application’s name cannot be changed, {application} must match the application name in the schema. An application’s key cannot be changed either, hence if the application was defined with a key, the same key must be provided. If application was defined without a key, a key can be added by including it in the updated schema. If the request is successful, a 200 OK response is returned with no message body.

Modifying an application replaces its current schema. If any previously-defined tables or fields are omitted in the new schema, those tables/fields can no longer be referenced in queries, but existing data is not modified or deleted. Data is deleted only when an object is explicitly deleted, the owning shard is explicitly deleted, or the shard is automatically deleted due to data aging.

List Application

A list of all application schemas is obtained with the following command:

 GET /_applications 

The schemas are returned in the format specified by the Accept header.

The schema of a specific application is obtained with the following command:

 GET /_applications/{application}

where {application} is the application’s name.

Delete Application

An existing application—including all of its data—is deleted with one of the following commands:

DELETE /_applications/{application}
    DELETE /_applications/{application}/{key}

where {application} is the application’s name. If the application’s schema defines a key, the {key} must be provided in the command, and it must match.

Clone this wiki locally