# BackgroundOperationID

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Background operation ID.

- **Full name:** `MFiles.BackgroundOperationID`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-type"></a>`type` | [`BackgroundOperationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.BackgroundOperationType/index.md) | 1 | Operation type. Values: `BACKGROUND_OPERATION_TYPE_UNKNOWN` (0), `BACKGROUND_OPERATION_TYPE_INDEX_METADATA` (1), `BACKGROUND_OPERATION_TYPE_REFRESH_EXTERNAL_OBJECT_TYPE` (2), `BACKGROUND_OPERATION_TYPE_REFRESH_EXTERNAL_LOCATION` (3), `BACKGROUND_OPERATION_TYPE_PERFORM_OCR_TASK` (4), `BACKGROUND_OPERATION_TYPE_RUN_PERFORMANCE_MEASUREMENTS` (5), `BACKGROUND_OPERATION_TYPE_CLEAN_UP_ACL_DEPENDENCY_SETS` (6). |
| <a id="f-id"></a>`id` | `int32` | 2 | Specifies an ID for the operation (e.g. object type ID). |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCBackgroundOperationsAdmin.GetBackgroundOperationStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetBackgroundOperationStatus/index.md): Gets the run state of a background operation, such as an external object type refresh.
- [IRPCBackgroundOperationsAdmin.StartBackgroundOperation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/StartBackgroundOperation/index.md): Starts a background operation now, such as a full refresh of an external object type from its external database.
- [IRPCBackgroundOperationsAdmin.WaitForBackgroundOperationCompletion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/WaitForBackgroundOperationCompletion/index.md): Waits until a background operation has finished, or stops it.

<a id="used-in-fields"></a>

## Used in fields

- [`GetBackgroundOperationStatusRequest.background_operation_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetBackgroundOperationStatus/index.md#request): The operation: `type`, and `id` (the object type ID or the external location ID for the refresh types).
- [`StartBackgroundOperationRequest.background_operation_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/StartBackgroundOperation/index.md#request): The operation to start.
- [`WaitForBackgroundOperationCompletionRequest.background_operation_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/WaitForBackgroundOperationCompletion/index.md#request): The operation to wait for.
