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

Adds get all REST API to data views #131683

Merged
merged 12 commits into from
Jun 2, 2022

Conversation

lukasolson
Copy link
Member

@lukasolson lukasolson commented May 5, 2022

Summary

Closes #99928.

Adds a "get all" REST API for data views.

Example usage

Request:

GET /api/data_views

Response:

{
    "data_view": [
        {
            "id": "90943e30-9a47-11e8-b64d-95841ca0b247",
            "namespaces": [
                "default"
            ],
            "title": "kibana_sample_data_logs"
        },
        {
            "id": "ff959d40-b880-11e8-a6d9-e546fe2bba5f",
            "namespaces": [
                "default"
            ],
            "title": "kibana_sample_data_ecommerce",
            "typeMeta": {}
        },
        {
            "id": "d3d7af60-4c81-11e8-b3d7-01146121b73d",
            "namespaces": [
                "default"
            ],
            "title": "kibana_sample_data_flights"
        }
    ]
}

Checklist

Release note

Adds a "get all" REST API for data views: GET /api/data_views

@lukasolson lukasolson added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppServicesSv labels May 5, 2022
@lukasolson lukasolson self-assigned this May 5, 2022
@lukasolson lukasolson changed the title Adds get all API to data views Adds get all REST API to data views May 5, 2022
@lukasolson lukasolson marked this pull request as ready for review May 10, 2022 20:48
@lukasolson lukasolson requested a review from a team as a code owner May 10, 2022 20:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesSv)

@lukasolson lukasolson requested a review from mattkime May 10, 2022 20:48
Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good but it would be good to add an api integration test. This is a good example - test/api_integration/apis/index_patterns/index_pattern_crud/get_index_pattern

@lukasolson lukasolson requested a review from mattkime May 25, 2022 14:46
"namespaces": [
"default"
],
"title": "tmp*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also return the type if not default. add "type": "rollup" to make this a rollup data view example

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment about docs, otherwise good to go

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @lukasolson

@lukasolson lukasolson merged commit e921693 into elastic:main Jun 2, 2022
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 6, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

5 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 131683 locally

@lukasolson lukasolson added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 14, 2022
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
9.0 The branch "9.0" does not exist

Manual backport

To create the backport manually run:

node scripts/backport --pr 131683

Questions ?

Please refer to the Backport tool documentation

@lukasolson lukasolson removed the v9.0.0 label Jun 14, 2022
@kibanamachine kibanamachine added backport:skip This commit does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Jun 14, 2022
@lukasolson lukasolson removed the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 14, 2022
@rashmivkulkarni
Copy link
Contributor

Just a suggestion : It would be nice have append it with kbn:
GET kbn:/api/data_views

works perfect though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Data Views Data Views code and UI - index patterns before 8.0 release_note:enhancement v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index Patterns REST API for getting list of all patterns
6 participants