get_objects#
- geodesic.entanglement.object.get_objects(*, search=None, version_datetime=None, object_class=None, domain=None, category=None, type=None, xid=None, geometry=None, spatial_predicate='intersects', distance=0.0, project=None, projects=None, deleted=False, limit=500, page_size=500, as_graph=False)[source]#
Search for objects in Entanglement.
Search for objects in Entanglement. There are a few ways of requesting/filtering them. A blank query will return the first 500 nodes for a project (in order of creation).
- Parameters:
search (str | None) – a search string with which to query object names and descriptions. Anything that matches this query will be returned in the specified project.
version_datetime (str | datetime | None) – search for versions of nodes that were valid at this datetime. Defaults to None which will only search for latest nodes.
object_class (str | None) – filters the search by object class (e.g. observable, dataset, entity, etc)
domain (str | None) – filters the search by domain
category (str | None) – filters the search by category
type (str | None) – filters the search by object type
geometry (BaseGeometry | None) – is a spatial filter is designed, this can be any shapely geometry, GeoJSON as dict, or other object with a __geo_interface__ attribute. Geometries must be in WGS84 lon/lat.
spatial_predicate (str) – A spatial predicate for the filter, either ‘contains’, ‘within’, ‘intersects’, or ‘near’
distance (float) – If the predicate is ‘near’, a distance, in meters, to query from the point.
project (str | Project | None) – a Project or project name/alias to get objects for. A query can only be for a single project. If you want objects for multiple projects, break up into separate queries. Will be removed in v1.0.0. Use projects instead.
projects (List[str | Project] | None) – a list of Project or project names to get objects for. This will return objects from multiple projects. If this is an empty list [] , will return objects from all projects the user has access to. If None (default), will return objects from the active project.
deleted (bool) – If True, will return deleted objects. This is useful to find soft deleted objects to recover or hard delete. Calling save() on the object will undelete it.
limit (int) – The max number of objects to return (500 by default). Set to None to return everything matching a query (USE WITH CAUTION, GRAPHS CAN CONTAIN MANY NODES)
page_size (int) – The number of results per request. This shouldn’t need to be changed unless you’re running into issues.
as_graph (bool) – If True, will return as a Graph object instead of a list.
- Returns:
Either a Graph or list of objects matching the query.
- Return type: