You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2021/04/23 13:20:48 UTC

[solr] branch main updated: SOLR-11646: document v2 api (WIP) (#41)

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 7103731  SOLR-11646: document v2 api (WIP) (#41)
7103731 is described below

commit 71037313ff1eb4ac1fbe22800dc5651822862cc8
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Fri Apr 23 09:20:36 2021 -0400

    SOLR-11646: document v2 api (WIP) (#41)
    
    Update ref guide for collection management, shard management, replica management, and alias management.
    
    Co-authored-by: epugh@opensourceconnections.com <>
    Co-authored-by: Jason Gerlowski <ge...@apache.org>
---
 solr/solr-ref-guide/src/collection-aliasing.adoc   | 329 ++++++++++---------
 solr/solr-ref-guide/src/collection-management.adoc | 285 ++---------------
 solr/solr-ref-guide/src/collections-api.adoc       | 104 +++++-
 solr/solr-ref-guide/src/replica-management.adoc    | 355 ++++++++++++---------
 solr/solr-ref-guide/src/shard-management.adoc      | 283 +++++++++-------
 5 files changed, 688 insertions(+), 668 deletions(-)

diff --git a/solr/solr-ref-guide/src/collection-aliasing.adoc b/solr/solr-ref-guide/src/collection-aliasing.adoc
index 80ab5b9..c2a7fd2 100644
--- a/solr/solr-ref-guide/src/collection-aliasing.adoc
+++ b/solr/solr-ref-guide/src/collection-aliasing.adoc
@@ -159,7 +159,7 @@ is created (possibly several seconds). Preemptive creation reduces these hiccups
 an hour or more) then if there are problems creating a collection, this window of time might be enough to take
 corrective action. However after a successful preemptive creation,  the collection is consuming resources without
 being used, and new documents will tend to be routed through it only to be routed elsewhere. Also, note that
-router.autoDeleteAge is currently evaluated relative to the date of a newly created collection, and so you may
+`router.autoDeleteAge` is currently evaluated relative to the date of a newly created collection, and so you may
 want to increase the delete age by the preemptive window amount so that the oldest collection isn't deleted too
 soon. Note that it has to be possible to subtract the interval specified from a date, so if prepending a
 minus sign creates invalid date math, this will cause an error. Also note that a document that is itself
@@ -214,33 +214,6 @@ Create an alias named "testalias" and link it to the collections named "foo" and
 [.dynamic-tabs]
 --
 
-[example.tab-pane#v2createAlias]
-====
-[.tab-label]*V2 API*
-*Input*
-
-[source,json]
-----
-{
-  "create-alias":{
-    "name":"testalias",
-    "collections":["foo","bar"]
-  }
-}
-----
-*Output*
-
-[source,json]
-----
-{
-  "responseHeader": {
-    "status": 0,
-    "QTime": 125
-  }
-}
-----
-====
-
 [example.tab-pane#v1createAlias]
 ====
 [.tab-label]*V1 API*
@@ -264,64 +237,41 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=testalias&c
 </response>
 ----
 ====
---
-
-A somewhat contrived example demonstrating creating a TRA with many additional collection creation options.
-Notice that the collection creation parameters follow the v2 API naming convention, not the v1 naming conventions.
-
-[.dynamic-tabs]
---
 
-[example.tab-pane#v2createTRA]
+[example.tab-pane#v2createAlias]
 ====
 [.tab-label]*V2 API*
-
 *Input*
 
-POST /api/c
-
-[source,json]
+[source,bash]
 ----
-{
-  "create-alias" : {
-    "name": "somethingTemporalThisWayComes",
-    "router" : {
-      "name": "time",
-      "field": "evt_dt",
-      "start":"NOW/MINUTE",
-      "interval":"+2HOUR",
-      "maxFutureMs":"14400000"
-    },
-    "create-collection" : {
-      "config":"_default",
-      "router": {
-        "name":"implicit",
-        "field":"foo_s"
-      },
-      "shards":"foo,bar,baz",
-      "numShards": 3,
-      "tlogReplicas":1,
-      "pullReplicas":1,
-      "properties" : {
-        "foobar":"bazbam"
-      }
+curl -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
+  {
+    "create-alias":{
+      "name":"testalias",
+      "collections":["foo","bar"]
     }
   }
-}
+'
 ----
-
 *Output*
 
 [source,json]
 ----
 {
-    "responseHeader": {
-        "status": 0,
-        "QTime": 1234
-    }
+  "responseHeader": {
+    "status": 0,
+    "QTime": 125
+  }
 }
 ----
 ====
+--
+
+A somewhat contrived example demonstrating creating a TRA with many additional collection creation options.
+
+[.dynamic-tabs]
+--
 
 [example.tab-pane#v1createTRA]
 ====
@@ -346,6 +296,7 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS
     &create-collection.tlogReplicas=1
     &create-collection.pullReplicas=1
     &create-collection.property.foobar=bazbam
+    &wt=xml
 ----
 
 *Output*
@@ -360,45 +311,46 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS
 </response>
 ----
 ====
---
-
-Another example, this time of a Dimensional Routed Alias demonstrating how to specify parameters for the
-individual dimensions
-
-[.dynamic-tabs]
---
 
-[example.tab-pane#v2createDRA]
+[example.tab-pane#v2createTRA]
 ====
 [.tab-label]*V2 API*
 
 *Input*
 
-POST /api/c
-[source,json]
+
+[source,bash]
 ----
-{
-  "create-alias":{
-    "name":"dra_test1",
-    "router": {
-      "name": "Dimensional[time,category]",
-      "routerList" : [ {
-            "field":"myDate_tdt",
-            "start":"2019-01-01T00:00:00Z",
-            "interval":"+1MONTH",
-            "maxFutureMs":600000
-        },{
-             "field":"myCategory_s",
-             "maxCardinality":20
-        }]
-    },
-    "create-collection": {
-      "config":"_default",
-      "numShards":2
+curl -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
+  {
+    "create-alias" : {
+      "name": "somethingTemporalThisWayComes",
+      "router" : {
+        "name": "time",
+        "field": "evt_dt",
+        "start":"NOW/MINUTE",
+        "interval":"+2HOUR",
+        "maxFutureMs":"14400000"
+      },
+      "create-collection" : {
+        "config":"_default",
+        "router": {
+          "name":"implicit",
+          "field":"foo_s"
+        },
+        "shards":"foo,bar,baz",
+        "numShards": 3,
+        "tlogReplicas":1,
+        "pullReplicas":1,
+        "properties" : {
+          "foobar":"bazbam"
+        }
+      }
     }
   }
-}
+'
 ----
+
 *Output*
 
 [source,json]
@@ -412,6 +364,14 @@ POST /api/c
 ----
 ====
 
+--
+
+Another example, this time of a Dimensional Routed Alias demonstrating how to specify parameters for the
+individual dimensions
+
+[.dynamic-tabs]
+--
+
 [example.tab-pane#v1createDRA]
 ====
 [.tab-label]*V1 API*
@@ -431,6 +391,7 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS
     &create-collection.numShards=2
     &router.1.maxCardinality=20
     &router.1.field=myCategory_s
+    &wt=xml
 ----
 
 *Output*
@@ -445,12 +406,79 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS
 </response>
 ----
 ====
+
+[example.tab-pane#v2createDRA]
+====
+[.tab-label]*V2 API*
+
+*Input*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
+  {
+    "create-alias":{
+      "name":"dra_test1",
+      "router": {
+        "name": "Dimensional[time,category]",
+        "routerList" : [ {
+              "field":"myDate_tdt",
+              "start":"2019-01-01T00:00:00Z",
+              "interval":"+1MONTH",
+              "maxFutureMs":600000
+          },{
+               "field":"myCategory_s",
+               "maxCardinality":20
+          }]
+      },
+      "create-collection": {
+        "config":"_default",
+        "numShards":2
+      }
+    }
+  }
+'
+----
+*Output*
+
+[source,json]
+----
+{
+    "responseHeader": {
+        "status": 0,
+        "QTime": 1234
+    }
+}
+----
+====
+
 --
 
 [[listaliases]]
 == LISTALIASES: List of all aliases in the cluster
 
-`/admin/collections?action=LISTALIASES`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listaliases]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8982/solr/admin/collections?action=LISTALIASES
+----
+====
+
+[example.tab-pane#v2listaliases]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X GET http://localhost:8983/api/cluster/aliases
+----
+====
+--
 
 The LISTALIASES action does not take any parameters.
 
@@ -496,7 +524,37 @@ http://localhost:8983/solr/admin/collections?action=LISTALIASES&wt=xml
 
 The `ALIASPROP` action modifies the properties (metadata) on an alias. If a key is set with a value that is empty it will be removed.
 
-`/admin/collections?action=ALIASPROP&name=_name_&property.someKey=somevalue`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1aliasprop]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/admin/collections?action=ALIASPROP&name=techproducts_alias&property.foo=bar
+----
+====
+
+[example.tab-pane#v2aliasprop]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
+{
+  "set-alias-property":{
+    "name":"techproducts_alias",
+    "properties": {"foo":"bar"}
+  }
+}
+'
+----
+
+====
+--
+
 
 WARNING: This command allows you to revise any property. No alias specific validation is performed.
          Routed aliases may cease to function, function incorrectly or cause errors if property values
@@ -507,8 +565,11 @@ WARNING: This command allows you to revise any property. No alias specific valid
 `name`::
 The alias name on which to set properties. This parameter is required.
 
-`property.*`::
-The name of the property to be modified replaces '*', the value for the parameter is passed as the value for the property.
+`property._name_=_value_` (v1)::
+Set property _name_ to _value_.
+
+`"properties":{"name":"value"}` (v2)::
+A dictionary of name/value pairs of properties to be set.
 
 `async`::
 Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
@@ -519,33 +580,38 @@ The output will simply be a responseHeader with details of the time it took to p
 To confirm the creation of the property or properties, you can look in the Solr Admin UI, under the Cloud section and
 find the `aliases.json` file or use the LISTALIASES api command.
 
-=== Examples using ALIASPROP
-
-*Input*
+[[deletealias]]
+== DELETEALIAS: Delete a Collection Alias
 
-For an alias named "testalias2" and set the value "someValue" for a property of "someKey" and "otherValue" for "otherKey".
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletealias]
+====
+[.tab-label]*V1 API*
 
-[source,text]
+[source,bash]
 ----
-http://localhost:8983/solr/admin/collections?action=ALIASPROP&name=testalias2&property.someKey=someValue&property.otherKey=otherValue&wt=xml
+http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testalias
 ----
+====
 
-*Output*
+[example.tab-pane#v2deletealias]
+====
+[.tab-label]*V2 API*
 
-[source,xml]
+[source,bash]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">122</int>
-  </lst>
-</response>
+curl -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
+{
+  "delete-alias":{
+    "name":"testalias"
+  }
+}
+'
 ----
+====
+--
 
-[[deletealias]]
-== DELETEALIAS: Delete a Collection Alias
-
-`/admin/collections?action=DELETEALIAS&name=_name_`
 
 === DELETEALIAS Parameters
 
@@ -560,26 +626,3 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 The output will simply be a responseHeader with details of the time it took to process the request.
 To confirm the removal of the alias, you can look in the Solr Admin UI, under the Cloud section, and
 find the `aliases.json` file.
-
-=== Examples using DELETEALIAS
-
-*Input*
-
-Remove the alias named "testalias".
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testalias&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">117</int>
-  </lst>
-</response>
-----
diff --git a/solr/solr-ref-guide/src/collection-management.adoc b/solr/solr-ref-guide/src/collection-management.adoc
index 1712fba..829d1c2 100644
--- a/solr/solr-ref-guide/src/collection-management.adoc
+++ b/solr/solr-ref-guide/src/collection-management.adoc
@@ -19,7 +19,7 @@
 
 A collection is a single logical index that uses a single Solr configuration file (`solrconfig.xml`) and a single index schema.
 
-The examples assume you have started Solr via `solr/bin start -c -e techproducts`.
+The examples assume you have started Solr via `bin/solr start -c -e techproducts`.
 
 [[create]]
 == CREATE: Create a Collection
@@ -152,43 +152,6 @@ mode using the <<collection-management.adoc#modifycollection,MODIFYCOLLECTION>>
 
 The response will include the status of the request and the new core names. If the status is anything other than "success", an error message will explain why the request failed.
 
-=== Examples using CREATE
-
-*Input*
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=CREATE&name=techproducts_v2&collection.configName=techproducts&numShards=2&replicationFactor=1&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">3764</int>
-  </lst>
-  <lst name="success">
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">3450</int>
-      </lst>
-      <str name="core">techproducts_v2_shard1_replica_n1</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">3597</int>
-      </lst>
-      <str name="core">techproducts_v2_shard2_replica_n2</str>
-    </lst>
-  </lst>
-</response>
-----
-
 [[reload]]
 == RELOAD: Reload a Collection
 
@@ -254,41 +217,6 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 
 The response will include the status of the request and the cores that were reloaded. If the status is anything other than "success", an error message will explain why the request failed.
 
-=== Examples using RELOAD
-
-*Input*
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=RELOAD&name=techproducts_v2&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">1551</int>
-  </lst>
-  <lst name="success">
-    <lst name="10.0.1.6:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">761</int>
-      </lst>
-    </lst>
-    <lst name="10.0.1.4:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1527</int>
-      </lst>
-    </lst>
-  </lst>
-</response>
-----
-
 [[modifycollection]]
 == MODIFYCOLLECTION: Modify Attributes of a Collection
 
@@ -521,6 +449,13 @@ http://localhost:8983/solr/admin/collections?action=DELETE&name=techproducts_v2
 ----
 curl -X DELETE http://localhost:8983/api/collections/techproducts_v2
 ----
+
+To run a DELETE asynchronously then append the `async` parameter:
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/techproducts_v2?async=aaaa
+----
 ====
 --
 
@@ -615,27 +550,6 @@ The value of the property. When not provided, the property is deleted.
 
 The response will include the status of the request and the properties that were updated or removed. If the status is anything other than "0", an error message will explain why the request failed.
 
-=== Examples using COLLECTIONPROP
-
-*Input*
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=COLLECTIONPROP&name=coll&propertyName=foo&propertyValue=bar&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">0</int>
-  </lst>
-</response>
-----
-
 [[migrate]]
 == MIGRATE: Migrate Documents to Another Collection
 
@@ -705,161 +619,6 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 
 The response will include the status of the request.
 
-=== Examples using MIGRATE
-
-*Input*
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=test1&split.key=a!&target.collection=test2&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">19014</int>
-  </lst>
-  <lst name="success">
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1</int>
-      </lst>
-      <str name="core">test2_shard1_0_replica_n1</str>
-      <str name="status">BUFFERING</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">2479</int>
-      </lst>
-      <str name="core">split_shard1_0_temp_shard1_0_shard1_replica_n1</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1002</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">21</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1655</int>
-      </lst>
-      <str name="core">split_shard1_0_temp_shard1_0_shard1_replica_n2</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">4006</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">17</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1</int>
-      </lst>
-      <str name="core">test2_shard1_0_replica_n1</str>
-      <str name="status">EMPTY_BUFFER</str>
-    </lst>
-    <lst name="192.168.43.52:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">31</int>
-      </lst>
-    </lst>
-    <lst name="192.168.43.52:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">31</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1</int>
-      </lst>
-      <str name="core">test2_shard1_1_replica_n1</str>
-      <str name="status">BUFFERING</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1742</int>
-      </lst>
-      <str name="core">split_shard1_1_temp_shard1_1_shard1_replica_n1</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1002</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">15</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1917</int>
-      </lst>
-      <str name="core">split_shard1_1_temp_shard1_1_shard1_replica_n2</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">5007</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">8</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">1</int>
-      </lst>
-      <str name="core">test2_shard1_1_replica_n1</str>
-      <str name="status">EMPTY_BUFFER</str>
-    </lst>
-    <lst name="192.168.43.52:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">30</int>
-      </lst>
-    </lst>
-    <lst name="192.168.43.52:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">30</int>
-      </lst>
-    </lst>
-  </lst>
-</response>
-----
-
 [[reindexcollection]]
 == REINDEXCOLLECTION: Re-Index a Collection
 
@@ -1587,13 +1346,14 @@ http://localhost:8983/solr/admin/collections?action=LISTBACKUP&name=myBackupName
 
 [source,bash]
 ----
-POST http://localhost:8983/v2/collections/backups
-{
-  "list-backups" : {
-    "name": "myBackupName",
-    "location": "/path/to/my/shared/drive"
+curl -X POST http://localhost:8983/v2/collections/backups -H 'Content-Type: application/json' -d'
+  {
+    "list-backups" : {
+      "name": "myBackupName",
+      "location": "/path/to/my/shared/drive"
+    }
   }
-}
+'
 ----
 ====
 --
@@ -1756,14 +1516,15 @@ http://localhost:8983/solr/admin/collections?action=DELETEBACKUP&name=myBackupNa
 
 [source,bash]
 ----
-POST http://localhost:8983/v2/collections/backups
-{
-  "delete-backups" : {
-    "name": "myBackupName",
-    "location": "/path/to/my/shared/drive",
-    "backupId": 0
+curl -X POST http://localhost:8983/v2/collections/backups -H 'Content-Type: application/json' -d'
+  {
+    "delete-backups" : {
+      "name": "myBackupName",
+      "location": "/path/to/my/shared/drive",
+      "backupId": 0
+    }
   }
-}
+'
 ----
 ====
 --
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index 26ae222..4f276dd 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -42,22 +42,52 @@ As of now, REQUESTSTATUS does not automatically clean up the tracking data struc
 
 *Input*
 
+[.dynamic-tabs]
+--
+[example.tab-pane#v1asyncexample]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1&async=1000
+
+----
+====
+
+[example.tab-pane#v2asyncexample]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/collection1/shards -H 'Content-Type: application/json' -d'
+  {
+    "split": {
+      "shard": "shard1",
+      "async": "1000"
+    }
+  }
+'
+----
+====
+--
+
+
 [source,text]
 ----
-http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1&async=1000&wt=xml
+
 ----
 
 *Output*
 
-[source,xml]
+[source,json]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">99</int>
-  </lst>
-  <str name="requestid">1000</str>
-</response>
+{
+  "responseHeader":{
+    "status":0,
+    "QTime":115},
+  "requestid":"1000"}
 ----
 
 
@@ -66,7 +96,29 @@ http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collec
 
 Request the status and response of an already submitted <<Asynchronous Calls,Asynchronous Collection API>> (below) call. This call is also used to clear up the stored statuses.
 
-`/admin/collections?action=REQUESTSTATUS&requestid=_request-id_`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1asyncrequeststatus]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1000
+
+----
+====
+
+[example.tab-pane#v2asyncrequeststatus]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X GET http://localhost:8983/api/cluster/command-status/1000
+----
+====
+--
 
 === REQUESTSTATUS Parameters
 
@@ -126,7 +178,36 @@ http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1004
 
 Deletes the stored response of an already failed or completed <<Asynchronous Calls,Asynchronous Collection API>> call.
 
-`/admin/collections?action=DELETESTATUS&requestid=_request-id_`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1asyncdeletestatus]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=1000
+
+----
+====
+
+[example.tab-pane#v2asyncdeletestatus]
+====
+[.tab-label]*V2 API*
+
+Delete a single request response:
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/cluster/command-status/1000
+----
+
+Flush out all stored completed and failed async request responses:
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/cluster/command-status
+----
+====
+--
 
 === DELETESTATUS Parameters
 
@@ -135,6 +216,7 @@ The request ID of the asynchronous call whose stored response should be cleared.
 
 `flush`::
 Set to `true` to clear all stored completed and failed async request responses.
+This is required only with the V1 API.
 
 === Examples using DELETESTATUS
 
diff --git a/solr/solr-ref-guide/src/replica-management.adoc b/solr/solr-ref-guide/src/replica-management.adoc
index 037bd1a..1fcbf68 100644
--- a/solr/solr-ref-guide/src/replica-management.adoc
+++ b/solr/solr-ref-guide/src/replica-management.adoc
@@ -17,14 +17,81 @@
 // specific language governing permissions and limitations
 // under the License.
 
-A replica is a physical copy of a shard.
+A replica is a physical copy of a shard.  Replicas enhance fail over by providing additional copies of the data
+and enhance scalability by providing additional capacity for searching.
+
+The examples assume you have started Solr via `bin/solr start -c -e techproducts`.
 
 [[addreplica]]
 == ADDREPLICA: Add Replica
 
 Add one or more replicas to a shard in a collection. The node name can be specified if the replica is to be created in a specific node. Otherwise, a set of nodes can be specified and the most suitable ones among them will be chosen to create the replica(s).
 
-`/admin/collections?action=ADDREPLICA&collection=_collection_&shard=_shard_&node=_nodeName_`
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v1addreplica]
+====
+[.tab-label]*V1 API*
+
+*Input*
+
+[source,text]
+----
+http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=techproducts&shard=shard1&node=localhost:8983_solr
+----
+
+*Output*
+
+[source,json]
+----
+{
+  "responseHeader":{
+    "status":0,
+    "QTime":482},
+  "success":{
+    "localhost:8983_solr":{
+      "responseHeader":{
+        "status":0,
+        "QTime":396},
+      "core":"techproducts_shard1_replica_n3"}}}
+----
+====
+
+[example.tab-pane#v2addreplica]
+====
+[.tab-label]*V2 API*
+*Input*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Content-Type: application/json' -d'
+  {
+    "add-replica":{
+      "shard":"shard1",
+      "node":"localhost:8983_solr"
+    }
+  }
+'
+----
+*Output*
+
+[source,json]
+----
+{
+  "responseHeader":{
+    "status":0,
+    "QTime":820},
+  "success":{
+    "localhost:8983_solr":{
+      "responseHeader":{
+        "status":0,
+        "QTime":473},
+      "core":"techproducts_shard1_replica_n11"}}}
+----
+====
+--
+
 
 === ADDREPLICA Parameters
 
@@ -89,37 +156,7 @@ If `true`, the request will complete only when all affected replicas become acti
 `async`::
 Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>
 
-=== Examples using ADDREPLICA
-
-*Input*
-
-Create a replica for the "test" collection on the node "192.167.1.2:8983_solr".
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=test2&shard=shard2&node=192.167.1.2:8983_solr&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">3764</int>
-  </lst>
-  <lst name="success">
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">3450</int>
-      </lst>
-      <str name="core">test2_shard2_replica4</str>
-    </lst>
-  </lst>
-</response>
-----
+=== Additional Examples using ADDREPLICA
 
 *Input*
 
@@ -165,53 +202,20 @@ This command moves a replica from one node to another node by executing ADDREPLI
 
 If this command is used on a collection where more than one replica from the same shard exists on the same node, and the `shard` and `sourceNode` parameters match more than one replica, the replica selected is not deterministic (currently it's random).
 
-=== MOVEREPLICA Parameters
-
-`collection`::
-The name of the collection. This parameter is required.
-
-`targetNode`::
-The name of the destination node. This parameter is required.
-
-`sourceNode`::
-The name of the node that contains the replica to move. This parameter is required unless `replica` is specified. If `replica` is specified this parameter is ignored.
-
-`shard`::
-The name of the shard for which a replica should be moved. This parameter is required unless `replica` is specified. If `replica` is specified, this parameter is ignored.
-
-`replica`::
-The name of the replica to move. This parameter is required unless `shard` and `sourceNode` are specified, however this parameter has precedence over those two parameters.
-
-`timeout`::
-The number of seconds to wait for the replica to be live in the new location before deleting the replica in the old location. Defaults to 600 seconds. Deletion will not occur and creation will not be rolled back in the event of a timeout, potentially leaving an extra replica. Presently, this parameter is ignored if the replica is an hdfs replica.
-
-`inPlaceMove`::
-For replicas that use shared filesystems allow 'in-place' move that reuses shared data. Defaults to true, but is ignored if the replica does not have the property `shared_storage` with a value of `true`
-
-`async`::
-Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
-
-=== Examples using MOVEREPLICA
-
 [.dynamic-tabs]
 --
 
-[example.tab-pane#v2moveReplica]
+[example.tab-pane#v1movereplica]
 ====
-[.tab-label]*V2 API*
-*Input*
+[.tab-label]*V1 API*
 
-`POST /api/c/test`
+*Input*
 
-[source,json]
+[source,text]
 ----
-{
-  "move-replica":{
-    "replica":"core_node6",
-    "targetNode": "localhost:8983_solr"
-  }
-}
+http://localhost:8983/solr/admin/collections?action=MOVEREPLICA&collection=test&targetNode=localhost:8983_solr&replica=core_node6
 ----
+
 *Output*
 
 [source,json]
@@ -226,17 +230,22 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 ----
 ====
 
-[example.tab-pane#v1createAlias]
+[example.tab-pane#v2movereplica]
 ====
-[.tab-label]*V1 API*
-
+[.tab-label]*V2 API*
 *Input*
 
-[source,text]
+[source,bash]
 ----
-http://localhost:8983/solr/admin/collections?action=MOVEREPLICA&collection=test&targetNode=localhost:8983_solr&replica=core_node6
+curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Content-Type: application/json' -d'
+  {
+    "move-replica":{
+      "replica":"core_node6",
+      "targetNode": "localhost:8983_solr"
+    }
+  }
+'
 ----
-
 *Output*
 
 [source,json]
@@ -252,6 +261,33 @@ http://localhost:8983/solr/admin/collections?action=MOVEREPLICA&collection=test&
 ====
 --
 
+=== MOVEREPLICA Parameters
+
+`collection`::
+The name of the collection. This parameter is required.
+
+`targetNode`::
+The name of the destination node. This parameter is required.
+
+`sourceNode`::
+The name of the node that contains the replica to move. This parameter is required unless `replica` is specified. If `replica` is specified this parameter is ignored.
+
+`shard`::
+The name of the shard for which a replica should be moved. This parameter is required unless `replica` is specified. If `replica` is specified, this parameter is ignored.
+
+`replica`::
+The name of the replica to move. This parameter is required unless `shard` and `sourceNode` are specified, however this parameter has precedence over those two parameters.
+
+`timeout`::
+The number of seconds to wait for the replica to be live in the new location before deleting the replica in the old location. Defaults to 600 seconds. Deletion will not occur and creation will not be rolled back in the event of a timeout, potentially leaving an extra replica. Presently, this parameter is ignored if the replica is an hdfs replica.
+
+`inPlaceMove`::
+For replicas that use shared filesystems allow 'in-place' move that reuses shared data. Defaults to true, but is ignored if the replica does not have the property `shared_storage` with a value of `true`
+
+`async`::
+Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
+
+
 
 [[deletereplica]]
 == DELETEREPLICA: Delete a Replica
@@ -260,7 +296,36 @@ Deletes a named replica from the specified collection and shard.
 
 If the corresponding core is up and running the core is unloaded, the entry is removed from the clusterstate, and (by default) delete the instanceDir and dataDir. If the node/core is down, the entry is taken off the clusterstate and if the core comes up later it is automatically unregistered.
 
-`/admin/collections?action=DELETEREPLICA&collection=_collection_&shard=_shard_&replica=_replica_`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletereplica]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=techproducts&shard=shard1&replica=core_node2
+----
+====
+
+[example.tab-pane#v2deletereplica]
+====
+[.tab-label]*V2 API*
+
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1/core_node2
+----
+
+To run a DELETE asynchronously then append the `async` parameter:
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1/core_node2?async=aaaa
+----
+====
+--
 
 === DELETEREPLICA Parameters
 
@@ -295,33 +360,47 @@ When set to `true`, no action will be taken if the replica is active. Default `f
 `async`::
 Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
 
-=== Examples using DELETEREPLICA
+[[addreplicaprop]]
+== ADDREPLICAPROP: Add Replica Property
+
+Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.
+
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v1addreplicaprop]
+====
+[.tab-label]*V1 API*
 
 *Input*
 
 [source,text]
 ----
-http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=test2&shard=shard2&replica=core_node3&wt=xml
+http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&collection=techproducts&shard=shard1&replica=core_node2&property=preferredLeader&property.value=true
 ----
 
-*Output*
+====
 
-[source,xml]
+[example.tab-pane#v2addreplicaprop]
+====
+[.tab-label]*V2 API*
+*Input*
+
+[source,bash]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">110</int>
-  </lst>
-</response>
+curl -X POST http://localhost:8983/api/collections/techproducts -H 'Content-Type: application/json' -d'
+  {
+    "add-replica-property":{
+      "shard":"shard1",
+      "replica":"core_node2",
+      "name":"preferredLeader",
+      "value": "true"
+    }
+  }
+'
 ----
-
-[[addreplicaprop]]
-== ADDREPLICAPROP: Add Replica Property
-
-Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.
-
-`/admin/collections?action=ADDREPLICAPROP&collection=collectionName&shard=shardName&replica=replicaName&property=propertyName&property.value=value`
+====
+--
 
 === ADDREPLICAPROP Parameters
 
@@ -353,34 +432,13 @@ If `true`, then setting this property in one replica will remove the property fr
 +
 There is one pre-defined property `preferredLeader` for which `shardUnique` is forced to `true` and an error returned if `shardUnique` is explicitly set to `false`.
 +
-`PreferredLeader` is a boolean property. Any value assigned that is not equal (case insensitive) to `true` will be interpreted as `false` for `preferredLeader`.
+`preferredLeader` is a boolean property. Any value assigned that is not equal (case insensitive) to `true` will be interpreted as `false` for `preferredLeader`.
 
 === ADDREPLICAPROP Response
 
 The response will include the status of the request. If the status is anything other than "0", an error message will explain why the request failed.
 
-=== Examples using ADDREPLICAPROP
-
-*Input*
-
-This command would set the "preferredLeader" property (`property.preferredLeader`) to "true" on "core_node1", and remove that property from any other replica in the shard.
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader&property.value=true&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">46</int>
-  </lst>
-</response>
-----
+=== Additional Examples using ADDREPLICAPROP
 
 *Input*
 
@@ -409,7 +467,41 @@ http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&
 
 Deletes an arbitrary property from a particular replica.
 
-`/admin/collections?action=DELETEREPLICAPROP&collection=collectionName&shard=_shardName_&replica=_replicaName_&property=_propertyName_`
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v1deletereplicaprop]
+====
+[.tab-label]*V1 API*
+
+*Input*
+
+[source,text]
+----
+http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&collection=techproducts&shard=shard1&replica=core_node2&property=preferredLeader
+----
+
+====
+
+[example.tab-pane#v2deletereplicaprop]
+====
+[.tab-label]*V2 API*
+*Input*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/techproducts -H 'Content-Type: application/json' -d'
+  {
+    "delete-replica-property":{
+      "shard":"shard1",
+      "replica":"core_node2",
+      "name":"preferredLeader"
+    }
+  }
+'
+----
+====
+--
 
 === DELETEREPLICAPROP Parameters
 
@@ -434,26 +526,3 @@ and
 === DELETEREPLICAPROP Response
 
 The response will include the status of the request. If the status is anything other than "0", an error message will explain why the request failed.
-
-=== Examples using DELETEREPLICAPROP
-
-*Input*
-
-This command would delete the preferredLeader (`property.preferredLeader`) from core_node1.
-
-[source,text]
-----
-http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader&wt=xml
-----
-
-*Output*
-
-[source,xml]
-----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">9</int>
-  </lst>
-</response>
-----
diff --git a/solr/solr-ref-guide/src/shard-management.adoc b/solr/solr-ref-guide/src/shard-management.adoc
index 0bee787..5dff3f0 100644
--- a/solr/solr-ref-guide/src/shard-management.adoc
+++ b/solr/solr-ref-guide/src/shard-management.adoc
@@ -21,10 +21,66 @@ In SolrCloud, a shard is a logical partition of a collection. This partition sto
 
 The number of shards you have helps to determine how many documents a single collection can contain in total, and also impacts search performance.
 
+The examples assume you have started Solr via `bin/solr start -c -e techproducts`.
+
 [[splitshard]]
 == SPLITSHARD: Split a Shard
 
-`/admin/collections?action=SPLITSHARD&collection=_name_&shard=_shardID_`
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v1splitshard]
+====
+[.tab-label]*V1 API*
+
+*Input*
+
+[source,text]
+----
+http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=techproducts&shard=shard1
+----
+
+*Output*
+
+[source,json]
+----
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 137
+  }
+}
+----
+====
+
+[example.tab-pane#v2splitshard]
+====
+[.tab-label]*V2 API*
+*Input*
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Content-Type: application/json' -d'
+  {
+    "split":{
+      "shard":"shard1"
+    }
+  }
+'
+----
+*Output*
+
+[source,json]
+----
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 125
+  }
+}
+----
+====
+--
 
 Splitting a shard will take an existing shard and break it into two pieces which are written to disk as two (new) shards. The original shard will continue to contain the same data as-is but it will start re-routing requests to the new shards. The new shards will have as many replicas as the original shard. A soft commit is automatically issued after splitting a shard so that documents are made visible on sub-shards. An explicit commit (hard or soft) is not necessary after a split operati [...]
 
@@ -125,87 +181,68 @@ Current implementation details and limitations:
 
 The output will include the status of the request and the new shard names, which will use the original shard as their basis, adding an underscore and a number. For example, "shard1" will become "shard1_0" and "shard1_1". If the status is anything other than "success", an error message will explain why the request failed.
 
-=== Examples using SPLITSHARD
+[[createshard]]
+== CREATESHARD: Create a Shard
+
+Shards can only created with this API for collections that use the 'implicit' router (i.e., when the collection was created, `router.name=implicit`). A new shard with a name can be created for an existing 'implicit' collection.
 
-*Input*
+Use SPLITSHARD for collections created with the 'compositeId' router (`router.key=compositeId`).
+
+[.dynamic-tabs]
+--
 
-Split shard1 of the "anotherCollection" collection.
+[example.tab-pane#v1createshard]
+====
+[.tab-label]*V1 API*
+
+*Input*
 
 [source,text]
 ----
-http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=anotherCollection&shard=shard1&wt=xml
+http://localhost:8983/solr/admin/collections?action=CREATESHARD&shard=newShardName&collection=techproducts
 ----
 
 *Output*
 
-[source,xml]
+[source,json]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">6120</int>
-  </lst>
-  <lst name="success">
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">3673</int>
-      </lst>
-      <str name="core">anotherCollection_shard1_1_replica1</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">3681</int>
-      </lst>
-      <str name="core">anotherCollection_shard1_0_replica1</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">6008</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">6007</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">71</int>
-      </lst>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">0</int>
-      </lst>
-      <str name="core">anotherCollection_shard1_1_replica1</str>
-      <str name="status">EMPTY_BUFFER</str>
-    </lst>
-    <lst>
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">0</int>
-      </lst>
-      <str name="core">anotherCollection_shard1_0_replica1</str>
-      <str name="status">EMPTY_BUFFER</str>
-    </lst>
-  </lst>
-</response>
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 120
+  }
+}
 ----
+====
 
-[[createshard]]
-== CREATESHARD: Create a Shard
-
-Shards can only created with this API for collections that use the 'implicit' router (i.e., when the collection was created, `router.name=implicit`). A new shard with a name can be created for an existing 'implicit' collection.
+[example.tab-pane#v2createshard]
+====
+[.tab-label]*V2 API*
+*Input*
 
-Use SPLITSHARD for collections created with the 'compositeId' router (`router.key=compositeId`).
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Content-Type: application/json' -d'
+  {
+    "create":{
+      "shard":"newShardName"
+    }
+  }
+'
+----
+*Output*
 
-`/admin/collections?action=CREATESHARD&shard=_shardName_&collection=_name_`
+[source,json]
+----
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 125
+  }
+}
+----
+====
+--
 
 The default values for `replicationFactor` or `nrtReplicas`, `tlogReplicas`, `pullReplicas` from the collection is used to determine the number of replicas to be created for the new shard. This can be customized by explicitly passing the corresponding parameters to the request.
 
@@ -244,35 +281,42 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 
 The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.
 
-=== Examples using CREATESHARD
+[[deleteshard]]
+== DELETESHARD: Delete a Shard
 
-*Input*
+Deleting a shard will unload all replicas of the shard, remove them from the collection's `state.json`, and (by default) delete the instanceDir and dataDir for each replica. It will only remove shards that are inactive, or which have no range given for custom sharding.
 
-Create 'shard-z' for the "anImplicitCollection" collection.
 
-[source,text]
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deleteshard]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
 ----
-http://localhost:8983/solr/admin/collections?action=CREATESHARD&collection=anImplicitCollection&shard=shard-z&wt=xml
+http://localhost:8983/solr/admin/collections?action=DELETESHARD&shard=shard1&collection=techproducts
 ----
+====
 
-*Output*
+[example.tab-pane#v2deleteshard]
+====
+[.tab-label]*V2 API*
 
-[source,xml]
+
+[source,bash]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">558</int>
-  </lst>
-</response>
+curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1
 ----
 
-[[deleteshard]]
-== DELETESHARD: Delete a Shard
-
-Deleting a shard will unload all replicas of the shard, remove them from the collection's `state.json`, and (by default) delete the instanceDir and dataDir for each replica. It will only remove shards that are inactive, or which have no range given for custom sharding.
+To run a DELETE asynchronously then append the `async` parameter:
 
-`/admin/collections?action=DELETESHARD&shard=_shardID_&collection=_name_`
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1?async=aaaa
+----
+====
+--
 
 === DELETESHARD Parameters
 
@@ -298,43 +342,64 @@ Request ID to track this action which will be <<collections-api.adoc#asynchronou
 
 The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.
 
-=== Examples using DELETESHARD
+[[forceleader]]
+== FORCELEADER: Force Shard Leader
 
-*Input*
+In the unlikely event of a shard losing its leader, this command can be invoked to force the election of a new leader.
 
-Delete 'shard1' of the "anotherCollection" collection.
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v1forceleader]
+====
+[.tab-label]*V1 API*
+
+*Input*
 
 [source,text]
 ----
-http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=anotherCollection&shard=shard1&wt=xml
+http://localhost:8983/solr/admin/collections?action=FORCELEADER&collection=techproducts&shard=shard1
 ----
 
 *Output*
 
-[source,xml]
+[source,json]
 ----
-<response>
-  <lst name="responseHeader">
-    <int name="status">0</int>
-    <int name="QTime">558</int>
-  </lst>
-  <lst name="success">
-    <lst name="10.0.1.4:8983_solr">
-      <lst name="responseHeader">
-        <int name="status">0</int>
-        <int name="QTime">27</int>
-      </lst>
-    </lst>
-  </lst>
-</response>
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 78
+  }
+}
 ----
+====
 
-[[forceleader]]
-== FORCELEADER: Force Shard Leader
+[example.tab-pane#v2forceleader]
+====
+[.tab-label]*V2 API*
+*Input*
 
-In the unlikely event of a shard losing its leader, this command can be invoked to force the election of a new leader.
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/techproducts/shards/shard1 -H 'Content-Type: application/json' -d'
+  {
+    "force-leader":{}
+  }
+'
+----
+*Output*
 
-`/admin/collections?action=FORCELEADER&collection=<collectionName>&shard=<shardName>`
+[source,json]
+----
+{
+  "responseHeader": {
+    "status": 0,
+    "QTime": 125
+  }
+}
+----
+====
+--
 
 === FORCELEADER Parameters