記事を検索する
GraphQLクエリー
query search(
$scope: ID
$keywords: String!
$offset: Int
$limit: Int
$orderBy: String
) {
searchResults(
scope: $scope
keywords: $keywords
offset: $offset
limit: $limit
orderBy: $orderBy
) {
totalCount
nodes {
uid
nodeType
name
bookUid
bookName
url
bodySnippet
}
}
}パラメーター
パラメーター名 | 必須 | 説明 |
|---|---|---|
scope | 検索対象となるブックのUIDまたはワークスペースのUID | |
keywords | 必須 | スペース区切りのキーワード |
orderBy | 並び順 | |
limit | 何件取得するか | |
offset | 先頭からのオフセット |
GraphQLレスポンス
項目名 | 説明 |
|---|---|
totalCount | 検索結果の件数 |
nodes.uid | 記事のUID |
nodes.node_type | 'article'固定 |
nodes.name | 記事の名称 |
nodes.bookUid | ブックのUID |
nodes.bookName | ブックの名前 |
nodes.url | 記事のURL |
nodes.bodySnippet | 記事のスニペット |
レスポンスの例
{
"searchResults": {
"totalCount": 20,
"nodes": [
{
"uid": "ar_6szxy2zpvyxrbb55vwbgp5v2gr",
"nodeType": "article",
"name": "はじめに",
"bookUid": "bk_4mhp0d57k010tw518bnx91c126",
"bookName": "Runbookを利用する",
"url": "/docs/user/3/get-started",
"bodySnippet": "..."
},
...
]
}
}
最終更新: