# IRPCObjectOperations.GetAutomaticMetadata

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) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

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

Badges: `Vault API / core` `read` `session or assertion` `idempotent` `returns metadata structure version`

Gets automatic metadata from the vault's metadata providers, for an object about to be created
(from its uploaded files) or for an existing object version.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/GetAutomaticMetadata`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-automatic-metadata`
- **Request:** [`GetAutomaticMetadataRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetAutomaticMetadata/index.md#request)
- **Response:** [`GetAutomaticMetadataResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetAutomaticMetadata/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:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Request: GetAutomaticMetadataRequest

> 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 |
|---|---|---|
| `request` | [`AutomaticMetadataRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AutomaticMetadataRequest/index.md) | The automatic metadata extraction request. |
| `request.upload_ids[]` | repeated `int32` | The upload session IDs associated with the metadata request. If the metadata request is pointed for existing object, the existing files are used instead. |
| `request.object_type_id` | `int32` | The object type of object that is about to be created. |
| `request.obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The object version if the automatic metadata request is pointed for existing object. |
| `request.obj_ver.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `request.obj_ver.version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`. |
| `request.properties[]` | repeated [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | The property values of the object. |
| `request.properties[].property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `request.properties[].value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `request.services[]` | repeated `string` | List of requested metadata providers. Empty if all metadata providers are applied. |
| `request.custom_data` | `string` | The custom data for metadata providers. |
| `request.uploaded_files[]` | repeated [`UploadedFile`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UploadedFile/index.md) | Files of stateless uploads (fileRef, title and extension) used like the upload session IDs. Only uploaded files with a file_ref are accepted. |
| `request.uploaded_files[].upload_id` | `int32` | The upload session ID from UploadTempFile, committed with UploadTempFileCommit. Zero if `file_ref` is set. |
| `request.uploaded_files[].title` | `string` | The title of the file. |
| `request.uploaded_files[].extension` | `string` | File extension, not including the dot (e.g. "doc"). |
| `request.uploaded_files[].size` | `int64` | The logical size of the file in bytes. |
| `request.uploaded_files[].file_ref` | `string` | The `file_ref` of a stateless upload (FileUploadWhole or FileUploadEnd). Empty if `upload_id` is set. Exactly one of `upload_id` and `file_ref` must be set. |

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

## Response: GetAutomaticMetadataResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.

| Field | Type | Description |
|---|---|---|
| `response` | [`AutomaticMetadataResult`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AutomaticMetadataResult/index.md) | Receives the automatic metadata. |
| `response.property_value_suggestions[]` | repeated [`PropertyValueSuggestion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueSuggestion/index.md) | Property value suggestions. |
| `response.property_value_suggestions[].property_definition_id` | `int32` | The property definition ID. |
| `response.property_value_suggestions[].value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The typed value. |
| `response.property_value_suggestions[].display_value` | `string` | Display value for the suggestion. Can be empty. |
| `response.property_value_suggestions[].confidence` | `float` | The projected quality of the suggestion. |
| `response.property_value_suggestions[].is_fact` | `bool` | True if the suggestion is a fact (i.e. known to be valid for sure). |
| `response.property_value_suggestions[].is_new_value_list_item` | `bool` | True if the suggestion depicts a new value for value lists. |
| `response.property_value_suggestions[].new_value_list_item_property_suggestions[]` | repeated [`PropertyValueSuggestion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueSuggestion/index.md) (recursive) | Suggestions that should be used when new object is created with this suggestion. |
| `response.property_value_suggestions[].reason` | `string` | Rationale explaining why the suggestion is being made. Can be empty. |
| `response.property_value_suggestions[].suggested_name` | `string` | Display name of a not-yet-created property (discovery-origin only). Empty otherwise. |
| `response.property_value_suggestions[].suggested_data_type` | `int32` | MFDataType of the suggested new property (discovery-origin only). Zero otherwise. |
| `response.property_value_suggestions[].instruction` | `string` | LLM-authored extraction instruction for a discovery-origin property. Empty otherwise. |
