IRPCObjectOperations.AddObjectWithFilesWithPropertyMetadata

View as Markdown

Vault API / core write session or assertion returns metadata structure version

Creates a new object with files, storing metadata about each property value (who or what set it, why, and with what confidence).

ServiceObjects, versions, properties and files MFiles.IRPCObjectOperations
gRPC method/MFiles.IRPCObjectOperations/AddObjectWithFilesWithPropertyMetadata
HTTP (mf-http-grpc)POST /grpc/v1/add-object-with-files-with-property-metadata
RequestAddObjectWithFilesWithPropertyMetadataRequest
ResponseAddObjectWithFilesWithPropertyMetadataResponse
Book and levelVault API, core
Kindwrite
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Behaves like AddObjectWithFiles (the same server implementation), with the same required properties, ACL and file sources. Every value must carry value_metadata with a numeric confidence string: a value without value_metadata, or with an empty confidence, fails with "Type mismatch." Use confidence: "0" or "-1" when there is no confidence to record; zero or less stores no confidence. Metadata whose fields are all empty or zero is not stored. See TypedValueMetadata.

Request: AddObjectWithFilesWithPropertyMetadataRequest

A request structure for the AddObjectWithFilesWithPropertyMetadata RPC call. Identical to AddObjectWithFilesRequest except that properties carry per-value metadata (metametadata), which is stored as OVPV_META rows alongside the object.

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.

FieldTypeDescription
object_type_idint32The object type of the new object.
properties_with_metadata[]repeated PropertyValueWithMetadataProperty values of the new object, each with value_metadata (required, with a numeric confidence).
properties_with_metadata[].property_defint32Property definition ID.
properties_with_metadata[].valueTypedValueWithMetadataThe value of the property.
properties_with_metadata[].value.typeDatatypeData type. Note. Name of the property can't be isNull because name collision with Objective-C reserved name.
properties_with_metadata[].value.is_null_valueboolIs the value unset.
properties_with_metadata[].value.dataTypedValueUnionWithMetadataThe value data as a union, if set.
properties_with_metadata[].value.value_metadataTypedValueMetadataThe metadata about the typed value. If the value is a Lookup or MSLookup, this data will be in that struct.
aclAccessControlListThe permissions of the new object. Unset gives an empty ACL; see AddObjectWithFiles.
acl.checked_out_to_userint32Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
acl.is_fully_authoritativeboolSpecifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
acl.custom_componentAccessControlListComponentAccesses the custom component of this ACL.
acl.custom_component.named_acl_idint32Specifies the named ACL link of this component.
acl.custom_component.has_named_aclboolTrue if the component links to a named ACL (named_acl_id).
acl.custom_component.current_user_idint32Specifies the current user binding of this component.
acl.custom_component.has_current_userboolTrue if the component has an access control entry for the current user.
acl.custom_component.permissions[]repeated AccessControlEntryThe access control entry datas. The data belongs to the key in the corresponding index.
acl.custom_component.overridability_permissions[]repeated AccessControlEntryOverridability permission data of this ACL component.
acl.custom_component.statusACCESSCONTROLLISTCOMPONENTSTATUSFLAGSModification status of this component.
acl.restrictive_components[]repeated AccessControlListComponentMapEntryAccesses the restrictive automatic components of this ACL.
acl.restrictive_components[].keyAccessControlListComponentKeyAccess control list component.
acl.restrictive_components[].componentAccessControlListComponentAccess control list component.
acl.secondary_access_control_listAccessControlList (recursive)Secondary ACL used for latest version ACL. Not used for access check if null.
acl.additive_components[]repeated AccessControlListComponentMapEntryAccesses the additive automatic components of this ACL.
acl.additive_components[].keyAccessControlListComponentKeyAccess control list component.
acl.additive_components[].componentAccessControlListComponentAccess control list component.
optionsOBJECTOPFLAGSFlags that control this operation.
options.allboolSpecifies all flags set; Including any future flags.
options.require_read_access_after_operationboolRequires read access to the object after the object operation. If available, the operation fails if the user does not have read access to the object after the operation.
options.require_edit_access_after_operationboolRequires edit access to the object after the object operation. If available, the operation fails if the user does not have edit access to the object after the operation.
options.disallow_name_changeboolIf specified, the operation will fail if it causes a change in the object version's name.
options.require_change_permissions_access_after_operationboolRequires security change access to the object after the object operation. If available, the operation fails if the user does not have security change access to the object after the operation.
options.require_full_access_after_operationboolRequires full access to the object after the object operation. If available, the operation fails if the user does not have full access to the object after the operation.
options.change_acl_in_all_versionsboolChanges the ACL of all versions of the object. This is currently used to request setting the ACL of all versions of an object, not just a specific version, when calling ChangeSecurity.
options.verify_check_in_wopi_locked_documentboolVerify the document is locked for WOPI Co-authoring or editing during checkin.
check_inboolIf true, the object is checked in immediately, otherwise the object is left checked out.
filesObjFileSourceFile source.
files.typeObjFileSourceTypeWhich member of data is used. Must match the member that is set.Values: OBJ_FILE_SOURCE_TYPE_UNDEFINED (0), OBJ_FILE_SOURCE_TYPE_BLANK_TEMPLATE (1), OBJ_FILE_SOURCE_TYPE_USER_DEFINED_TEMPLATE (2), OBJ_FILE_SOURCE_TYPE_UPLOADED_FILE (3), OBJ_FILE_SOURCE_TYPE_UPLOADED_FILES (4), OBJ_FILE_SOURCE_TYPE_EMPTY_FILES (5), OBJ_FILE_SOURCE_TYPE_FILE_CONTENT (6).
files.dataObjFileSourceUnionThe source data; set the member that matches type.
files.data.blank_templateObjFileSourceUnion.BlankTemplateData (oneof data)Blank template object file source.
files.data.user_defined_templateObjFileSourceUnion.UserDefinedTemplateData (oneof data)User defined template object file source.
files.data.uploaded_fileObjFileSourceUnion.UploadedFileData (oneof data)Uploaded object file source.
files.data.uploaded_filesObjFileSourceUnion.UploadedFilesData (oneof data)Uploaded object file source with multiple files.
files.data.empty_filesObjFileSourceUnion.EmptyFilesData (oneof data)Empty object file source (one or more files). Only the title and extension of each file are known; there is no upload id or size because the file contents have not been uploaded yet. This type may only be used when the object is created as a draft (the draft flag must be set); otherwise the request is rejected.
files.data.file_contentObjFileSourceUnion.FileContentData (oneof data)Inline file content object file source.
draftboolIf true, the object is created checked out and flagged as a draft, allowing its file content to be uploaded later. Default false.

