Difference between revisions of "Elasticsearch curl URLs"

From wikieduonline
Jump to navigation Jump to search
 
(51 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
 +
 +
== Options ==
 +
{{ES URLs TOC}}
 +
 +
 +
 +
 
* Status:  
 
* Status:  
 
::<code>[[curl https://localhost:9200/_nodes/status]]</code>
 
::<code>[[curl https://localhost:9200/_nodes/status]]</code>
::<code>[[curl -k https://localhost:9200/_nodes/status]] -u "your_usename:your_password"</code>
+
::<code>[[curl --insecure https://localhost:9200/_nodes/status -u]] "your_usename:your_password"</code>
 +
 
 +
* <code>[[-k]] or [[--insecure]] https://your_username:your_password@localhost:9200/</code>
 +
[[/_cluster/|Cluster]]:
 +
{{cluster API}}
 +
 
  
  
::<code>[[curl https://localhost:9200/_cat/health]]</code>
+
::<code>[[curl https://localhost:9200/_cluster/health]]</code>
 +
 +
* <code>[[/_cluster/settings]]</code>
 +
 
 +
 
 +
::<code>[[curl http://localhost:9200/_cluster/health/?level=shards]]</code>
 
::<code>curl http://localhost:9200/_cluster/health?pretty</code>
 
::<code>curl http://localhost:9200/_cluster/health?pretty</code>
  
Line 20: Line 38:
  
 
* [[ELK backup and restore|Backup and restore]]
 
* [[ELK backup and restore|Backup and restore]]
::curl -X POST --insecure https://your_elk_ip:YOUR_PASS@localhost:9200/_snapshot/gcs_repo/your_latest_snapshot_name/_restore
+
:<code>curl -X POST --insecure https://your_username:YOUR_PASS@localhost:9200/_snapshot/your_repo/your_latest_snapshot_name/_restore</code>
 +
 
 +
 
 +
 
 +
GET [[/_ilm/]]policy
 +
 
 +
 
 +
 
 +
[[/_xpack/security/role/search_user]]
 +
[[/_xpack/security/user/adminsearch]]
 +
 
 +
GET [[/_search/]]scroll
  
 +
GET [[/_snapshot]]
 +
[[PUT /_snapshot/]]your-repo
 +
POST /_snapshot/your-repo
  
 +
[[/_cat/snapshots/]]
  
 +
Cat
 +
{{cat API}}
  
 +
== Related ==
 +
* <code>[[cURL]]</code>
 +
* <code>[[opensearch-cli curl]]</code>
 +
* [[Elastisearch REST APIs]]
  
 
== See also ==
 
== See also ==
 +
* {{ES URLs}}
 
* {{Elasticsearch}}
 
* {{Elasticsearch}}
  
 
[[Category:ELK]]
 
[[Category:ELK]]
 +
[[Category:Elasticsearch]]

Latest revision as of 18:00, 13 November 2022


Options[edit]



  • Status:
curl https://localhost:9200/_nodes/status
curl --insecure https://localhost:9200/_nodes/status -u "your_usename:your_password"

Cluster:


curl https://localhost:9200/_cluster/health


curl http://localhost:9200/_cluster/health/?level=shards
curl http://localhost:9200/_cluster/health?pretty
curl http://localhost:9200/_aliases
curl https://localhost:9200/_aliases
curl http://localhost:9200/_cat/indices?v
curl https://localhost:9200/_cat/indices?v
curl -XGET --insecure https://localhost:9200/_cat/nodes?v -u 'admin:admin' 
curl -XGET --insecure https://localhost:9200/_cat/plugins?v -u 'admin:admin' 
  • Delete ALL index:
curl -X DELETE 'http://localhost:9200/_all'
curl -X POST --insecure https://your_username:YOUR_PASS@localhost:9200/_snapshot/your_repo/your_latest_snapshot_name/_restore


GET /_ilm/policy


/_xpack/security/role/search_user
/_xpack/security/user/adminsearch
GET /_search/scroll
GET /_snapshot
PUT /_snapshot/your-repo
POST /_snapshot/your-repo
/_cat/snapshots/

Cat

Related[edit]

See also[edit]

  • https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html
  • Advertising: