# Events_ListActivityFacets_Workspace

`GET /v1/accounts/{account}/workspaces/{workspace}/events:activityFacets`

Lists the values the TEAM_ACTIVITY list holds for a filter, with counts:
the suggestions a search box offers under each key.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header

## Parameters

- `account` (path, string, required): The account id.
- `workspace` (path, string, required): The workspace id.
- `filter` (query, string): A ListEvents TEAM_ACTIVITY filter. The whole filter applies: after
  `verb = EDIT` the verbs are only EDIT.

## Responses

- `200` OK: `application/json` `qualia.v1.ListActivityFacetsResponse`
- `default` Default error response: `application/json` `google.rpc.Status`

## Schemas

```yaml
qualia.v1.ListActivityFacetsResponse:
  type: object
  properties:
    verbs:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: Verb names (ActivitySummary.Verb).
    actors:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: Summary actor kinds (ActivityActor.Kind).
    people:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: People (`actor.user` ids) who acted without a key.
    keys:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: Keys (`actor.api_key` ids).
    subjectTypes:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: Subject types (`dataset`, `episode`, `task`, ...).
    workspaces:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.ActivityFacet"
      description: |-
        Workspace ids; set for an organization only. The organization's own
        actions have none.
    truncated:
      type: boolean
      description: True when more actions matched than the counts cover.
    scanned:
      type: integer
      description: "How many actions the counts cover: the newest ones, at most 5000."
      format: int32
  description: |-
    The values the newest eligible actions hold, each with how many of them
    hold it, most first. Ids only: names come from ReadActivityActors (by
    `sample_event`) and from the workspaces the caller reads.
qualia.v1.ActivityFacet:
  type: object
  properties:
    value:
      type: string
      description: The value, as the filter takes it.
    count:
      type: string
      description: Actions holding it.
    sampleEvent:
      type: string
      description: |-
        The newest of those actions, for people and keys: pass it to
        ReadActivityActors for the name. Empty otherwise.
  description: One value of a facet.
google.rpc.Status:
  oneOf:
    - $ref: "#/components/schemas/ApiError"
    - $ref: "#/components/schemas/GatewayError"
  description: "The body of a failed call: one of the two shapes below."
ApiError:
  title: API error
  type: object
  required:
    - code
    - message
    - retryable
    - details
  properties:
    code:
      type: string
      description: The gRPC code name in upper case, e.g. `NOT_FOUND`.
    message:
      type: string
    retryable:
      type: boolean
      description: Whether the same call may succeed if retried.
    details:
      type: array
      items:
        type: object
      description: "Empty, except when a dataset copy or move is refused: then one `google.rpc.ErrorInfo` with the refusal's `reason` code, its `domain` and, in `metadata`, the datasets it names."
  description: A refusal from the API itself.
GatewayError:
  title: Gateway error
  type: object
  required:
    - detail
  properties:
    detail:
      type: string
      description: What went wrong.
  description: A refusal from the gateway before the call reaches the API, for example `401` bad or missing API key, `403` key lacks the scope or environment closed, `413` body too large.
```
