# IRPCSearch.GetObjectsCountForNotifications

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Search](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/GetObjectsCountForNotifications/

Badges: `Vault API / core` `read` `session or assertion` `idempotent`

Gets the objects count for notification badge.

- **Service:** [Search](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/index.md) `MFiles.IRPCSearch`
- **gRPC method:** `/MFiles.IRPCSearch/GetObjectsCountForNotifications`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-objects-count-for-notifications`
- **Request:** [`GetObjectsCountForNotificationsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/GetObjectsCountForNotifications/index.md#request)
- **Response:** [`GetObjectsCountForNotificationsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/GetObjectsCountForNotifications/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

Used by the M-Files clients for notification badges: the counts of the caller's "Assigned to Me"
and "Checked Out to Me" views.

<a id="request"></a>

## Request: GetObjectsCountForNotificationsRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `notification_data_request_flags` | [`NOTIFICATIONDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NOTIFICATIONDATAREQUESTFLAGS/index.md) | Notification data request flags. |
| `notification_data_request_flags.all` | `bool` | Specifies all flags set; Including any future flags. |
| `notification_data_request_flags.checked_out_to_me_on_this_computer` | `bool` | To get number of checked out objects from current user and current computer. |
| `notification_data_request_flags.checked_out_to_me` | `bool` | To get number of checked out objects by current user. |
| `notification_data_request_flags.assigned_to_me` | `bool` | To get number of assigned objects to current user. |
| `search_flags` | [`SearchFlags`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchFlags/index.md) | Search flags. Supports 'INCLUDE_UNMANAGED_OBJECTS' flag only. |
| `search_flags.all` | `bool` | All flags set, including any future flags. Do not use in searches. |
| `search_flags.look_in_all_versions` | `bool` | Also match older versions; each object is returned once. Cannot be combined with `sorting`, and `GetObjectCountInSearch` rejects it. |
| `search_flags.return_latest_visible_version` | `bool` | Return the latest visible version for each matching document. |
| `search_flags.separately_search_in_each_object_type` | `bool` | Search each object type separately and merge the results. The `limit` then applies to each object type, and `pages_with_more_results` lists the object types whose results were cut. |
| `search_flags.allow_quick_refresh_for_external_object_types` | `bool` | If a search with an external ID condition on an external object type finds nothing, refresh the object type from its external database and search again. |
| `search_flags.disable_relevancy_ranking` | `bool` | Do not rank the results by relevance. |
| `search_flags.separately_search_specific_object_types` | `bool` | Allows only specified object types to be searched separately. |
| `search_flags.include_unmanaged_objects` | `bool` | Extends the search to include unmanaged objects. |
| `search_flags.individual_limit_for_each_external_repository` | `bool` | Ensures that up to the specified maximum number of results are returned from each repository. |

<a id="response"></a>

## Response: GetObjectsCountForNotificationsResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `assigned_to_me_objects_count` | `uint32` | Objects count from "Assigned to me" view. |
| `checked_out_to_me_objects_count_on_this_computer` | `uint32` | Number of checked out objects by current user from the current computer. |
| `checked_out_to_me_objects_count` | `uint32` | Objects count from "Checkedout to me" view. |
