Skip to main content

class

Every node has an explicit application class within its object type. The nine types are entity, blob, image, video, descriptor, frame, clip, bounding_box and polygon. For example, image:Customers and entity:Customers are different categories.

For nodes, Add commands require class. Find, Update and Delete commands accept with_class. Omitting it searches every class of that object type. A reference restricts the selection further; it does not replace the command’s type or explicit class. if_not_found searches the exact type/class being added.

Names are nonempty strings, matched without case sensitivity. Their original spelling is retained for display. Names beginning with _ are reserved. There are no implicit built-in classes.

Connection selectors​

A connection category has three class names and two endpoint types. class.src and class.dst identify the endpoint classes, and class.connection names the connection between them. target.src and target.dst identify the endpoint object types. For example, the following query counts connections from entity:People to image:Photos through the AppearsIn connection class.

[{"FindConnection": {
"class": {"src": "People", "connection": "AppearsIn", "dst": "Photos"},
"target": {"src": "entity", "dst": "image"},
"results": {"count": true}
}}]

For a query, include only the restrictions you need. For example, {"class":{"src":"People"},"target":{"dst":"image"}} matches connections from the People class to any image class. The same selector goes inside is_connected_to and is_endpoint_of for a traversal. In FindConnection, src and dst at the command root are reference IDs. For each referenced endpoint, apply its class and type filters when selecting the objects that form the reference. Use class and target to filter an endpoint supplied without a reference.

To select only by connection name, FindConnection, UpdateConnection, and DeleteConnection also accept the string with_class; traversal filters accept the string connection_class. Use one class selector per filter. For AddConnection and connect, supply the connection name as a class string. The objects being connected determine the endpoint classes and types. Exact metadata operations such as CreateIndex and CreateAggregate require both endpoint types and all three class names.

_class is included in projected node rows. Projected connections also include _src_type, _src_class, _dst_type and _dst_class. These fields are output only: select categories through command parameters, rather than property constraints, sorting, grouping, expressions or indexes.

Use RenameClass to rename one exact category and RemoveClass to remove an empty category. Renaming preserves object identities and indexes. Removing a category does not reclaim its durable identity allocation.

Ownership is separate from customer connections. Bounding boxes and polygons belong to images; frames and clips belong to videos. Owner links have no properties or public identities and do not appear in GetSchema.