IRPCViews.GetViewsOrDelta
Vault API / standard read session or assertion idempotent returns metadata structure version
Gets the calling user's whole view collection, or only the changes since a version the caller already has.
| Service | Views MFiles.IRPCViews |
|---|---|
| gRPC method | /MFiles.IRPCViews/GetViewsOrDelta |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-views-or-delta |
| Request | GetViewsOrDeltaRequest |
| Response | GetViewsOrDeltaResponse |
| Book and level | Vault API, standard |
| 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) |
Remarks
- Requires a vault session. No special vault rights are needed.
- First call with
callers_current_views_version0:views_or_delta.typeis false (a full list) andcurrent_views_version_on_serveris the version to store. - Later, send the stored version back:
- nothing changed: the same version comes back with
typetrue and empty lists; - something changed:
typetrue;viewshas the added and changed views,removed_viewsthe IDs of deleted views, andinvisible_viewsthe IDs of views the user can no longer see. Then store the new version.
- nothing changed: the same version comes back with
- A version newer than the server's (for example from another vault) returns the full list and the server's current version.
- Hiding or showing a view with SetViewVisibility also produces a change.
- When a deleted view had child views, only the parent's ID appears in
removed_views; remove its descendants from your copy too.
Request: GetViewsOrDeltaRequest
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 |
|---|---|---|
callers_current_views_version | int64 | The current_views_version_on_server from the caller's previous response, or 0 to get the full collection. |
Response: GetViewsOrDeltaResponse
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 |
|---|---|---|
current_views_version_on_server | int64 | The version of the view collection now. Store it and send it next time. |
views_or_delta | ViewsOrDeltaEx | The full collection (type false) or the changes (type true). See ViewsOrDeltaEx. |
views_or_delta.type | bool | True if this struct represents a delta (i.e. just the occurred changes to views). |
views_or_delta.removed_views[] | repeated int32 | Removed views. This contains data only when this struct represents a delta. Otherwise it must be an empty array. |
views_or_delta.invisible_views[] | repeated int32 | Invisible views. This contains data only when this struct represents a delta. Otherwise it must be an empty array. |
views_or_delta.views[] | repeated View | Views. This contains inserted or updated views if this struct represents a delta, otherwise it contains just a "normal" array of views. |
views_or_delta.views[].id | int32 | The ID of the view. |
views_or_delta.views[].type | ViewType | The type of the view.Values: VIEW_TYPE_SHOW_OBJECTS (0), VIEW_TYPE_FILTER_ONLY (1). |
views_or_delta.views[].name | string | The name of the view. |
views_or_delta.views[].is_common | bool | Tells if the view is admin-defined (common) or user-defined. |
views_or_delta.views[].is_visible | bool | Tells if the view is visible. |
views_or_delta.views[].location | ViewLocation | The location of the view. Valid only if bHasParent is true. |
views_or_delta.views[].content_definition | SearchDef | The search definition that contains the view levels and search conditions of the view. |
views_or_delta.views[].acl | AccessControlList | Permissions. |
views_or_delta.views[].flags_obsolete | uint32 | Bit flags that provide additional information on the view. |
views_or_delta.views[].options | VIEWFLAGS | Bit flags that provide additional information on the view. |
views_or_delta.views[].guid | string | GUID for the view. |
views_or_delta.views[].view_visualization | ViewVisualization | View visualization information. |
Related methods
- SetViewVisibility -- Shows or hides a view in the calling user's view collection.
- GetViews -- Gets the calling user's view collection: all views, or the direct child views of one view.