Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dedicated simulation API for simulating a template without an index #56390

Closed
dakrone opened this issue May 7, 2020 · 1 comment · Fixed by #56842
Closed

Add dedicated simulation API for simulating a template without an index #56390

dakrone opened this issue May 7, 2020 · 1 comment · Fixed by #56842
Assignees
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement Team:Data Management Meta label for data/management team

Comments

@dakrone
Copy link
Member

dakrone commented May 7, 2020

Relates to #53101

We currently have an /_index_template/_simulate_index/{index} API that allows simulating (with our without a body) the resolved body for a given index. We should add a similar API for simulating only a template without an index, something like:

POST /_index_template/_simulate/{template-id}

Where the template-id is optional, and if not specified, then the body must be present with a valid template definition.

Relates to #56295

@dakrone dakrone added >enhancement :Data Management/Indices APIs APIs to create and manage indices and templates labels May 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 7, 2020
@dakrone dakrone self-assigned this May 12, 2020
dakrone added a commit to dakrone/elasticsearch that referenced this issue May 15, 2020
This adds an API for simulating template composition with or without an index template.

It looks like:

```
POST /_index_template/_simulate/my-template
```

To simulate a template named `my-template` that already exists, or, to simulate a template that does
not already exist:

```
POST /_index_template/_simulate
{
  "index_patterns": ["my-index"]
  "composed_of": ["ct1", "ct2"],
}
```

This is related to elastic#55686, which adds an API to simulate composition based on an index name (hence
the `_simulate_index` vs `_simulate`).

This commit also adds reference documentation for both simulation APIs.

Relates to elastic#53101
Resolves elastic#56390
Resolves elastic#56255
dakrone added a commit that referenced this issue May 18, 2020
This adds an API for simulating template composition with or without an index template.

It looks like:

```
POST /_index_template/_simulate/my-template
```

To simulate a template named `my-template` that already exists, or, to simulate a template that does
not already exist:

```
POST /_index_template/_simulate
{
  "index_patterns": ["my-index"]
  "composed_of": ["ct1", "ct2"],
}
```

This is related to #55686, which adds an API to simulate composition based on an index name (hence
the `_simulate_index` vs `_simulate`).

This commit also adds reference documentation for both simulation APIs.

Relates to #53101
Resolves #56390
Resolves #56255
dakrone added a commit to dakrone/elasticsearch that referenced this issue May 18, 2020
…tic#56842)

This adds an API for simulating template composition with or without an index template.

It looks like:

```
POST /_index_template/_simulate/my-template
```

To simulate a template named `my-template` that already exists, or, to simulate a template that does
not already exist:

```
POST /_index_template/_simulate
{
  "index_patterns": ["my-index"]
  "composed_of": ["ct1", "ct2"],
}
```

This is related to elastic#55686, which adds an API to simulate composition based on an index name (hence
the `_simulate_index` vs `_simulate`).

This commit also adds reference documentation for both simulation APIs.

Relates to elastic#53101
Resolves elastic#56390
Resolves elastic#56255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants