Update Cassandra and ElasticSearch versions supported & add node about the need 
for start_rpc=true in Cassandra 2+


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/77ad91a6
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/77ad91a6
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/77ad91a6

Branch: refs/heads/asf-site
Commit: 77ad91a69054b1e1217a67d035ecdbacb7ac3e44
Parents: 11ad1d7
Author: Dave Johnson <[email protected]>
Authored: Mon Oct 24 09:16:27 2016 -0400
Committer: Dave Johnson <[email protected]>
Committed: Mon Oct 24 09:16:27 2016 -0400

----------------------------------------------------------------------
 .../docs/_sources/data-storage/collections.txt  | 144 +++++++++++++
 .../_sources/installation/deployment-guide.txt  | 125 ++++-------
 .../docs/_sources/orgs-and-apps/application.txt | 104 +++++++++
 content/docs/data-storage/collections.html      | 209 +++++++++++++++++--
 content/docs/index.html                         |   3 +
 content/docs/installation/deployment-guide.html |  16 +-
 content/docs/orgs-and-apps/application.html     | 141 +++++++++++++
 content/docs/searchindex.js                     |   2 +-
 docs/installation/deployment-guide.md           | 125 ++++-------
 9 files changed, 674 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/_sources/data-storage/collections.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-storage/collections.txt 
b/content/docs/_sources/data-storage/collections.txt
index fa8652e..88ffc55 100644
--- a/content/docs/_sources/data-storage/collections.txt
+++ b/content/docs/_sources/data-storage/collections.txt
@@ -44,7 +44,150 @@ Response:
       "organization" : "your-org",
       "applicationName" : "your-app"
     }
+ 
+ 
+## Collection Settings
+
+Usergrid allows you to specify settings for each of your Collections. 
+Collections may have a *_settings* resource with the following URI pattern:
+
+       /{org-identifier}/{app-identifier}/{collection-name}/_settings
+       
+If a Collection does not have a _settings resource,
+then doing an HTTP GET on that URI will yield the normal Collection resource.
+For example here a request and respinse for settings for the Collection 
"battles", which does not yet have _settigs:
+
+       curl 
"https//api.usergrid.com/test-organization/settingstest/battles/_settings?access_token=YWM..."
+       {
+         "action" : "get",
+         "application" : "7fd6c414-2cb6-11e6-8b07-0a669fe1d66e",
+         "params" : { },
+         "path" : "/battles",
+         "uri" : 
"https//api.usergrid.com/test-organization/settingstest/battles",
+         "entities" : [ ],
+         "timestamp" : 1465308535753,
+         "duration" : 175,
+         "organization" : "test-organization",
+         "applicationName" : "settingstest"
+       }
+       
+Once a Collection has a _settings resource, here's what it might look like:
+       
+       curl 
"0:8080/test-organization/settingstest/battles/_settings?access_token=YWM..."
+       {
+         "action" : "get",
+         "application" : "7fd6c414-2cb6-11e6-8b07-0a669fe1d66e",
+         "params" : { },
+         "path" : "/battles",
+         "uri" : 
"https//api.usergrid.com/test-organization/settingstest/battles",
+         "entities" : [ ],
+         "data" : {
+           "lastUpdated" : 1465311161543,
+           "lastReindexed" : 0,
+           "fields" : "all",
+           "region" : "us-east-1",
+           "lastUpdateBy" : "[email protected]"
+         },
+         "timestamp" : 1465311177535,
+         "duration" : 6,
+         "organization" : "test-organization",
+         "applicationName" : "settingstest"
+       }
+
+       
+Collection settings are useful for setting up Selective Indexing. Let's 
discuss that next.
+
   
+## Setting up Selective Indexing via Collection Settings
+ 
+Indexing is expensive and now it can be done selectively.
+
+In the beginning, Usergrid indexed each and every field of an Entity. 
+If a field was an object, the the fields of that object would also be indexed.
+Indexing everything is very convenient because it means you can query on any 
field,
+but indexing everything is expensive in terms of performance; 
+it slows down Entity creation and update.
+Indexing everything is also expensive in terms of storage, 
+it takes up space and makes puts strain on the system.
+
+Staring with Usegrid 2.1.1, you can specify a "schema" for each Collection.
+You can tell Usergrid which fields should be indexed or 
+you can tell Usergrid to completely skip indexing for a collection. 
+
+### Specifying a Schema for a Collection
+
+There are three ways to specify a schema for a Collection. 
+You can specify that all fields are to be index, you can specify none or 
+you can specify a list of the fields that should be indexed. 
+You do this by POSTing or PUTing a _settings resource for the Collection with 
one field named "fields".
+
+There are three possible values for "fields":
+
+Fields Setting                 Type     Meaning
+--------------                 ----     -------
+"fields":"all"                 String   Index all Entity fields
+"fields":"none"                String   Index no fields; completely skip 
indexing for this collection.
+"fields":["field1", "field2"]  Array    Index all fields whose names are 
listed in the array value.
+
+
+#### Example: Turn off Indexing for a Collection
+
+This example shows how you would use curl to set the schema if you want to 
turn off indexing for a collection:
+
+       curl -X PUT 
"0:8080/test-organization/settingstest/_settings?access_token=YWM..." -d 
'{"fields":"none"}'
+       {
+         "action" : "put",
+         "application" : "7fd6c414-2cb6-11e6-8b07-0a669fe1d66e",
+         "params" : { },
+         "path" : "/_settings",
+         "uri" : 
"http://localhost:8080/test-organization/settingstest/_settings";,
+         "entities" : [ {
+           "uuid" : "6fc783c6-2cc3-11e6-8fce-0a669fe1d66e",
+           "type" : "_setting",
+           "created" : 1465312858697,
+           "modified" : 1465312858697,
+           "fields" : "none",
+           "metadata" : {
+             "path" : "/_settings/6fc783c6-2cc3-11e6-8fce-0a669fe1d66e",
+             "size" : 347
+           }
+         } ],
+         "timestamp" : 1465312858688,
+         "duration" : 63,
+         "organization" : "test-organization",
+         "applicationName" : "settingstest"
+       }
+
+
+#### Example: Index only one field of a Collection
+
+This example shows how you would use curl to set the schema if you only want 
the "year" field to be indexed:
+
+       curl -X PUT 
"0:8080/test-organization/settingstest/_settings?access_token=YWM..." -d 
'{"fields":["year"]}'
+       {
+         "action" : "put",
+         "application" : "7fd6c414-2cb6-11e6-8b07-0a669fe1d66e",
+         "params" : { },
+         "path" : "/_settings",
+         "uri" : 
"http://localhost:8080/test-organization/settingstest/_settings";,
+         "entities" : [ {
+           "uuid" : "6fc783c6-2cc3-11e6-8fce-0a669fe1d66e",
+           "type" : "_setting",
+           "created" : 1465312858697,
+           "modified" : 1465312858697,
+           "fields" : [ "year" ],
+           "metadata" : {
+             "path" : "/_settings/6fc783c6-2cc3-11e6-8fce-0a669fe1d66e",
+             "size" : 347
+           }
+         } ],
+         "timestamp" : 1465312858688,
+         "duration" : 63,
+         "organization" : "test-organization",
+         "applicationName" : "settingstest"
+       }
+
+
 ## Retrieving Collections
 
 This article describes how to retrieve all of the entities in a collection.
@@ -179,6 +322,7 @@ Response:
       "organization" : "your-org",
       "applicationName" : "your-app"
     }
+    
    
 ## Deleting Collections
 This article describes how to batch delete entities in a collection. Batch 
deletes require the use of a query string in the request, which specifies a 
subset of entities to be deleted. For more information on queries, see Querying 
your data.

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/_sources/installation/deployment-guide.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/installation/deployment-guide.txt 
b/content/docs/_sources/installation/deployment-guide.txt
index 560b6eb..3b1b89a 100644
--- a/content/docs/_sources/installation/deployment-guide.txt
+++ b/content/docs/_sources/installation/deployment-guide.txt
@@ -1,37 +1,28 @@
 # Usergrid 2.1.0 Deployment Guide
 
-This document explains how to deploy the Usergrid v2.1.0 Backend-as-a-Service 
(BaaS), 
-which comprises the Usergrid Stack, a Java web application, and the Usergrid 
Portal,
-which is an HTML5/JavaScript application. 
+This document explains how to deploy the Usergrid v2.1.0 Backend-as-a-Service 
(BaaS), which comprises the Usergrid Stack, a Java web application, and the 
Usergrid Portal, which is an HTML5/JavaScript application. 
 
 
 ## Intended audience
 
-You should be able to follow this guide if you are a developer, system admin 
or 
-operations person with some knowledge of Java application deployment and good 
-knowledge of Linux and the bash shell.
+You should be able to follow this guide if you are a developer, system admin 
or operations person with some knowledge of Java application deployment and 
good knowledge of Linux and the bash shell.
 
-This guide is a starting point and does NOT explain everything you need to 
know to 
-run Usergrid at-scale and in production. To do that you will need some 
additional 
-skills and knowledge around running, monitoring and trouble-shooting Tomcat 
-applications, multi-node Cassandra & ElasticSearch clusters and more.
+This guide is a starting point and does NOT explain everything you need to 
know to run Usergrid at-scale and in production. To do that you will need some 
additional skills and knowledge around running, monitoring and trouble-shooting 
Tomcat applications, multi-node Cassandra & ElasticSearch clusters and more.
 
 
 ## Prerequsites
 
-Below are the software requirements for Usergrid 2.1.0 Stack and Portal. 
-You can install them all on one computer for development purposes, and for 
-deployment you can deploy them separately using clustering.
+Below are the software requirements for Usergrid 2.1.0 Stack and Portal. You 
can install them all on one computer for development purposes, and for 
deployment you can deploy them separately using clustering.
 
    * Linux or a UNIX-like system (Usergrid may run on Windows, but we haven't 
tried it)
    
    * [Java SE 8 
JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
    
-   * [Apache Tomcat 7+](https://tomcat.apache.org/download-70.cgi)
+   * [Apache Tomcat 7](https://tomcat.apache.org/download-70.cgi)
    
-   * [Apache Cassandra 1.2.1+](http://cassandra.apache.org/download/)
+   * [Apache Cassandra 1.2.x or 2.x](http://cassandra.apache.org/download/)
    
-   * [ElasticSearch 1.4+](https://www.elastic.co/downloads/elasticsearch)  
+   * [ElasticSearch 1.4.x or 
1.7.x](https://www.elastic.co/downloads/elasticsearch)  
    
 Optional but helpful:
 
@@ -76,26 +67,24 @@ The files that you need for deploying Usergrid Stack and 
Portal are `ROOT.war` a
 
 ## Deploying the Usergrid Stack
 
-The Usergrid Stack is a Java EE web application that runs on Tomcat, 
-uses the Cassandra database for storage and the ElasticSearch search-engine 
for queries.
+The Usergrid Stack is a Java EE web application that runs on Tomcat, uses the 
Cassandra database for storage and the ElasticSearch search-engine for queries.
  
-Before installing the Usegrid Stack into Tomcat, you'll start by setting up 
the 
-required database and search engine nodes. 
+Before installing the Usegrid Stack into Tomcat, you'll start by setting up 
the required database and search engine nodes. 
  
    
 ### Stack STEP #1: Setup Cassandra 
 
-Usergrid needs access to at least one Apache Cassandra node. You can setup a 
single node of
-Cassandra on your computer for development and testing. For production 
deployment, 
-a three or more node cluster is recommended.
+Usergrid needs access to at least one Apache Cassandra node. You can setup a 
single node of Cassandra on your computer for development and testing. For 
production deployment, a three or more node cluster is recommended.
 
-__Use the right Java.__ Cassandra requires Java and we recommend that you use 
the same version of Java 
-for Cassandra as you use to run Tomcat and ElasticSearch.
+__Use the right Java.__ Cassandra requires Java and we recommend that you use 
the same version of Java for Cassandra as you use to run Tomcat and 
ElasticSearch.
 
-__Refer to the__ [Apache Cassandra 
documentation](http://wiki.apache.org/cassandra/GettingStarted) 
-__for instructions on how to install Cassandra__. The [Datastax documentation 
for Cassandra 
1.2](http://docs.datastax.com/en/cassandra/1.2/cassandra/features/featuresTOC.html)
 is also helpful. 
-Once you are up and running make a note of these things:
+Usergrid uses Cassandra's Thrift protocol and on Cassandra 2.x releases you 
MUST enable Thrift by setting `start_rpc` in your `cassandra.yaml` file:
 
+    # Whether to start the thrift rpc server.
+    start_rpc: true
+
+__Refer to the__ [Apache Cassandra 
documentation](http://wiki.apache.org/cassandra/GettingStarted) __for 
instructions on how to install Cassandra__. The [Datastax documentation for 
Cassandra 
1.2](http://docs.datastax.com/en/cassandra/1.2/cassandra/features/featuresTOC.html)
 is also helpful. Once you are up and running make a note of these things:
+ 
    * The name of the Cassandra cluster
    * Hostname or IP address of each Cassandra node
    * Port number used for Cassandra RPC (the default is 9160)
@@ -104,23 +93,18 @@ Once you are up and running make a note of these things:
 
 ### Stack STEP #2: Setup ElasticSearch
 
-Usergrid also needs access to at least one ElasticSearch node. As with 
Cassandra, 
-you can setup single ElasticSearch node on your computer, and you should run 
-a cluster in production.
+Usergrid also needs access to at least one ElasticSearch node. As with 
Cassandra, you can setup single ElasticSearch node on your computer, and you 
should run a cluster in production.
 
-__Use the right Java__. ElasticSearch requires Java and you *must* ensure that 
you use the 
-same version of Java for ElasticSearch as you do for running Tomcat.
+__Use the right Java__. ElasticSearch requires Java and you *must* ensure that 
you use the same version of Java for ElasticSearch as you do for running Tomcat.
 
 __Refer to the__ 
-[ElasticSearch 1.4 
documentation](https://www.elastic.co/guide/en/elasticsearch/reference/1.4/index.html)
 
-__for instructions on how to install__. Once you are up and running make a 
note of these things:
+[ElasticSearch 1.4 
documentation](https://www.elastic.co/guide/en/elasticsearch/reference/1.4/index.html)
 __for instructions on how to install__. Once you are up and running make a 
note of these things:
 
    * The name of the ElasticSearch cluster
    * Hostname or IP address of each ElasticSearch node
    * Port number used for ElasticSearch protocol (the default is 9200)
 
-__Running a single-node?__ If you are running a single-node ElasticSearch 
cluster then 
-you should set the number of replicas to zero, otherwise the cluster will 
report status YELLOW. 
+__Running a single-node?__ If you are running a single-node ElasticSearch 
cluster then you should set the number of replicas to zero, otherwise the 
cluster will report status YELLOW. 
   
     curl -XPUT 'localhost:9200/_settings' -d '{"index" : { 
"number_of_replicas" : 0}}'
     
@@ -136,13 +120,9 @@ __Refer to the__ [Apache Tomcat 
7](https://tomcat.apache.org/tomcat-7.0-doc/setu
 
 ### Stack STEP #4: Configure Usergrid Stack & Logging
 
-You must create a Usergrid properties file called 
`usergrid-deployment.properties`. 
-The properties in this file tell Usergrid how to communicate with Cassandra and
-ElasticSearch, and how to form URLs using the hostname you wish to use for 
Usegrid.
-There are many properties that you can set to configure Usergrid. 
+You must create a Usergrid properties file called 
`usergrid-deployment.properties`. The properties in this file tell Usergrid how 
to communicate with Cassandra and ElasticSearch, and how to form URLs using the 
hostname you wish to use for Usegrid. There are many properties that you can 
set to configure Usergrid. 
 
-Once you have created your Usergrid properties file, place it in the Tomcat 
lib directory.
-On a Linux system, that directory is probably located at 
`/usr/share/tomcat7/lib`.
+Once you have created your Usergrid properties file, place it in the Tomcat 
lib directory. On a Linux system, that directory is probably located at 
`/usr/share/tomcat7/lib`.
 
 __What goes in a properties file?__
 
@@ -155,8 +135,7 @@ You should review the defaults in the above file. To get 
you started, let's look
 
 #### Example Usergrid Stack Properties File
 
-Below is an minimal example Usergrid properties file with the parts you need 
to change indicated like 
-shell variables, e.g. `${USERGRID_CLUSTER_NAME}`.  
+Below is an minimal example Usergrid properties file with the parts you need 
to change indicated like shell variables, e.g. `${USERGRID_CLUSTER_NAME}`.  
    
 Example 1: usergrid-deployment.properties file
 
@@ -279,8 +258,7 @@ Make sure you set all of the above properties when you edit 
this example for you
 
 #### Configure Logging
 
-Usegrid includes the Apache Log4j logging system and you can control the 
levels of logs for each
-Usergrid package and even down to the class level by providing your own 
`log4j.properties` file.
+Usegrid includes the Apache Log4j logging system and you can control the 
levels of logs for each Usergrid package and even down to the class level by 
providing your own `log4j.properties` file.
 
 To configure logging you need to:
 
@@ -290,9 +268,7 @@ To configure logging you need to:
 
 ##### Example Logging Configuration
 
-The Log4j properties file below is a good starting point for Usergrid. It 
configures `ERROR` level
-logging for the 3rd party libraries that Usergrid depends on, and INFO level 
logging for Usergrid.
-Plus, it configures some noisy parts of Usergrid to be quiet.
+The Log4j properties file below is a good starting point for Usergrid. It 
configures `ERROR` level logging for the 3rd party libraries that Usergrid 
depends on, and INFO level logging for Usergrid. Plus, it configures some noisy 
parts of Usergrid to be quiet.
 
 Example 2: log4.properties file
 
@@ -313,26 +289,18 @@ Example 2: log4.properties file
     
 ##### Add Logging Configuration to Tomcat
 
-You can configure Tomcat to use your Log4j properties file but adding a system 
property to Tomcat
-named `log4j.configuration` which must be set to a `file:/` URL that points to 
your
-properties file. One way to add the above property to the Tomcat start-up is 
to add a line to a 
-Tomcat `setenv.sh` script in Tomcat's bin directory. If that file does not 
exist, then create it.
+You can configure Tomcat to use your Log4j properties file but adding a system 
property to Tomcat named `log4j.configuration` which must be set to a `file:/` 
URL that points to your properties file. One way to add the above property to 
the Tomcat start-up is to add a line to a Tomcat `setenv.sh` script in Tomcat's 
bin directory. If that file does not exist, then create it.
 
-For example, if your property file is in 
`/usr/share/tomcat7/lib/log4j.properties`, then you 
-would add the following line to `setenv.sh`:
+For example, if your property file is in 
`/usr/share/tomcat7/lib/log4j.properties`, then you would add the following 
line to `setenv.sh`:
 
     export 
JAVA_OPTS="-Dlog4j.configuration=file:///usr/share/tomcat7/lib/log4j.properties"
     
-If the file already exists and already sets the JAVA_OPTS variable, then 
you'll have to 
-add your `-D` option to ones already there. Also note, you might want set 
other `-D` and `-X` 
-options in that setenv file, e.g. Java heap size.
+If the file already exists and already sets the JAVA_OPTS variable, then 
you'll have to add your `-D` option to ones already there. Also note, you might 
want set other `-D` and `-X` options in that setenv file, e.g. Java heap size.
 
 
 ### Stack STEP #5: Deploy ROOT.war to Tomcat
 
-The next step is to deploy the Usergrid Stack software to Tomcat. There are a 
variey of ways 
-of doing this and the simplest is probably to place the Usergrid Stack 
`ROOT.war` file into
-the Tomcat `webapps` directory, then restart Tomcat.
+The next step is to deploy the Usergrid Stack software to Tomcat. There are a 
variey of ways of doing this and the simplest is probably to place the Usergrid 
Stack `ROOT.war` file into the Tomcat `webapps` directory, then restart Tomcat.
 
 
 __For example, on Linux...__
@@ -360,17 +328,13 @@ You can watch the Tomcat log in 
`/var/log/tomcat7/catalina.out` for errors:
     
 __Does it work?__
 
-Check to see if Usergrid is up and running by calling the status end-point. 
-If your web browser is running on the same computer as Tomcat (and Tomcat is 
on port 8080), 
-then you can browse to 
[http://localhost:8080/status](http://localhost:8080/status) 
-to view the Usergrid status page. 
+Check to see if Usergrid is up and running by calling the status end-point. If 
your web browser is running on the same computer as Tomcat (and Tomcat is on 
port 8080), then you can browse to 
[http://localhost:8080/status](http://localhost:8080/status) to view the 
Usergrid status page. 
 
 Or you can use curl:
 
     curl http://localhost:8080/status
     
-If you get a JSON file of status data, then you're ready to move to the next 
step.
-You should see a response that begins like this:
+If you get a JSON file of status data, then you're ready to move to the next 
step. You should see a response that begins like this:
 
     {
       "timestamp" : 1454090178953,
@@ -395,14 +359,9 @@ You should see a response that begins like this:
 
 Next, you must initialize the Usergrid database, index and query systems.
 
-To do this you must issue a series of HTTP operations using the superuser 
credentials.
-You can only do this if Usergrid is configured to allow superused login via
-this property `usergrid.sysadmin.login.allowed=true` and if you used the 
-above example properties file, it is allowed.
+To do this you must issue a series of HTTP operations using the superuser 
credentials. You can only do this if Usergrid is configured to allow superused 
login via this property `usergrid.sysadmin.login.allowed=true` and if you used 
the above example properties file, it is allowed.
 
-The three operation you must perform are expressed by the curl commands below 
and,
-of course, you will have ot change the password 'test' to match the superuser 
password 
-that you set in your Usergrid properties file.
+The three operation you must perform are expressed by the curl commands below 
and, of course, you will have ot change the password 'test' to match the 
superuser password that you set in your Usergrid properties file.
 
     curl -X PUT http://localhost:8080/system/database/setup     -u 
superuser:test
     curl -X PUT http://localhost:8080/system/database/bootstrap -u 
superuser:test
@@ -417,19 +376,16 @@ When you issue each of those curl commands, you should 
see a success message lik
         "duration" : 374
     }    
 
-If you don't see a success message, then refer to the Tomcat logs for error 
message and
-seek help from the [Usergrid community](http://usergrid.apache.org/community).
+If you don't see a success message, then refer to the Tomcat logs for error 
message and seek help from the [Usergrid 
community](http://usergrid.apache.org/community).
 
 Now that you've gotten Usergrid up and running, you're ready to deploy the 
Usergrid Portal.
 
 
 ## Deploying the Usergrid Portal
 
-The Usergrid Portal is an HTML5/JavaScript application, a bunch of static 
files that 
-can be deployed to any web server, e.g. Apache HTTPD or Tomcat.
+The Usergrid Portal is an HTML5/JavaScript application, a bunch of static 
files that can be deployed to any web server, e.g. Apache HTTPD or Tomcat.
 
-To deploy the Portal to a web server, you will un-tar the 
`usergrid-portal.tar` file into 
-directory that serves as the root directory of your web pages. 
+To deploy the Portal to a web server, you will un-tar the 
`usergrid-portal.tar` file into directory that serves as the root directory of 
your web pages. 
 
 For example, with Tomcat on Linux you might do something like this:
 
@@ -437,14 +393,11 @@ For example, with Tomcat on Linux you might do something 
like this:
     cd /usr/share/tomcat7/webapps
     tar xf usergrid-portal.tar
     
-Then you will probably want to rename the Portal directory to something that 
will work
-well in a URL. For example, if you want your Portal to exist at the path 
`/portal` then:
+Then you will probably want to rename the Portal directory to something that 
will work well in a URL. For example, if you want your Portal to exist at the 
path `/portal` then:
 
     mv usergrid-portal.2.0.18 portal
     
-Once you have done that there is one more step. You need to configure the 
portal so that 
-it can find the Usergrid stack. You do that by editing the `portal/config.js` 
and changing
-this line:
+Once you have done that there is one more step. You need to configure the 
portal so that it can find the Usergrid stack. You do that by editing the 
`portal/config.js` and changing this line:
 
     Usergrid.overrideUrl = 'http://localhost:8080/';
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/_sources/orgs-and-apps/application.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/orgs-and-apps/application.txt 
b/content/docs/_sources/orgs-and-apps/application.txt
index 801b9ef..f60f63f 100644
--- a/content/docs/_sources/orgs-and-apps/application.txt
+++ b/content/docs/_sources/orgs-and-apps/application.txt
@@ -98,3 +98,107 @@ Note: You also need to provide a valid access token with 
the API call. See [Auth
       }
     }
     
+
+## Deleting and restoring Applications
+Usergrid allows you to clean-up your Organizations by deleting old 
Applications that you no longer need.
+With this feature, Applications are not really deleted but they are hidden 
from view and may be restored later. (At some point in the future, Usergrid may 
get the ability to completely obliterate an Application, but that ability does 
not exist at the time of this writing.)
+
+### Delete Application: Request URI
+
+Only an authenticated Admin User can delete and restore Applications. 
+To delete an application, you send an authenticated HTTP **DELETE** request to 
the /management end-point.
+The Request URI must specify the Organization and the Application, both by 
identifier (name or UUID).
+Here is the Request URI pattern:
+
+       
/management/organizations|orgs/{org_name}|{uuid}/applications|apps/{app_name}
+    
+Parameters
+
+This is intentionally redundant, but you must confirm that you really want to 
delete the Application
+by specifying its name or UUID, same as that which you used in the Request URI.
+
+Parameter                           Description
+---------                      -----------
+string confirm_application_id  Application identifier (either name or UUID)
+
+Note: You also need to provide a valid access token with the API call. See 
[Authenticating users and application 
clients](../security_and_auth/authenticating-users-and-application-clients.html)
 for details.
+
+
+### Delete Application: Example - Request
+
+This  example deletes an aApplication named 'testapp1'
+
+    curl -X DELETE 
"https://api.usergrid.com/management/orgs/testorg/apps/testapp1?confirm_application_id=testapp1";
+    
+### Delete Application: Example - Response
+
+The response echos back the action that was taken and the params, and an HTTP 
200 OK status message confirms that the Application has been deleted.
+
+    HTTP/1.1 200 OK
+    Access-Control-Allow-Origin: *
+       Content-Length: 276
+       Content-Type: application/json
+       Date: Mon, 06 Jun 2016 18:52:04 GMT
+       Server: Apache-Coyote/1.1
+       Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 
05-Jun-2016 18:52:04 GMT
+       {
+           "action": "delete",
+           "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+           "applicationName": "delete",
+           "duration": 3,
+           "organization": "test-organization",
+           "params": {
+               "confirm_application_identifier": [
+                   "testapp1"
+               ]
+           },
+           "timestamp": 1465239124645
+       }
+
+    
+### Restore Application: Request URI
+
+To Restore an Application that has been deleted you must know the 
Application's UUID. If you do a PUT to that application's old URI, using he 
UUID to identify it, then the Application will be restored.
+ 
+### Restore Application: Example - Request
+
+For example, to restore 'testapp1' that we deleted above:
+
+       curl -X PUT 
"https://api.usergrid.com/management/orgs/test-organization/apps/d44dfc30-2c13-11e6-8b07-0a669fe1d66e
 access_token==YWMtZR..."
+       
+### Restore Application: Example - Response
+
+Here's the response that indicates via HTTP 200 OK that the Application has 
been restored.
+       
+       HTTP/1.1 200 OK
+       Access-Control-Allow-Origin: *
+       Content-Length: 223
+       Content-Type: application/json
+       Date: Mon, 06 Jun 2016 19:03:16 GMT
+       Server: Apache-Coyote/1.1
+       Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 
05-Jun-2016 19:03:16 GMT
+       
+       {
+           "action": "restore",
+           "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+           "applicationName": "delete",
+           "duration": 3,
+           "organization": "test-organization",
+           "params": {},
+           "timestamp": 1465239796913
+       }
+    
+### Application Delete and Restore Limitations
+
+At the time of this writing there are a couple of limitations regarding 
Application Delete and Restore:
+
+* Within an Organization, you cannot delete an Application with the same name 
as an Application that you have deleted before.
+* Within an Organization, you cannot restore an Application is an application 
with the very same name has been added since the orginal one was deleted.
+
+Hopefully, these unnecessary limitations will be fixed soon; they are tracked 
by this JIRA issue 
[USERGRID-1299](https://issues.apache.org/jira/browse/USERGRID-1299)
+
+
+
+
+    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/data-storage/collections.html
----------------------------------------------------------------------
diff --git a/content/docs/data-storage/collections.html 
b/content/docs/data-storage/collections.html
index be72bfb..1a7dedc 100644
--- a/content/docs/data-storage/collections.html
+++ b/content/docs/data-storage/collections.html
@@ -105,22 +105,31 @@
 <li class="toctree-l3"><a class="reference internal" 
href="#example-request-response">Example Request/Response</a></li>
 </ul>
 </li>
+<li class="toctree-l2"><a class="reference internal" 
href="#collection-settings">Collection Settings</a></li>
+<li class="toctree-l2"><a class="reference internal" 
href="#setting-up-selective-indexing-via-collection-settings">Setting up 
Selective Indexing via Collection Settings</a><ul>
+<li class="toctree-l3"><a class="reference internal" 
href="#specifying-a-schema-for-a-collection">Specifying a Schema for a 
Collection</a><ul>
+<li class="toctree-l4"><a class="reference internal" 
href="#example-turn-off-indexing-for-a-collection">Example: Turn off Indexing 
for a Collection</a></li>
+<li class="toctree-l4"><a class="reference internal" 
href="#example-index-only-one-field-of-a-collection">Example: Index only one 
field of a Collection</a></li>
+</ul>
+</li>
+</ul>
+</li>
 <li class="toctree-l2"><a class="reference internal" 
href="#retrieving-collections">Retrieving Collections</a><ul>
 <li class="toctree-l3"><a class="reference internal" 
href="#retrieving-sets-of-entities-from-a-collection">Retrieving sets of 
entities from a collection</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id1">Request 
Syntax</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id2">Example 
Request/Response</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id5">Request 
Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id6">Example 
Request/Response</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" 
href="#updating-collections">Updating Collections</a><ul>
 <li class="toctree-l3"><a class="reference internal" 
href="#batch-updating-entities-in-a-collection">Batch updating entities in a 
collection</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id3">Request 
Syntax</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id4">Example 
Request/Response</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id7">Request 
Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id8">Example 
Request/Response</a></li>
 </ul>
 </li>
 <li class="toctree-l2"><a class="reference internal" 
href="#deleting-collections">Deleting Collections</a><ul>
 <li class="toctree-l3"><a class="reference internal" 
href="#batch-deleting-entities-in-a-collection">Batch deleting entities in a 
collection</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id5">Request 
Syntax</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#id6">Example 
Request/Response</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id9">Request 
Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id10">Example 
Request/Response</a></li>
 </ul>
 </li>
 </ul>
@@ -334,6 +343,170 @@ providing &#8216;items&#8217; will not create 
&#8216;itemses&#8217;.</p>
 </div>
 </div>
 </div>
+<div class="section" id="collection-settings">
+<h2>Collection Settings<a class="headerlink" href="#collection-settings" 
title="Permalink to this headline">¶</a></h2>
+<p>Usergrid allows you to specify settings for each of your Collections.
+Collections may have a *_settings* resource with the following URI
+pattern:</p>
+<div class="highlight-python"><div 
class="highlight"><pre>/{org-identifier}/{app-identifier}/{collection-name}/_settings
+</pre></div>
+</div>
+<p>If a Collection does not have a <a href="#id1"><span class="problematic" 
id="id2">*</span></a>settings resource, then doing an HTTP
+GET on that URI will yield the normal Collection resource. For example
+here a request and respinse for settings for the Collection 
&#8220;battles&#8221;,
+which does not yet have <a href="#id3"><span class="problematic" 
id="id4">*</span></a>settigs:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl 
&quot;https//api.usergrid.com/test-organization/settingstest/battles/_settings?access_token=YWM...&quot;
+{
+  &quot;action&quot; : &quot;get&quot;,
+  &quot;application&quot; : &quot;7fd6c414-2cb6-11e6-8b07-0a669fe1d66e&quot;,
+  &quot;params&quot; : { },
+  &quot;path&quot; : &quot;/battles&quot;,
+  &quot;uri&quot; : 
&quot;https//api.usergrid.com/test-organization/settingstest/battles&quot;,
+  &quot;entities&quot; : [ ],
+  &quot;timestamp&quot; : 1465308535753,
+  &quot;duration&quot; : 175,
+  &quot;organization&quot; : &quot;test-organization&quot;,
+  &quot;applicationName&quot; : &quot;settingstest&quot;
+}
+</pre></div>
+</div>
+<p>Once a Collection has a _settings resource, here&#8217;s what it might look
+like:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl 
&quot;0:8080/test-organization/settingstest/battles/_settings?access_token=YWM...&quot;
+{
+  &quot;action&quot; : &quot;get&quot;,
+  &quot;application&quot; : &quot;7fd6c414-2cb6-11e6-8b07-0a669fe1d66e&quot;,
+  &quot;params&quot; : { },
+  &quot;path&quot; : &quot;/battles&quot;,
+  &quot;uri&quot; : 
&quot;https//api.usergrid.com/test-organization/settingstest/battles&quot;,
+  &quot;entities&quot; : [ ],
+  &quot;data&quot; : {
+    &quot;lastUpdated&quot; : 1465311161543,
+    &quot;lastReindexed&quot; : 0,
+    &quot;fields&quot; : &quot;all&quot;,
+    &quot;region&quot; : &quot;us-east-1&quot;,
+    &quot;lastUpdateBy&quot; : &quot;[email protected]&quot;
+  },
+  &quot;timestamp&quot; : 1465311177535,
+  &quot;duration&quot; : 6,
+  &quot;organization&quot; : &quot;test-organization&quot;,
+  &quot;applicationName&quot; : &quot;settingstest&quot;
+}
+</pre></div>
+</div>
+<p>Collection settings are useful for setting up Selective Indexing. 
Let&#8217;s
+discuss that next.</p>
+</div>
+<div class="section" 
id="setting-up-selective-indexing-via-collection-settings">
+<h2>Setting up Selective Indexing via Collection Settings<a class="headerlink" 
href="#setting-up-selective-indexing-via-collection-settings" title="Permalink 
to this headline">¶</a></h2>
+<p>Indexing is expensive and now it can be done selectively.</p>
+<p>In the beginning, Usergrid indexed each and every field of an Entity. If
+a field was an object, the the fields of that object would also be
+indexed. Indexing everything is very convenient because it means you can
+query on any field, but indexing everything is expensive in terms of
+performance; it slows down Entity creation and update. Indexing
+everything is also expensive in terms of storage, it takes up space and
+makes puts strain on the system.</p>
+<p>Staring with Usegrid 2.1.1, you can specify a &#8220;schema&#8221; for each
+Collection. You can tell Usergrid which fields should be indexed or you
+can tell Usergrid to completely skip indexing for a collection.</p>
+<div class="section" id="specifying-a-schema-for-a-collection">
+<h3>Specifying a Schema for a Collection<a class="headerlink" 
href="#specifying-a-schema-for-a-collection" title="Permalink to this 
headline">¶</a></h3>
+<p>There are three ways to specify a schema for a Collection. You can
+specify that all fields are to be index, you can specify none or you can
+specify a list of the fields that should be indexed. You do this by
+POSTing or PUTing a _settings resource for the Collection with one
+field named &#8220;fields&#8221;.</p>
+<p>There are three possible values for &#8220;fields&#8221;:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="30%" />
+<col width="9%" />
+<col width="61%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Fields Setting</th>
+<th class="head">Type</th>
+<th class="head">Meaning</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>&#8220;fields&#8221;:&#8221;all&#8221;</td>
+<td>String</td>
+<td>Index all Entity fields</td>
+</tr>
+<tr class="row-odd"><td>&#8220;fields&#8221;:&#8221;none&#8221;</td>
+<td>String</td>
+<td>Index no fields; completely skip indexing for this collection.</td>
+</tr>
+<tr class="row-even"><td>&#8220;fields&#8221;:[&#8220;field1&#8221;, 
&#8220;field2&#8221;]</td>
+<td>Array</td>
+<td>Index all fields whose names are listed in the array value.</td>
+</tr>
+</tbody>
+</table>
+<div class="section" id="example-turn-off-indexing-for-a-collection">
+<h4>Example: Turn off Indexing for a Collection<a class="headerlink" 
href="#example-turn-off-indexing-for-a-collection" title="Permalink to this 
headline">¶</a></h4>
+<p>This example shows how you would use curl to set the schema if you want
+to turn off indexing for a collection:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X PUT 
&quot;0:8080/test-organization/settingstest/_settings?access_token=YWM...&quot; 
-d &#39;{&quot;fields&quot;:&quot;none&quot;}&#39;
+{
+  &quot;action&quot; : &quot;put&quot;,
+  &quot;application&quot; : &quot;7fd6c414-2cb6-11e6-8b07-0a669fe1d66e&quot;,
+  &quot;params&quot; : { },
+  &quot;path&quot; : &quot;/_settings&quot;,
+  &quot;uri&quot; : 
&quot;http://localhost:8080/test-organization/settingstest/_settings&quot;,
+  &quot;entities&quot; : [ {
+    &quot;uuid&quot; : &quot;6fc783c6-2cc3-11e6-8fce-0a669fe1d66e&quot;,
+    &quot;type&quot; : &quot;_setting&quot;,
+    &quot;created&quot; : 1465312858697,
+    &quot;modified&quot; : 1465312858697,
+    &quot;fields&quot; : &quot;none&quot;,
+    &quot;metadata&quot; : {
+      &quot;path&quot; : 
&quot;/_settings/6fc783c6-2cc3-11e6-8fce-0a669fe1d66e&quot;,
+      &quot;size&quot; : 347
+    }
+  } ],
+  &quot;timestamp&quot; : 1465312858688,
+  &quot;duration&quot; : 63,
+  &quot;organization&quot; : &quot;test-organization&quot;,
+  &quot;applicationName&quot; : &quot;settingstest&quot;
+}
+</pre></div>
+</div>
+</div>
+<div class="section" id="example-index-only-one-field-of-a-collection">
+<h4>Example: Index only one field of a Collection<a class="headerlink" 
href="#example-index-only-one-field-of-a-collection" title="Permalink to this 
headline">¶</a></h4>
+<p>This example shows how you would use curl to set the schema if you only
+want the &#8220;year&#8221; field to be indexed:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X PUT 
&quot;0:8080/test-organization/settingstest/_settings?access_token=YWM...&quot; 
-d &#39;{&quot;fields&quot;:[&quot;year&quot;]}&#39;
+{
+  &quot;action&quot; : &quot;put&quot;,
+  &quot;application&quot; : &quot;7fd6c414-2cb6-11e6-8b07-0a669fe1d66e&quot;,
+  &quot;params&quot; : { },
+  &quot;path&quot; : &quot;/_settings&quot;,
+  &quot;uri&quot; : 
&quot;http://localhost:8080/test-organization/settingstest/_settings&quot;,
+  &quot;entities&quot; : [ {
+    &quot;uuid&quot; : &quot;6fc783c6-2cc3-11e6-8fce-0a669fe1d66e&quot;,
+    &quot;type&quot; : &quot;_setting&quot;,
+    &quot;created&quot; : 1465312858697,
+    &quot;modified&quot; : 1465312858697,
+    &quot;fields&quot; : [ &quot;year&quot; ],
+    &quot;metadata&quot; : {
+      &quot;path&quot; : 
&quot;/_settings/6fc783c6-2cc3-11e6-8fce-0a669fe1d66e&quot;,
+      &quot;size&quot; : 347
+    }
+  } ],
+  &quot;timestamp&quot; : 1465312858688,
+  &quot;duration&quot; : 63,
+  &quot;organization&quot; : &quot;test-organization&quot;,
+  &quot;applicationName&quot; : &quot;settingstest&quot;
+}
+</pre></div>
+</div>
+</div>
+</div>
+</div>
 <div class="section" id="retrieving-collections">
 <h2>Retrieving Collections<a class="headerlink" href="#retrieving-collections" 
title="Permalink to this headline">¶</a></h2>
 <p>This article describes how to retrieve all of the entities in a
@@ -353,8 +526,8 @@ for details.</p>
 <div class="section" id="retrieving-sets-of-entities-from-a-collection">
 <h3>Retrieving sets of entities from a collection<a class="headerlink" 
href="#retrieving-sets-of-entities-from-a-collection" title="Permalink to this 
headline">¶</a></h3>
 </div>
-<div class="section" id="id1">
-<h3>Request Syntax<a class="headerlink" href="#id1" title="Permalink to this 
headline">¶</a></h3>
+<div class="section" id="id5">
+<h3>Request Syntax<a class="headerlink" href="#id5" title="Permalink to this 
headline">¶</a></h3>
 <div class="highlight-python"><div class="highlight"><pre>curl -X GET 
https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;
 </pre></div>
 </div>
@@ -382,8 +555,8 @@ for details.</p>
 </tbody>
 </table>
 </div>
-<div class="section" id="id2">
-<h3>Example Request/Response<a class="headerlink" href="#id2" title="Permalink 
to this headline">¶</a></h3>
+<div class="section" id="id6">
+<h3>Example Request/Response<a class="headerlink" href="#id6" title="Permalink 
to this headline">¶</a></h3>
 <p>Request:</p>
 <div class="highlight-python"><div class="highlight"><pre>curl -X GET 
&quot;https://api.usergrid.com/your-org/your-app/items&quot;
 </pre></div>
@@ -443,8 +616,8 @@ for details.</p>
 <div class="section" id="batch-updating-entities-in-a-collection">
 <h3>Batch updating entities in a collection<a class="headerlink" 
href="#batch-updating-entities-in-a-collection" title="Permalink to this 
headline">¶</a></h3>
 </div>
-<div class="section" id="id3">
-<h3>Request Syntax<a class="headerlink" href="#id3" title="Permalink to this 
headline">¶</a></h3>
+<div class="section" id="id7">
+<h3>Request Syntax<a class="headerlink" href="#id7" title="Permalink to this 
headline">¶</a></h3>
 <div class="highlight-python"><div class="highlight"><pre>curl -X PUT 
https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;/?ql= -d 
{&lt;property&gt;}
 </pre></div>
 </div>
@@ -478,8 +651,8 @@ example:</p>
 </pre></div>
 </div>
 </div>
-<div class="section" id="id4">
-<h3>Example Request/Response<a class="headerlink" href="#id4" title="Permalink 
to this headline">¶</a></h3>
+<div class="section" id="id8">
+<h3>Example Request/Response<a class="headerlink" href="#id8" title="Permalink 
to this headline">¶</a></h3>
 <p>Request:</p>
 <div class="highlight-python"><div class="highlight"><pre>curl -X PUT 
https://api.usergrid.com/your-org/your-app/items/?ql= -d 
&#39;{&quot;availability&quot;:&quot;in-stock&quot;}&#39;
 </pre></div>
@@ -538,8 +711,8 @@ for details.</p>
 <div class="section" id="batch-deleting-entities-in-a-collection">
 <h3>Batch deleting entities in a collection<a class="headerlink" 
href="#batch-deleting-entities-in-a-collection" title="Permalink to this 
headline">¶</a></h3>
 </div>
-<div class="section" id="id5">
-<h3>Request Syntax<a class="headerlink" href="#id5" title="Permalink to this 
headline">¶</a></h3>
+<div class="section" id="id9">
+<h3>Request Syntax<a class="headerlink" href="#id9" title="Permalink to this 
headline">¶</a></h3>
 <div class="highlight-python"><div class="highlight"><pre>curl -X DELETE 
https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;/?ql=&lt;query&gt;
 </pre></div>
 </div>
@@ -571,8 +744,8 @@ for details.</p>
 </table>
 <p>(for more information on queries, see Querying your data)</p>
 </div>
-<div class="section" id="id6">
-<h3>Example Request/Response<a class="headerlink" href="#id6" title="Permalink 
to this headline">¶</a></h3>
+<div class="section" id="id10">
+<h3>Example Request/Response<a class="headerlink" href="#id10" 
title="Permalink to this headline">¶</a></h3>
 <p>The following example will delete the first 5 entities in a collection.</p>
 <p>Request:</p>
 <div class="highlight-python"><div class="highlight"><pre>curl -X DELETE 
https://api.usergrid.com/your-org/your-app/items/?ql=&quot;limit=5&quot;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/index.html
----------------------------------------------------------------------
diff --git a/content/docs/index.html b/content/docs/index.html
index 6d2f2b4..41ed10e 100644
--- a/content/docs/index.html
+++ b/content/docs/index.html
@@ -309,6 +309,8 @@
 </li>
 <li class="toctree-l1"><a class="reference internal" 
href="data-storage/collections.html">Collections</a><ul>
 <li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#creating-collections">Creating 
Collections</a></li>
+<li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#collection-settings">Collection 
Settings</a></li>
+<li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#setting-up-selective-indexing-via-collection-settings">Setting
 up Selective Indexing via Collection Settings</a></li>
 <li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#retrieving-collections">Retrieving 
Collections</a></li>
 <li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#updating-collections">Updating 
Collections</a></li>
 <li class="toctree-l2"><a class="reference internal" 
href="data-storage/collections.html#deleting-collections">Deleting 
Collections</a></li>
@@ -633,6 +635,7 @@
 <li class="toctree-l2"><a class="reference internal" 
href="orgs-and-apps/application.html#creating-an-application">Creating an 
application</a></li>
 <li class="toctree-l2"><a class="reference internal" 
href="orgs-and-apps/application.html#generating-application-credentials">Generating
 application credentials</a></li>
 <li class="toctree-l2"><a class="reference internal" 
href="orgs-and-apps/application.html#getting-application-credentials">Getting 
application credentials</a></li>
+<li class="toctree-l2"><a class="reference internal" 
href="orgs-and-apps/application.html#deleting-and-restoring-applications">Deleting
 and restoring Applications</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" 
href="orgs-and-apps/admin-user.html">Admin user</a><ul>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/installation/deployment-guide.html
----------------------------------------------------------------------
diff --git a/content/docs/installation/deployment-guide.html 
b/content/docs/installation/deployment-guide.html
index 49bf2d6..a50a57f 100644
--- a/content/docs/installation/deployment-guide.html
+++ b/content/docs/installation/deployment-guide.html
@@ -280,10 +280,11 @@ for deployment you can deploy them separately using 
clustering.</p>
 haven&#8217;t tried it)</li>
 <li><a class="reference external" 
href="http://www.oracle.com/technetwork/java/javase/downloads/index.html";>Java 
SE 8
 JDK</a></li>
-<li><a class="reference external" 
href="https://tomcat.apache.org/download-70.cgi";>Apache Tomcat 7+</a></li>
-<li><a class="reference external" 
href="http://cassandra.apache.org/download/";>Apache Cassandra 1.2.1+</a></li>
-<li><a class="reference external" 
href="https://www.elastic.co/downloads/elasticsearch";>ElasticSearch
-1.4+</a></li>
+<li><a class="reference external" 
href="https://tomcat.apache.org/download-70.cgi";>Apache Tomcat 7</a></li>
+<li><a class="reference external" 
href="http://cassandra.apache.org/download/";>Apache Cassandra 1.2.x or
+2.x</a></li>
+<li><a class="reference external" 
href="https://www.elastic.co/downloads/elasticsearch";>ElasticSearch 1.4.x or
+1.7.x</a></li>
 </ul>
 <p>Optional but helpful:</p>
 <ul class="simple">
@@ -345,6 +346,13 @@ recommended.</p>
 <p><strong>Use the right Java.</strong> Cassandra requires Java and we 
recommend that
 you use the same version of Java for Cassandra as you use to run Tomcat
 and ElasticSearch.</p>
+<p>Usergrid uses Cassandra&#8217;s Thrift protocol and on Cassandra 2.x 
releases
+you MUST enable Thrift by setting <code class="docutils literal"><span 
class="pre">start_rpc</span></code> in your
+<code class="docutils literal"><span class="pre">cassandra.yaml</span></code> 
file:</p>
+<div class="highlight-python"><div class="highlight"><pre># Whether to start 
the thrift rpc server.
+start_rpc: true
+</pre></div>
+</div>
 <p><strong>Refer to the</strong> <a class="reference external" 
href="http://wiki.apache.org/cassandra/GettingStarted";>Apache Cassandra
 documentation</a> <strong>for
 instructions on how to install Cassandra</strong>. The <a class="reference 
external" 
href="http://docs.datastax.com/en/cassandra/1.2/cassandra/features/featuresTOC.html";>Datastax
 documentation

http://git-wip-us.apache.org/repos/asf/usergrid/blob/77ad91a6/content/docs/orgs-and-apps/application.html
----------------------------------------------------------------------
diff --git a/content/docs/orgs-and-apps/application.html 
b/content/docs/orgs-and-apps/application.html
index fdded4b..3a7182b 100644
--- a/content/docs/orgs-and-apps/application.html
+++ b/content/docs/orgs-and-apps/application.html
@@ -190,6 +190,16 @@
 <li class="toctree-l3"><a class="reference internal" href="#id6">Example - 
Response</a></li>
 </ul>
 </li>
+<li class="toctree-l2"><a class="reference internal" 
href="#deleting-and-restoring-applications">Deleting and restoring 
Applications</a><ul>
+<li class="toctree-l3"><a class="reference internal" 
href="#delete-application-request-uri">Delete Application: Request URI</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#delete-application-example-request">Delete Application: Example - 
Request</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#delete-application-example-response">Delete Application: Example - 
Response</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#restore-application-request-uri">Restore Application: Request 
URI</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#restore-application-example-request">Restore Application: Example - 
Request</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#restore-application-example-response">Restore Application: Example - 
Response</a></li>
+<li class="toctree-l3"><a class="reference internal" 
href="#application-delete-and-restore-limitations">Application Delete and 
Restore Limitations</a></li>
+</ul>
+</li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" 
href="admin-user.html">Admin user</a></li>
@@ -437,6 +447,137 @@ for details.</p>
 </div>
 </div>
 </div>
+<div class="section" id="deleting-and-restoring-applications">
+<h2>Deleting and restoring Applications<a class="headerlink" 
href="#deleting-and-restoring-applications" title="Permalink to this 
headline">¶</a></h2>
+<p>Usergrid allows you to clean-up your Organizations by deleting old
+Applications that you no longer need. With this feature, Applications
+are not really deleted but they are hidden from view and may be restored
+later. (At some point in the future, Usergrid may get the ability to
+completely obliterate an Application, but that ability does not exist at
+the time of this writing.)</p>
+<div class="section" id="delete-application-request-uri">
+<h3>Delete Application: Request URI<a class="headerlink" 
href="#delete-application-request-uri" title="Permalink to this 
headline">¶</a></h3>
+<p>Only an authenticated Admin User can delete and restore Applications. To
+delete an application, you send an authenticated HTTP <strong>DELETE</strong> 
request
+to the /management end-point. The Request URI must specify the
+Organization and the Application, both by identifier (name or UUID).
+Here is the Request URI pattern:</p>
+<div class="highlight-python"><div 
class="highlight"><pre>/management/organizations|orgs/{org_name}|{uuid}/applications|apps/{app_name}
+</pre></div>
+</div>
+<p>Parameters</p>
+<p>This is intentionally redundant, but you must confirm that you really
+want to delete the Application by specifying its name or UUID, same as
+that which you used in the Request URI.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="42%" />
+<col width="58%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Parameter</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>string confirm_application_id</td>
+<td>Application identifier (either name or UUID)</td>
+</tr>
+</tbody>
+</table>
+<p>Note: You also need to provide a valid access token with the API call.
+See <a class="reference external" 
href="../security_and_auth/authenticating-users-and-application-clients.html">Authenticating
 users and application
+clients</a>
+for details.</p>
+</div>
+<div class="section" id="delete-application-example-request">
+<h3>Delete Application: Example - Request<a class="headerlink" 
href="#delete-application-example-request" title="Permalink to this 
headline">¶</a></h3>
+<p>This example deletes an aApplication named &#8216;testapp1&#8217;</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X DELETE 
&quot;https://api.usergrid.com/management/orgs/testorg/apps/testapp1?confirm_application_id=testapp1&quot;
+</pre></div>
+</div>
+</div>
+<div class="section" id="delete-application-example-response">
+<h3>Delete Application: Example - Response<a class="headerlink" 
href="#delete-application-example-response" title="Permalink to this 
headline">¶</a></h3>
+<p>The response echos back the action that was taken and the params, and an
+HTTP 200 OK status message confirms that the Application has been
+deleted.</p>
+<div class="highlight-python"><div class="highlight"><pre>HTTP/1.1 200 OK
+Access-Control-Allow-Origin: *
+Content-Length: 276
+Content-Type: application/json
+Date: Mon, 06 Jun 2016 18:52:04 GMT
+Server: Apache-Coyote/1.1
+Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 
18:52:04 GMT
+{
+    &quot;action&quot;: &quot;delete&quot;,
+    &quot;application&quot;: &quot;d44dfc30-2c13-11e6-8b07-0a669fe1d66e&quot;,
+    &quot;applicationName&quot;: &quot;delete&quot;,
+    &quot;duration&quot;: 3,
+    &quot;organization&quot;: &quot;test-organization&quot;,
+    &quot;params&quot;: {
+        &quot;confirm_application_identifier&quot;: [
+            &quot;testapp1&quot;
+        ]
+    },
+    &quot;timestamp&quot;: 1465239124645
+}
+</pre></div>
+</div>
+</div>
+<div class="section" id="restore-application-request-uri">
+<h3>Restore Application: Request URI<a class="headerlink" 
href="#restore-application-request-uri" title="Permalink to this 
headline">¶</a></h3>
+<p>To Restore an Application that has been deleted you must know the
+Application&#8217;s UUID. If you do a PUT to that application&#8217;s old URI, 
using
+he UUID to identify it, then the Application will be restored.</p>
+</div>
+<div class="section" id="restore-application-example-request">
+<h3>Restore Application: Example - Request<a class="headerlink" 
href="#restore-application-example-request" title="Permalink to this 
headline">¶</a></h3>
+<p>For example, to restore &#8216;testapp1&#8217; that we deleted above:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X PUT 
&quot;https://api.usergrid.com/management/orgs/test-organization/apps/d44dfc30-2c13-11e6-8b07-0a669fe1d66e
 access_token==YWMtZR...&quot;
+</pre></div>
+</div>
+</div>
+<div class="section" id="restore-application-example-response">
+<h3>Restore Application: Example - Response<a class="headerlink" 
href="#restore-application-example-response" title="Permalink to this 
headline">¶</a></h3>
+<p>Here&#8217;s the response that indicates via HTTP 200 OK that the 
Application
+has been restored.</p>
+<div class="highlight-python"><div class="highlight"><pre>HTTP/1.1 200 OK
+Access-Control-Allow-Origin: *
+Content-Length: 223
+Content-Type: application/json
+Date: Mon, 06 Jun 2016 19:03:16 GMT
+Server: Apache-Coyote/1.1
+Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 
19:03:16 GMT
+
+{
+    &quot;action&quot;: &quot;restore&quot;,
+    &quot;application&quot;: &quot;d44dfc30-2c13-11e6-8b07-0a669fe1d66e&quot;,
+    &quot;applicationName&quot;: &quot;delete&quot;,
+    &quot;duration&quot;: 3,
+    &quot;organization&quot;: &quot;test-organization&quot;,
+    &quot;params&quot;: {},
+    &quot;timestamp&quot;: 1465239796913
+}
+</pre></div>
+</div>
+</div>
+<div class="section" id="application-delete-and-restore-limitations">
+<h3>Application Delete and Restore Limitations<a class="headerlink" 
href="#application-delete-and-restore-limitations" title="Permalink to this 
headline">¶</a></h3>
+<p>At the time of this writing there are a couple of limitations regarding
+Application Delete and Restore:</p>
+<ul class="simple">
+<li>Within an Organization, you cannot delete an Application with the
+same name as an Application that you have deleted before.</li>
+<li>Within an Organization, you cannot restore an Application is an
+application with the very same name has been added since the orginal
+one was deleted.</li>
+</ul>
+<p>Hopefully, these unnecessary limitations will be fixed soon; they are
+tracked by this JIRA issue
+<a class="reference external" 
href="https://issues.apache.org/jira/browse/USERGRID-1299";>USERGRID-1299</a></p>
+</div>
+</div>
 </div>
 
 

Reply via email to