Skip to content

Instantly share code, notes, and snippets.

@jmbeach
Created October 23, 2018 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmbeach/fcaa3a7f2af54a480e1f3cfcb8cb7b6f to your computer and use it in GitHub Desktop.
Save jmbeach/fcaa3a7f2af54a480e1f3cfcb8cb7b6f to your computer and use it in GitHub Desktop.
postman collections
{
"info": {
"_postman_id": "efedac39-32af-46b6-bc42-af51a7dbded9",
"name": "docker",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "docker",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://10.0.30.201:2375/v1.37/version",
"protocol": "http",
"host": [
"10",
"0",
"30",
"201"
],
"port": "2375",
"path": [
"v1.37",
"version"
]
}
},
"response": []
}
]
}
{
"info": {
"_postman_id": "d9d4a88b-d0a8-4f13-b30d-db78e2035856",
"name": "Elasticsearch Management",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Cat",
"item": [
{
"name": "All",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cat",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cat"
]
}
},
"response": []
}
]
},
{
"name": "Cluster",
"item": [
{
"name": "Disk Allocation",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_cat/allocation?v",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_cat",
"allocation"
],
"query": [
{
"key": "v",
"value": null
}
]
}
},
"response": []
},
{
"name": "Cluster Health",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cluster/health",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cluster",
"health"
]
}
},
"response": []
},
{
"name": "Cluster Stats",
"event": [
{
"listen": "test",
"script": {
"id": "ed2e1edb-9318-4bab-a220-a1dbc315833b",
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Green Status\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.status).to.eql('green');",
" pm.expect(jsonData._nodes.failed).to.eql(0);",
"});",
"",
"pm.test(\"No failed nodes\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData._nodes.failed).to.eql(0);",
"});",
""
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cluster/stats",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cluster",
"stats"
]
}
},
"response": []
},
{
"name": "Allocation Explain",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cluster/allocation/explain",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cluster",
"allocation",
"explain"
]
}
},
"response": []
},
{
"name": "View nodes",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cat/nodes?v",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cat",
"nodes"
],
"query": [
{
"key": "v",
"value": null
}
]
}
},
"response": []
},
{
"name": "Reroute",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_cluster/reroute?retry_failed=true",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_cluster",
"reroute"
],
"query": [
{
"key": "retry_failed",
"value": "true"
}
]
}
},
"response": []
},
{
"name": "Node Info ",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_nodes",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_nodes"
]
}
},
"response": []
},
{
"name": "Cluster Settings",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"persistent\" : {},\n \"transient\" : {}\n}"
},
"url": {
"raw": "http://{{url}}/_cluster/settings",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_cluster",
"settings"
]
}
},
"response": []
}
]
},
{
"name": "Tasks",
"item": [
{
"name": "List Tasks",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_tasks?detailed=true&actions=*",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_tasks"
],
"query": [
{
"key": "detailed",
"value": "true"
},
{
"key": "actions",
"value": "*"
}
]
}
},
"response": []
},
{
"name": "Task Status",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_tasks?detailed=true&actions=*",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_tasks"
],
"query": [
{
"key": "detailed",
"value": "true"
},
{
"key": "actions",
"value": "*"
}
]
}
},
"response": []
},
{
"name": "Cancel Task",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_tasks/{{nodeid}}:{{id}}/_cancel",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_tasks",
"{{nodeid}}:{{id}}",
"_cancel"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "85fbbd6e-bfe4-465c-90e8-f66e4fb68427",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "0fec72cb-1386-4ec8-8b37-244a7fc33da8",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Snapshots",
"item": [
{
"name": "Create Repository",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"{{repository-location}}\",\n \"compress\": true\n }\n}\n"
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}"
]
}
},
"response": []
},
{
"name": "Create Snapshot",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}/{{snapshot}}wait_for_completion=true",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}",
"{{snapshot}}wait_for_completion=true"
]
}
},
"response": []
},
{
"name": "View Repository Snapshots",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_snapshot/backup/jared-test",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_snapshot",
"backup",
"jared-test"
]
}
},
"response": []
},
{
"name": "Snapshot Details",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}/{{snapshot}}",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}",
"{{snapshot}}"
]
}
},
"response": []
},
{
"name": "Snapshot Status",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}/{{snapshot}}/_status",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}",
"{{snapshot}}",
"_status"
]
}
},
"response": []
},
{
"name": "Cat snapshots",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_cat/snapshots/backup?v&s=start_epoch:desc",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_cat",
"snapshots",
"backup"
],
"query": [
{
"key": "v",
"value": null
},
{
"key": "s",
"value": "start_epoch:desc"
}
]
}
},
"response": []
},
{
"name": "Snapshot Search",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}/05-07-2018*",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}",
"05-07-2018*"
]
}
},
"response": []
},
{
"name": "Delete Snapshot",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_snapshot/{{repository}}/{{snapshot}}",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_snapshot",
"{{repository}}",
"{{snapshot}}"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "85f67bff-edd4-4bf2-a310-bca66f4aa84d",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "e57644af-7103-432e-b7ea-a066a2adcab0",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Templates",
"item": [
{
"name": "Save Template",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"index_patterns\" : [\"*\"],\n \"order\" : 0,\n \"settings\" : {\n \"number_of_shards\" : 5,\n \"number_of_replicas\" : 3\n },\n \"version\": 1\n}"
},
"url": {
"raw": "http://{{url}}/_template/default",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_template",
"default"
]
}
},
"response": []
},
{
"name": "Template Details",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_template/{{template}}",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_template",
"{{template}}"
]
}
},
"response": []
}
]
},
{
"name": "Indexes",
"item": [
{
"name": "List all indexes",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cat/indices?h=h,s,i,id,p,r,dc,dd,ss,creation.date.string&s=creation.date",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cat",
"indices"
],
"query": [
{
"key": "h",
"value": "h,s,i,id,p,r,dc,dd,ss,creation.date.string"
},
{
"key": "s",
"value": "creation.date"
}
]
}
},
"response": []
},
{
"name": "Delete Index",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/routing",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"routing"
]
}
},
"response": []
},
{
"name": "Reindex/Copy Index",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"source\": {\n \"remote\": {\n \"host\": \"http://{{remote-host}}\",\n \"socket_timeout\": \"5m\",\n \"connect_timeout\": \"2m\"\n },\n \"index\": \"{{index}}\",\n \"query\": {\n \"match_all\": {}\n }\n },\n \"dest\": {\n \"index\": \"{{destination-index}}\"\n }\n}"
},
"url": {
"raw": "http://{{url}}/_reindex",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_reindex"
]
}
},
"response": []
},
{
"name": "Delete All",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/_all",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_all"
]
}
},
"response": []
},
{
"name": "Clear Cache",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/{{index}}/_cache/clear",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_cache",
"clear"
]
}
},
"response": []
},
{
"name": "Index Recovery (all)",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"actions\" : [\n { \"add\" : { \"index\" : \"cdsdev2_customer_5a95aaadd9f37f55839205b757e4458200618c27\", \"alias\" : \"customer\" } }\n ]\n}"
},
"url": {
"raw": "http://{{url}}/_recovery?human",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_recovery"
],
"query": [
{
"key": "human",
"value": null
}
]
}
},
"response": []
},
{
"name": "Index Recovery ",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"actions\" : [\n { \"add\" : { \"index\" : \"cdsdev2_customer_5a95aaadd9f37f55839205b757e4458200618c27\", \"alias\" : \"customer\" } }\n ]\n}"
},
"url": {
"raw": "http://{{url}}/{{index}}/_recovery?human",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_recovery"
],
"query": [
{
"key": "human",
"value": null
}
]
}
},
"response": []
},
{
"name": "Index Shard Store ",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"actions\" : [\n { \"add\" : { \"index\" : \"cdsdev2_customer_5a95aaadd9f37f55839205b757e4458200618c27\", \"alias\" : \"customer\" } }\n ]\n}"
},
"url": {
"raw": "http://{{url}}/{{index}}/_shard_stores",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_shard_stores"
]
}
},
"response": []
},
{
"name": "Index Shard Stores (red)",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"actions\" : [\n { \"add\" : { \"index\" : \"cdsdev2_customer_5a95aaadd9f37f55839205b757e4458200618c27\", \"alias\" : \"customer\" } }\n ]\n}"
},
"url": {
"raw": "http://{{url}}/_shard_stores?status=red",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_shard_stores"
],
"query": [
{
"key": "status",
"value": "red"
}
]
}
},
"response": []
},
{
"name": "Index Refresh",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/{{index}}/_refresh",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_refresh"
]
}
},
"response": []
},
{
"name": "Index Flush",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/{{index}}/_flush",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_flush"
]
}
},
"response": []
},
{
"name": "Update index settings",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"index\" : {\n \"number_of_replicas\" : 1\n }\n}"
},
"url": {
"raw": "http://{{url}}/{{index}}/_settings",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_settings"
]
}
},
"response": []
},
{
"name": "View index settings",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"index\" : {\n \"number_of_replicas\" : 1\n }\n}"
},
"url": {
"raw": "http://{{url}}/{{index}}/_settings",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_settings"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "3b73ac2e-cbb4-46ba-a919-98a522b9d8af",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "cd4d4b5d-066c-4745-8b44-4d4a380c7897",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Alias",
"item": [
{
"name": "Delete Alias",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://{{url}}/{{index}}/_alias/{{alias}}",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"{{index}}",
"_alias",
"{{alias}}"
]
}
},
"response": []
},
{
"name": "Create Alias",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"actions\" : [\n { \"add\" : { \"index\" : \"{{index}}\", \"alias\" : \"{{alias}}\" } }\n ]\n}"
},
"url": {
"raw": "http://{{url}}/_aliases",
"protocol": "http",
"host": [
"{{url}}"
],
"path": [
"_aliases"
]
}
},
"response": []
},
{
"name": "Display all aliases",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{es-host}}:9200/_cat/aliases?v",
"host": [
"{{es-host}}"
],
"port": "9200",
"path": [
"_cat",
"aliases"
],
"query": [
{
"key": "v",
"value": null
}
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "d940a5dc-985d-4b71-87d2-4086e401241c",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "42493cd3-b540-4e58-b66c-1bb89501a7e6",
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment