blue.microcosm.links.getManyToManyCounts
count many-to-many relationships with secondary link paths
Details · query
| Kind | query |
|---|---|
| Authority | links.microcosm.blue |
| Indexed |
Checks
Validunlimited-stringdefs.countBySubject.properties.subjectNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.otherSubject.itemsNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.pathToOtherNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.sourceNo maxLength, maxGraphemes or format limits this string.field-name-syntaxdefs.main.output.schema.properties.counts_by_other_subjectThe field name counts_by_other_subject should be letters and digits, starting with a letter.unlimited-stringdefs.main.output.schema.properties.cursorNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"countBySubject": {
"properties": {
"distinct": {
"description": "number of distinct DIDs linking to this subject",
"type": "integer"
},
"subject": {
"description": "the secondary subject being counted",
"type": "string"
},
"total": {
"description": "total number of links to this subject",
"type": "integer"
}
},
"required": [
"subject",
"total",
"distinct"
],
"type": "object"
},
"main": {
"description": "count many-to-many relationships with secondary link paths",
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"counts_by_other_subject": {
"items": {
"ref": "#countBySubject",
"type": "ref"
},
"type": "array"
},
"cursor": {
"description": "pagination cursor",
"type": "string"
}
},
"required": [
"counts_by_other_subject"
],
"type": "object"
}
},
"parameters": {
"properties": {
"did": {
"description": "filter links to those from specific users",
"items": {
"format": "did",
"type": "string"
},
"type": "array"
},
"limit": {
"default": 16,
"description": "number of results to return",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"otherSubject": {
"description": "filter secondary links to specific subjects",
"items": {
"type": "string"
},
"type": "array"
},
"pathToOther": {
"description": "path to the secondary link in the many-to-many record (e.g., 'otherThing.uri')",
"type": "string"
},
"source": {
"description": "collection and path specification for the primary link",
"type": "string"
},
"subject": {
"description": "the primary target being linked to (at-uri, did, or uri)",
"format": "uri",
"type": "string"
}
},
"required": [
"subject",
"source",
"pathToOther"
],
"type": "params"
},
"type": "query"
}
},
"id": "blue.microcosm.links.getManyToManyCounts",
"lexicon": 1
}