Reference For: developers

gRPC: inventory

Services, methods, messages and enums of inventory.proto.

Inventory read/write/watch.

InventoryService

Reads, writes and watches the objects of the inventory.

MethodRequestResponseDescription
GetObjectGetObjectRequestObject

One object by id.

ListObjectsListObjectsRequestListObjectsResponse

Objects of one kind, optionally under a parent, paginated by id.

GetChildrenGetChildrenRequestListObjectsResponse

Direct children of an object, any kind.

WatchChangesWatchChangesRequeststream WatchItem

Change feed after a version. Yields retained history first, then live changes. A Resync item means the client must re-read and resume from the given version.

CreateObjectCreateObjectRequestObject

Creates an object of kind under parent with a JSON body.

UpdateObjectUpdateObjectRequestObject

Replaces an object's body (compare-and-set on expected_version).

DeleteObjectDeleteObjectRequestEmpty

Deletes an object.

Messages

GetObjectRequest

Reads one object.

FieldNumberTypeDescription
id1string

Id of the object.

consistency2Consistency

Read consistency.

ListObjectsRequest

Lists objects of one kind.

FieldNumberTypeDescription
kind1string

Object kind to list.

parent2string

Only the objects under this parent; empty for all.

name_prefix3string

Only the objects whose name starts with this text.

changed_after4uint64

Only the objects changed after this store version; 0 for all.

page5PageRequest

Paging.

consistency6Consistency

Read consistency.

ListObjectsResponse

A page of objects.

FieldNumberTypeDescription
items1repeated Object

The objects of the page.

page2PageInfo

Store version and cursor of the next page.

GetChildrenRequest

Reads the direct children of an object.

FieldNumberTypeDescription
id1string

Id of the parent.

consistency2Consistency

Read consistency.

WatchChangesRequest

Starts the change feed.

FieldNumberTypeDescription
since1uint64

Store version to continue after; 0 starts at the oldest retained change.

kinds2repeated string

Only these kinds (empty = all).

Change

One change of one object.

FieldNumberTypeDescription
kind1ChangeKind

Created, updated or deleted.

object2Object

The object after the change (its last state for a deletion).

ChangeSet

The changes of one store version.

FieldNumberTypeDescription
version1uint64

Store version of the changes.

at2string

Time of the change, RFC 3339.

actor3string

User or service that made the change.

changes4repeated Change

The changed objects.

Resync

The feed lost history: read the objects again and resume after version.

FieldNumberTypeDescription
version1uint64

Store version to resume after.

WatchItem

One item of the change feed: a change set or a resync.

FieldNumberTypeDescription
changes1ChangeSet

Changes of one store version.

resync2Resync

The client must read again.

CreateObjectRequest

Creates an object.

FieldNumberTypeDescription
kind1string

Object kind to create.

parent2string

Id of the parent.

data_json3string

Body of the object as JSON.

idempotency_key4string

Key that makes a retried request create the object once.

UpdateObjectRequest

Replaces the body of an object.

FieldNumberTypeDescription
id1string

Id of the object.

expected_version2uint64

Version the change is based on; a newer version refuses it with CONFLICT.

data_json3string

New body as JSON.

DeleteObjectRequest

Deletes an object.

FieldNumberTypeDescription
id1string

Id of the object.

expected_version2uint64

Version the deletion is based on; 0 deletes any version.

cascade3bool

Also delete the objects under it.

Enums

Consistency

Read consistency: linearizable through the leader, or the local copy of the controller that answers.

ValueNumberDescription
CONSISTENCY_LINEARIZABLE0
CONSISTENCY_LOCAL1

ChangeKind

What a change did to an object.

ValueNumberDescription
CHANGE_KIND_CREATED0
CHANGE_KIND_UPDATED1
CHANGE_KIND_DELETED2

Version 0.1.