Skip to content

Commit

Permalink
[Spaces] Content summary API (#182921)
Browse files Browse the repository at this point in the history
## Summary

Added space content summary `GET` API endpoint which returns summary of
the different saved objects that exist within each space.

Request `GET kbn:/internal/spaces/a-space/content_summary`
Response
```
{
  "summary": [
    {
      "count": 1,
      "type": "config",
      "displayName": "Config"
    },
    {
      "count": 2,
      "type": "dashboard",
      "displayName": "Dashboard",
      "icon": "dashboardApp"
    },
    {
      "count": 4,
      "type": "index-pattern",
      "displayName": "data view",
      "icon": "indexPatternApp"
    },
    {
      "count": 2,
      "type": "tag",
      "displayName": "Tag",
      "icon": "tag"
    }
  ],
  "total": 9
}
```

Request `GET kbn:/internal/spaces/not-a-space/content_summary`
Response
```
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Not Found"
}
```


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed.
[Report](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5903)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

__Fixes: https://github.com/elastic/kibana/issues/182406__
  • Loading branch information
elena-shostak authored May 13, 2024
1 parent e61faa6 commit a48646c
Show file tree
Hide file tree
Showing 5 changed files with 679 additions and 0 deletions.
Loading

0 comments on commit a48646c

Please sign in to comment.