Search your newsletters
Full text search across the newsletters this credential was granted: the newsletters themselves, their articles and their chat, ranked by relevance. Nothing outside those newsletters is searched.
Results obey the same gates as the resource operations do, evaluated at the public audience. An article stamped with an audience, an article dated in the future, a draft, and a thread that is not public are never returned, so search cannot be used to see around a permission.
Search returns public content only, whatever the credential is. Everything in a result is something a logged out visitor could already read on the web. That is deliberately narrower than what a credential can reach directly: a key granted content:read on its own newsletter still does not find that newsletter's audience-stamped issues or its private rooms here. Read those through the article and thread operations, which evaluate the audience against the credential. Searching your own restricted content is not part of this operation.
A query shorter than two characters returns an empty page rather than an error, so a caller can send it on every keystroke.
Request
- Base URL: https://api.usecommune.com
- URL: https://api.usecommune.com/search
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://usecommune.com/api/oauth/authorize, token URL https://usecommune.com/api/oauth/token, scopes: content:read)
Query parameters
The query. Shorter than two characters returns an empty page.
What a search result points at. There is no post or comment kind: a discussion result is a thread or a message.
Return only results of this kind. Repeat the parameter to accept several. Omit for all kinds.
The pagination.next_cursor value from the previous page. Omit it to read the first page. A cursor is opaque, is only valid for the same operation with the same filters, and is not a durable identifier.
How many items to return in this page. This is a page size, not an offset. Fewer items than requested may come back and that does not mean the collection is exhausted, only an absent next_cursor does.
Comma-separated list of relationship paths to inline in the response. Unexpanded relationships are returned as a reference object carrying only id and object. Each operation documents the paths it accepts, and an unknown path answers 400. Nested paths use a dot, for example article.newsletter.
Comma-separated allow-list of top level properties to return on each object, so a client can trim a response it does not need in full. id and object are always returned. An unknown property name answers 400. Properties omitted by an operation, such as content on any article list, cannot be brought back with fields.
Response
A page of results, most relevant first.
Example response
{
"pagination": {
"next_cursor": "Y3Vyc29yOjE3NTY0MjM2MDAwMDA6MDE5MmM4"
},
"data": [
{
"resource": {
"object": "newsletter",
"id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.