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

API for Space content summary #182406

Closed
legrego opened this issue May 2, 2024 · 1 comment · Fixed by #182921
Closed

API for Space content summary #182406

legrego opened this issue May 2, 2024 · 1 comment · Fixed by #182921
Assignees
Labels
enhancement New value added to drive a business result Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@legrego
Copy link
Member

legrego commented May 2, 2024

As part of the spaces management redesign, we will be introducing a screen which shows a summary of the different saved objects that exist within each space.

A conceptual mockup:
Larry Gregory 2024-05-02 at 11 50 45

Definition of Done

  1. An internal API exists which returns an alphabetically-sorted summarization of saved objects which exist in the target space.
  2. Sufficient automated tests are in place to verify this functions as intended.
  3. The PR description has sufficient detail to explain the request and response payloads to consumers.

API Requirements

  1. The API shall be internal (e.g. /internal/spaces/{spaceId}/content_summary or similar)
  2. The API shall use the same manageSpaces API Access tag as [Spaces] API endpoint for roles which have access to a given space #181165
  3. The API shall return a count of all exportable, space-aware saved objects, sorted by their display name.
    • You can derive the list of eligible saved object types by querying the SO Type registry. This example shows SO types that are NOT space-aware, so we would negate the second part of this check to find types which ARE space-aware: Example:
      return typeRegistry
      .getImportableAndExportableTypes()
      .filter((type) => typeRegistry.isNamespaceAgnostic(type.name))
    • The Saved Objects Client has a find function which supports type filtering, aggregations, and the ability to search across spaces. My hope is that we can leverage this existing functionality here.
  4. The API response body should include enough information for the UI to render the features in the mockup, including:
    • The Icon to use (see the management.icon property of the SO Type definition.)
    • The display name to use (see the management.displayName property of the SO Type definition. Fall back to a capitalized version of name if displayName is not provided.)
    • The SO type (see the name property of the SO Type definition)
    • The count of objects of each type.
  5. The API shall omit any types with a count of 0.
@legrego legrego added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! enhancement New value added to drive a business result Feature:Security/Spaces Platform Security - Spaces feature labels May 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants