3
0
corteza/api/messaging/spec/search.json
2019-05-24 12:46:30 +02:00

121 lines
2.9 KiB
JSON

{
"Title": "Search entry point",
"Interface": "Search",
"Struct": null,
"Parameters": {
"get": [
{
"name": "query",
"required": false,
"title": "Search query",
"type": "string"
}
]
},
"Protocol": "",
"Authentication": [
"Client ID",
"Session ID"
],
"Path": "/search",
"APIs": [
{
"Name": "messages",
"Method": "GET",
"Title": "Search for messages",
"Path": "/messages",
"Parameters": {
"get": [
{
"name": "channelID",
"required": false,
"title": "Filter by channels",
"type": "[]string"
},
{
"name": "afterMessageID",
"required": false,
"title": "ID of the first message in the list (exclusive)",
"type": "uint64"
},
{
"name": "beforeMessageID",
"required": false,
"title": "ID of the last message in the list (exclusive)",
"type": "uint64"
},
{
"name": "fromMessageID",
"required": false,
"title": "ID of the first message in the list (inclusive)",
"type": "uint64"
},
{
"name": "toMessageID",
"required": false,
"title": "ID of the last message the list (inclusive)",
"type": "uint64"
},
{
"name": "threadID",
"required": false,
"title": "Filter by thread message ID",
"type": "[]string"
},
{
"name": "userID",
"required": false,
"title": "Filter by one or more user",
"type": "[]string"
},
{
"name": "type",
"required": false,
"title": "Filter by message type (text, inlineImage, attachment, ...)",
"type": "[]string"
},
{
"name": "pinnedOnly",
"required": false,
"title": "Return only pinned messages",
"type": "bool"
},
{
"name": "bookmarkedOnly",
"required": false,
"title": "Only bookmarked messages",
"type": "bool"
},
{
"name": "limit",
"required": false,
"title": "Max number of messages",
"type": "uint"
}
]
}
},
{
"Name": "threads",
"Method": "GET",
"Title": "Search for threads",
"Path": "/threads",
"Parameters": {
"get": [
{
"name": "channelID",
"required": false,
"title": "Filter by channels",
"type": "[]string"
},
{
"name": "limit",
"required": false,
"title": "Max number of messages",
"type": "uint"
}
]
}
}
]
}