IRPCObjectOperations.CountObjectVersionsMatchingConditions

View as Markdown

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

Counts the versions of an object that DestroyObjectVersionsByConditions would destroy with the same inputs, without destroying anything.

ServiceObjects, versions, properties and files MFiles.IRPCObjectOperations
gRPC method/MFiles.IRPCObjectOperations/CountObjectVersionsMatchingConditions
HTTP (mf-http-grpc)POST /grpc/v1/count-object-versions-matching-conditions
RequestCountObjectVersionsMatchingConditionsRequest
ResponseCountObjectVersionsMatchingConditionsResponse
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

Uses the same selection and the same rules for kept versions as DestroyObjectVersionsByConditions. Requires the vault-level right to destroy objects.

Request: CountObjectVersionsMatchingConditionsRequest

The request of CountObjectVersionsMatchingConditions. It has the same fields as DestroyObjectVersionsByConditionsRequest.

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

FieldTypeDescription
obj_idObjIDThe object whose versions are counted.
obj_id.typeint32The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
obj_id.item_idItemIDThe ID of the object within its type, in item_id.internal_id.
obj_id.item_id.internal_idint32The ID of the object or value list item.
obj_id.item_id.external_repository_idExternalRepositoryIDUsed only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault.
conditions[]repeated SearchConditionThe conditions a version must match to be destroyed. Must not be empty.
conditions[].expressionExpressionThe left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search).
conditions[].expression.typeExpressionTypeThe kind of expression. Must match the member set in data.Values: EXPRESSION_TYPE_UNINITIALIZED (0), EXPRESSION_TYPE_PROPERTY_VALUE (1), EXPRESSION_TYPE_ID_SEGMENT (2), EXPRESSION_TYPE_STATUS_VALUE (3), EXPRESSION_TYPE_FILE_VALUE (4), EXPRESSION_TYPE_TYPED_VALUE (5), EXPRESSION_TYPE_ANY_FIELD (6), EXPRESSION_TYPE_PERMISSIONS (7).
conditions[].expression.dataExpressionUnionThe expression data. Set the member that matches type.
conditions[].expression.indirection_levels[]repeated IndirectionLevelThe lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself.
conditions[].typeConditionTypeThe comparison operator.
conditions[].valueTypedValueThe right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for STATUS_TYPE_IS_DELETED.
conditions[].value.is_null_valueboolTrue if the value is empty. data is then unset.
conditions[].value.typeDatatypeThe data type of the value.
conditions[].value.dataTypedValueUnionThe value, in the member that matches type. Unset for an empty value.

Response: CountObjectVersionsMatchingConditionsResponse

The response of CountObjectVersionsMatchingConditions: the number of versions that DestroyObjectVersionsByConditions would destroy with the same inputs. Nothing is destroyed.

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

FieldTypeDescription
matching_version_countint32The number of versions that would be destroyed.