Response: AddObjectWithFilesWithPropertyMetadataResponse

A response structure for the AddObjectWithFilesWithPropertyMetadata RPC call. Same shape as AddObjectWithFilesResponse.

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.

FieldTypeDescription
is_visible_to_userboolTrue if the latest version of the object is visible after the operation.
created_objectObjectVersionExWPIf set (i.e. isVisibleToUser is true), the information, properties, and ACL of the latest version of the object after the operation.
created_object.object_versionObjectVersionExObject info.
created_object.object_version.version_infoObjectVersionObject Version information.
created_object.object_version.object_infoObjectLevelInfoObject-level information.
created_object.properties[]repeated PropertyValueProperty values, or an empty array.
created_object.properties[].property_defint32The property definition ID, for example 0 for "Name or title" or 100 for "Class".
created_object.properties[].valueTypedValueThe value. Its type must match the data type of the property definition.
created_object.aclAccessControlListIf set, ACL.
created_object.acl.checked_out_to_userint32Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
created_object.acl.is_fully_authoritativeboolSpecifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
created_object.acl.custom_componentAccessControlListComponentAccesses the custom component of this ACL.
created_object.acl.restrictive_components[]repeated AccessControlListComponentMapEntryAccesses the restrictive automatic components of this ACL.
created_object.acl.secondary_access_control_listAccessControlList (recursive)Secondary ACL used for latest version ACL. Not used for access check if null.
created_object.acl.additive_components[]repeated AccessControlListComponentMapEntryAccesses the additive automatic components of this ACL.
created_object.current_user_permissionsObjectPermissionsForClientIf set, permissions of the object version.
created_object.current_user_permissions.can_user_seeboolThe object is visible for the current user (provided for symmetry).
created_object.current_user_permissions.can_user_editboolThe current user can edit the object.
created_object.current_user_permissions.can_user_deleteboolThe current user can delete the object.
created_object.current_user_permissions.can_user_change_permissionsboolThe current user can change the object permissions.
updated_objects[]repeated ObjectVersionExInformation about objects that were also updated during the operation.
updated_objects[].version_infoObjectVersionObject Version information.
updated_objects[].version_info.versionObjVerVersionThe version number, as a specific version.
updated_objects[].version_info.display_versionstringThe version label to show, if it differs from the version number; empty otherwise.
updated_objects[].version_info.titlestringThe title (name) of the object in this version.
updated_objects[].version_info.is_single_file_objectboolTrue if the object is a single-file document, which has exactly one file.
updated_objects[].version_info.has_relationships_from_thisboolNote: this field is deprecated. True if relationships from this object version to one or more documents exist.
updated_objects[].version_info.has_relationships_to_thisboolNote: this field is deprecated. True if relationships from one or more documents to this object version exist.
updated_objects[].version_info.has_assignmentsboolTrue if relationships from one or more assignments to this object version exist.
updated_objects[].version_info.last_modified_at_utcgoogle.protobuf.TimestampWhen the version was last modified, in UTC.
updated_objects[].version_info.files[]repeated FileThe files of this version. Each file_ver can be passed to DownloadFile_Begin.
updated_objects[].version_info.object_version_flagsOBJVERFLAGSBit flags that provide additional information on the object version.
updated_objects[].version_info.class_idint32The class ID of the version.
updated_objects[].version_info.version_guidstringThe GUID of this version.
updated_objects[].version_info.base_properties[]repeated PropertyValueNot filled by the object read methods; read the property values with GetObjectVersionAndPropertiesOfMultipleObjects or GetProperties.
updated_objects[].version_info.primary_fileFileIDFile ID of the primary file of a multi-file object, if the object is a multi-file object.
updated_objects[].object_infoObjectLevelInfoObject-level information.
updated_objects[].object_info.obj_idObjIDThe object type and ID of the object.
updated_objects[].object_info.external_id_statusExtIDStatusThe status of this object's external ID.Values: EXT_IDSTATUS_UNKNOWN (0), EXT_IDSTATUS_EXTERNAL (1), EXT_IDSTATUS_INTERNAL (2), EXT_IDSTATUS_DISCARDED (3), EXT_IDSTATUS_NOT_AVAILABLE (4), EXT_IDSTATUS_EXTERNAL_REDUCED (5).
updated_objects[].object_info.external_idstringThe external ID (display ID) of this object. unset means that the external ID is the same as the internal ID.
updated_objects[].object_info.checked_out_versionObjVerVersionThe version that is checked out. Version number 0 if the object is not checked out.
updated_objects[].object_info.checked_out_to_user_idint32The ID of the user who has the object checked out.
updated_objects[].object_info.checked_out_to_user_namestringThe user name of the user who has the object checked out.
updated_objects[].object_info.checked_out_to_host_namestringThe host name of the computer to which the object was checked out.
updated_objects[].object_info.checked_out_at_utcgoogle.protobuf.TimestampThe timestamp of the moment the object was checked out.
updated_objects[].object_info.checked_in_versionObjVerVersionThe latest checked-in version.
updated_objects[].object_info.created_at_utcgoogle.protobuf.TimestampThe time when the object was created (same as the PROPERTYDEF_CREATED propertyvalue).
updated_objects[].object_info.accessed_by_me_utcgoogle.protobuf.TimestampAccessed by me timestamp. Parallel operations may cause slight inconsistencies in the returned timestamp in rare cases and the precise value shouldn't be relied upon. The observed timestamp may even roll back.
updated_objects[].object_info.guidstringThe object GUID, in braces. The same value as GetObjectGUID returns.
updated_objects[].object_info.optionsITEMFLAGSBit flags that provide additional information on the object (e.g. is the object deleted or a stub).
updated_objects[].object_info.original_vault_guidstringThe GUID of the vault in which the object was originally created.
updated_objects[].object_info.original_vault_obj_idObjIDThe original objid in the vault in which the object was originally created.
updated_objects[].object_info.associated_view_idItemIDIdentifies the view associated with this object if any.
updated_objects[].object_info.external_repository_icon_idstringIf not null, identifies the icon of the object. Currently applicable only to unmanaged objects.
updated_objects[].object_info.primary_view_idItemIDIf not null, identifies the primary view of the object that is also the default opening location of the object. Currently applicable only to unmanaged objects.
updated_objects[].object_info.capabilitiesOBJECTCAPABILITYFLAGSBit flags that provide information on the object capabilities.