. . . . "Returns one row per known space with its label, type IRI and short type name, plus the number of members (Admin + Maintainer + Member tiers) and the number of observers (Observer tier), ordered by member count (most first), then alphabetically by space label. Intended for the /spaces table view." . . . "Get all spaces" . . "prefix rdfs: \nprefix npa: \nprefix npx: \nprefix gen: \n\nselect ?space_iri (sample(?lbl) as ?space_iri_label) (sample(?t) as ?type) (sample(?tlbl) as ?type_label) (coalesce(sample(?mc), 0) as ?members_count) (coalesce(sample(?oc), 0) as ?observers_count) where {\n graph npa:spacesGraph {\n ?spaceRef a npa:SpaceRef ; npa:spaceIri ?space_iri .\n ?def a npa:SpaceDefinition ;\n npa:forSpaceRef ?spaceRef ;\n npa:viaNanopub ?np .\n }\n graph npa:graph {\n ?np rdfs:label ?lbl .\n ?np npx:hasNanopubType ?t .\n filter(strstarts(str(?t), \"https://w3id.org/kpxl/gen/terms/\"))\n filter(?t != gen:Space)\n }\n filter not exists { graph npa:graph { ?invNp npx:invalidates ?np . } }\n bind(strafter(str(?t), \"https://w3id.org/kpxl/gen/terms/\") as ?tlbl)\n optional {\n select ?space_iri (count(distinct ?memberAgent) as ?mc) (count(distinct ?observerAgent) as ?oc) where {\n graph npa:graph { npa:hasCurrentSpaceState ?g . }\n graph ?g {\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space_iri ; npa:forAgent ?agent ; npa:hasRoleType ?tier .\n }\n bind(if(?tier != gen:ObserverRole, ?agent, ?unboundM) as ?memberAgent)\n bind(if(?tier = gen:ObserverRole, ?agent, ?unboundO) as ?observerAgent)\n } group by ?space_iri\n }\n} group by ?space_iri order by desc(coalesce(sample(?mc), 0)) lcase(sample(?lbl))" . . "Tobias Kuhn" . "2026-06-24T11:50:46Z"^^ . . . . . . . . . . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" . "NgstlKnIqUOmZslb6NXywgfnVFJLoiR+WNYJ+gI6nEg96wIjQqCx8RTiooHxuxd9Am2T194XEOb9q40d1ruEizluNnZgkTAmSLDo7M2nn6Upim6Mxtj94OUmJCvwlj9WOefs6gOeM3swa7G4WJhb8P+XZCn3uCYUqQLwqg3vjck=" . . .