Skip to content

Commit 2fd0253

Browse files
Add command reference for CURL also fix headings across the file (#10726)
* Add command reference for CURL also fix headings across the file Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> * Update _migration-assistant/migration-console/migration-console-commands-references.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: Peter Nied <[email protected]> --------- Signed-off-by: Peter Nied <[email protected]> Co-authored-by: kolchfa-aws <[email protected]> (cherry picked from commit b4376f2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1ec9524 commit 2fd0253

File tree

1 file changed

+69
-10
lines changed

1 file changed

+69
-10
lines changed

_migration-assistant/migration-console/migration-console-commands-references.md

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,58 @@ console clusters cat-indices
3636
```
3737
{% include copy.html %}
3838

39+
### Execute HTTP requests against clusters
40+
41+
To run OpenSearch or Elasticsearch APIs directly against the configured source or target cluster, use a `curl`-like interface. Authentication, TLS, and endpoints are obtained from your console configuration.
42+
43+
```sh
44+
console clusters curl <source_cluster|target_cluster> <path> [OPTIONS]
45+
```
46+
{% include copy.html %}
47+
48+
#### Arguments
49+
50+
* `<source_cluster|target_cluster>` — Specify `source_cluster` or `target_cluster` to call.
51+
* `<path>` — The API endpoint to call on the cluster (for example, `/_cat/indices` or `/my-index/_search`).
52+
53+
#### Options
54+
55+
* `--json <JSON_DATA>` — Send a JSON body and automatically set `Content-Type: application/json`.
56+
* `-X, --request <METHOD>` — The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, or `HEAD`). Default is `GET`.
57+
* `-H, --header <HEADER>` — A custom header, for example, `-H 'Accept: application/json'`. You can specify multiple headers, for example, `-H 'Accept: application/json' -H 'Authorization: Bearer TOKEN'`.
58+
* `-d, --data <DATA>` — The raw request body.
59+
60+
#### Examples
61+
62+
*Get cluster health*:
63+
64+
```sh
65+
console clusters curl source_cluster /_cluster/health
66+
```
67+
{% include copy.html %}
68+
69+
*List indexes as JSON*:
70+
71+
```sh
72+
console clusters curl source_cluster "/_cat/indices?format=json&v=true"
73+
```
74+
{% include copy.html %}
75+
76+
*Create an index*:
77+
78+
```sh
79+
console clusters curl target_cluster /my-new-index --json '{"settings":{"number_of_shards":3,"number_of_replicas":1}}'
80+
```
81+
{% include copy.html %}
82+
83+
*Run a query containing a body*:
84+
85+
```sh
86+
console clusters curl source_cluster /_search --json '{"query":{"match_all":{}}}'
87+
```
88+
{% include copy.html %}
89+
90+
3991
### Create a snapshot
4092

4193
Creates a snapshot of the source cluster and stores it in a preconfigured Amazon Simple Storage Service (Amazon S3) bucket.
@@ -45,34 +97,37 @@ console snapshot create
4597
```
4698
{% include copy.html %}
4799

48-
## Check snapshot status
100+
### Check snapshot status
49101

50102
Runs a detailed check on the snapshot creation status, including estimated completion time:
51103

52104
```sh
53105
console snapshot status --deep-check
54106
```
107+
55108
{% include copy.html %}
56109

57-
## Evaluate metadata
110+
### Evaluate metadata
58111

59112
Performs a dry run of metadata migration, showing which indexes, templates, and other objects will be migrated to the target cluster.
60113

61114
```sh
62115
console metadata evaluate
63116
```
117+
64118
{% include copy.html %}
65119

66-
## Migrate metadata
120+
### Migrate metadata
67121

68122
Migrates the metadata from the source cluster to the target cluster.
69123

70124
```sh
71125
console metadata migrate
72126
```
127+
73128
{% include copy.html %}
74129

75-
## Start a backfill
130+
### Start a backfill
76131

77132
If `Reindex-From-Snapshot` (RFS) is enabled, this command starts an instance of the service to begin moving documents to the target cluster:
78133

@@ -84,12 +139,16 @@ console backfill start
84139
```
85140
{% include copy.html %}
86141

87-
## Check backfill status
142+
### Check backfill status
88143

89144
Gets the current status of the backfill migration, including the number of operating instances and the progress of the shards.
90145

146+
```sh
147+
console backfill status
148+
```
149+
{% include copy.html %}
91150

92-
## Start Traffic Replayer
151+
### Start Traffic Replayer
93152

94153
If Traffic Replayer is enabled, this command starts an instance of Traffic Replayer to begin replaying traffic against the target cluster.
95154
The `stop` command stops all active instances.
@@ -99,7 +158,7 @@ console replay start
99158
```
100159
{% include copy.html %}
101160

102-
## Read logs
161+
### Read logs
103162

104163
Reads any logs that exist when running Traffic Replayer. Use tab completion on the path to fill in the available `NODE_IDs` and, if applicable, log file names. The tuple logs roll over at a certain size threshold, so there may be many files named with timestamps. The `jq` command pretty-prints each line of the tuple output before writing it to file.
105164

@@ -108,7 +167,7 @@ console tuples show --in /shared-logs-output/traffic-replayer-default/[NODE_ID]/
108167
```
109168
{% include copy.html %}
110169

111-
## Show version
170+
### Show version
112171

113172
Displays the version of the currently installed Migration Assistant.
114173

@@ -117,11 +176,11 @@ console --version
117176
```
118177
{% include copy.html %}
119178

120-
## Help option
179+
### Help option
121180

122181
All commands and options can be explored within the tool itself by using the `--help` option, either for the entire `console` application or for individual components (for example, `console backfill --help`). For example:
123182

124-
```bash
183+
```sh
125184
$ console --help
126185
Usage: console [OPTIONS] COMMAND [ARGS]...
127186

0 commit comments

Comments
 (0)