Skip to content

Commit 2bdf041

Browse files
committed
Adds graph and ILM API example requests and responses.
1 parent 7b0984c commit 2bdf041

16 files changed

+201
-65
lines changed

package-lock.json

Lines changed: 102 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"@stoplight/spectral-cli": "^6.11.1"
3+
"@stoplight/spectral-cli": "^6.13.0"
44
}
55
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "An initial graph explore query to identify strongly related terms.",
3+
"method_request": "POST clicklogs/_graph/explore",
4+
"description": "",
5+
"type": "request",
6+
"value": "{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when deleting a lifecycle policy.",
3+
"description": "",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"acknowledged\": true\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when retrieving the current ILM status for an index.",
3+
"description": "",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"index\": \"my-index-000001\",\n \"index_creation_date_millis\": 1538475653281,\n \"index_creation_date\": \"2018-10-15T13:45:21.981Z\",\n \"time_since_index_creation\": \"15s\",\n \"managed\": true,\n \"policy\": \"my_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"15s\",\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"complete\"\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\"\n }\n }\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when retrieving a lifecycle policy.",
3+
"description": "",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when retrieving the current ILM status.",
3+
"description": "",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"operation_mode\": \"RUNNING\"\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "Migrates indices, ILM policies, and templates from using custom node attributes to using data tiers.",
3+
"method_request": "POST /_ilm/migrate_to_data_tiers",
4+
"description": "The example migrates the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the custom_attribute_name node attribute, and deletes the legacy template with name global-template if it exists in the system.",
5+
"type": "request",
6+
"value": "{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers.",
3+
"description": "",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"dry_run\": false,\n \"removed_legacy_template\":\"global-template\",\n \"migrated_ilm_policies\":[\"policy_with_allocate_action\"],\n \"migrated_indices\":[\"warm-index-to-migrate-000001\"],\n \"migrated_legacy_templates\":[\"a-legacy-template\"],\n \"migrated_composable_templates\":[\"a-composable-template\"],\n \"migrated_component_templates\":[\"a-component-template\"]\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "Triggers execution of a specific step in a lifecycle policy.",
3+
"method_request": "POST _ilm/move/my-index-000001",
4+
"description": "",
5+
"type": "request",
6+
"value": "{\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}"
7+
}

0 commit comments

Comments
 (0)