diff --git a/src/netconf_access.cpp b/src/netconf_access.cpp
index 7387231..91b1874 100644
--- a/src/netconf_access.cpp
+++ b/src/netconf_access.cpp
@@ -194,3 +194,36 @@
 {
     return m_schema;
 }
+
+std::vector<ListInstance> NetconfAccess::listInstances(const std::string& path)
+{
+    std::vector<ListInstance> res;
+    auto list = m_schema->dataNodeFromPath(path);
+
+    // This inserts selection nodes - I only want keys not other data
+    // To get the keys, I have to call find_path here - otherwise I would get keys of a top-level node (which might not even be a list)
+    auto keys = libyang::Schema_Node_List{(*(list->find_path(path.c_str())->data().begin()))->schema()}.keys();
+    for (const auto& keyLeaf : keys) {
+        // Have to call find_path here - otherwise I'll have the list, not the leaf inside it
+        auto selectionLeaf = *(m_schema->dataNodeFromPath(keyLeaf->path())->find_path(keyLeaf->path().c_str())->data().begin());
+        auto actualList = *(list->find_path(path.c_str())->data().begin());
+        actualList->insert(selectionLeaf);
+    }
+
+    auto instances = m_session->getConfig(NC_DATASTORE_RUNNING, list->print_mem(LYD_XML, 0));
+
+
+    for (const auto& instance : instances->find_path(path.c_str())->data()) {
+        ListInstance instanceRes;
+
+        // I take the first child here, because the first element (the parent of the child()) will be the list
+        for (const auto& keyLeaf : instance->child()->tree_for()) {
+            auto leafData = libyang::Data_Node_Leaf_List{keyLeaf};
+            auto leafSchema = libyang::Schema_Node_Leaf{leafData.schema()};
+            instanceRes.insert({ leafSchema.name(), leafValueFromValue(leafData.value(), leafSchema.type()->base())});
+        }
+        res.push_back(instanceRes);
+    }
+
+    return res;
+}
