-
2023.05.26
開発者API
json/rest API により、外部アプリケーションとの連携を可能にします。
API メゾット一覧は以下の通りです。
getVersion()
CollasQ のバージョンを取得します。
※以下のような文字列が返されます
getApiVersion()
CollasQ の API バージョンを取得します。
※以下のような文字列が返されます
getCount()
FAQ 記事の件数を取得します。
※以下のような文字列が返されます
getDefaultLanguage()
使用している言語コードを取得します。
※以下のような文字列が返されます
search()
キーワード検索を実施し、その結果を取得します。
※例:キーワード「FAQ」で検索した場合
※以下のような文字列が返されます。
[
{
“id”:”1″,
“lang”:”ja”,
“category_id”:”15″,
“question”:”FAQとは何の略ですか。”,
“answer”:”英語のFrequently Asked Questionsの略語です。”,
“link”:”http://●●●●●/index.php?action=faq&cat=15&id=1&artlang=ja”
},
{
“id”:”13″,
“lang”:”ja”,
“category_id”:”5″,
“question”:”「Q&A」と「FAQ」の違いは何ですか。”,
“answer”:”「Q&A」は日本語に訳すと「質問と回答」という意味です。「FAQ」は日本語に訳すと『よくある質問』という意味です。”,
“link”:”http://●●●●●/index.php?action=faq&cat=5&id=13&artlang=ja”
}
]
getCategories()
カテゴリー一覧を取得します。
※以下のような文字列が返されます
{
“id”: 1,
“lang”: “ja”,
“parent_id”: 0,
“name”: “製品機能”,
“description”: “製品の機能に関するQ&Aです。”,
“user_id”: 1,
“group_id”: 1,
“active”: 1,
“level”: 0
},
{
“id”: 2,
“lang”: “ja”,
“parent_id”: 0,
“name”: “契約・手続き”,
“description”: “契約に関わるQ&Aです”,
“user_id”: 1,
“group_id”: -1,
“active”: 1,
“level”: 0
}
]
getFaqs()
指定したカテゴリーに所属する FAQ 記事を取得します。
※例:カテゴリー ID=15 のカテゴリーを指定する場合
※以下のような文字列が返されます
{
“record_id”:”1″,
“record_lang”:”ja”,
“category_id”:”15″,
“record_title”:”FAQとは何の略ですか。”,
“record_preview”:”英語のFrequently Asked Questionsの略語です。”,
“record_link”:”●●●●●/index.php?action=faq&cat=1&id=1&artlang=ja”,
“record_updated”:”20201010175452″,
“visits”:”3″,
“record_created”:”2020-09-03T21:30:17+02:00″
},
{
“record_id”:”2″,
“record_lang”:”ja”,
“category_id”:”15″,
“record_title”:”FAQとチャットボットの連携は可能ですか?”,
“record_preview”:”可能です。”,
“record_link”:”●●●●●/index.php?action=faq&cat=1&id=2&artlang=ja”,
“record_updated”:”20201014181500″,
“visits”:”10″,
“record_created”:”2020-09-03T21:30:17+02:00″
}
]
getFaq()
特定のレコード ID に合致する FAQ 記事を取得します。
※例:レコード ID=1 の FAQ 記事を指定する場合
※以下のような文字列が返されます
“id”:”1″,
“lang”:”ja”,
“solution_id”:”1000″,
“revision_id”:”0″,
“active”:”yes”,
“sticky”:”0″,
“keywords”:””,
“title”:”FAQとは何の略ですか。”,
“content”:”英語のFrequently Asked Questionsの略語です。”,
“comment”:”y”,
“date”:”2020-10-10 17:54″,
“dateStart”:”00000000000000″,
“dateEnd”:”99991231235959″,
“linkState”:””,
“linkCheckDate”:”0″,
“notes”:””,
“created”:”2020-09-03T21:30:17+02:00″
}
getAllFaqs()
全ての FAQ 記事のデータを取得します。
※以下のような文字列が返されます
{
“id”:”1″,
“lang”:”ja”,
“solution_id”:”1000″,
“revision_id”:”0″,
“active”:”yes”,
“sticky”:”0″,
“keywords”:””,
“title”:”FAQとは何の略ですか。”,
“content”:”英語のFrequently Asked Questionsの略語です。”,
“comment”:”y”,
“updated”:”2020-10-10 17:54″,
“dateStart”:”00000000000000″,
“dateEnd”:”99991231235959″,
“linkState”:””,
“linkCheckDate”:”0″,
“notes”:””,
“created”:”2020-09-03T21:30:17+02:00″
},
{
“id”:”2″,
“lang”:”ja”,
“solution_id”:”1001″,
“revision_id”:”0″,
“active”:”yes”,
“sticky”:”0″,
“keywords”:””,
“title”:”FAQとチャットボットの連携は可能ですか?”,
“content”:”可能です。”,
“comment”:”y”,
“updated”:”2020-10-10 17:54″,
“dateStart”:”00000000000000″,
“dateEnd”:”99991231235959″,
“linkState”:””,
“linkCheckDate”:”0″,
“notes”:””,
“created”:”2020-09-03T21:30:17+02:00″
}
]
getAttachmentsFromFaq()
指定の FAQ 記事に添付されたファイル名と、その URL を取得します。
※例:ID=1 の FAQ 記事を指定する場合
※以下のような文字列が返されます
{
“filename”:”test.csv”,
“url”:”https://●●●●●/index.php?action=attachment&id=1″
},
{
“filename”:”CollasQ.png”,
“url”:”https://●●●●●/index.php?action=attachment&id=2″
}
]
getPopular()
アクセス数の多い FAQ 記事のデータを取得します。
※以下のような文字列が返されます
{
“visits”: “10”,
“question”: “FAQとチャットボットの連携は可能ですか?”,
“answer”: “可能です。”,
“date”: “2020-03-17T22:10:00+0100”,
“last_visit”: “2020-08-14T21:16:29+02:00”,
“url”: “https://●●●●●/index.php?action=faq&cat=15&id=2&artlang=ja”
},
{
“visits”: “3”,
“question”: “FAQとは何の略ですか。”,
“answer”: “英語のFrequently Asked Questionsの略語です。”,
“date”: “2020-12-14T07:01:00+0100”,
“last_visit”: “2016-05-16T20:36:53+02:00”,
“url”: “https://●●●●●/index.php?action=faq&cat=15&id=1&artlang=ja”
}
]
getLatest()
最近登録・更新された FAQ 記事のデータを取得します。
※以下のような文字列が返されます
{
“date”: “2020-07-13T11:28:00+0200”,
“question”: “FAQとは何の略ですか。”,
“answer”: “英語のFrequently Asked Questionsの略語です。”,
“visits”: 10,
“url”: “https://●●●●●/index.php?action=faq&cat=15&id=1&artlang=ja”
},
{
“date”: “2016-06-19T21:48:00+0200”,
“question”: “FAQとチャットボットの連携は可能ですか?”,
“answer”: “可能です。”,
“visits”: 3,
“url”: “https://●●●●●/index.php?action=faq&cat=1&id=3&artlang=ja”
}
]
getNews()
お知らせのデータを取得します。
※以下のような文字列が返されます
{
“id”: 1,
“lang”: “ja”,
“date”: “2020-06-01T20:43:00+0200”,
“header”: “【機能概要】記事追加のお知らせ”,
“content”: “カテゴリー「機能概要」に、新しく記事を追加しました。”,
“dateStart”: “0”,
“dateEnd”: “99991231235959”,
“active”: true,
“allowComments”: true,
“link”: “”,
“linkTitle”: “”,
“target”: “”,
“url”: “https://●●●●●/?action=news&newsid=1&newslang=ja
}
]
getPopularSearches()
検索履歴より、検索件数の多いキーワードを取得します。
※以下のような文字列が返されます
{
“id”: “10”,
“searchterm”: “FAQ機能”,
“number”: “127”,
“lang”: “ja”
},
{
“id”: “94”,
“searchterm”: “チャットボット”,
“number”: “27”,
“lang”: “ja”
}
]
getPopularTags()
FAQ 記事への付与数が多いタグを取得します。
※以下のような文字列が返されます
{
“tagId”: 4,
“tagName”: “FAQ”,
“tagFrequency”: 3
},
{
“tagId”: 1,
“tagName”: “チャットボット”,
“tagFrequency”: 2
}
]
getFAQsByTag()
指定のタグがつけられた FAQ 記事を取得します。
※以下のような文字列が返されます
{
“record_id”:1,
“record_lang”:”ja”,
“category_id”:15,
“record_title”:”FAQとは何の略ですか。”,
“record_preview”:”英語のFrequently Asked Questionsの略語です。”,
“record_link”:”https://●●●●●●/index.php?action=faq&cat=15&id=1&artlang=ja”,
“record_updated”:”2020-09-03 21:30:17″,
“visits”:3,
“record_created”:”2020-09-03 21:30:17″
},
{
“record_id”:2,
“record_lang”:”ja”,
“category_id”:15,
“record_title”:”FAQとチャットボットの連携は可能ですか?”,
“record_preview”:”可能です。”,
“record_link”:”https://●●●●●/index.php?action=faq&cat=15&id=2&artlang=ja”,
“record_updated”:”2020-09-03 21:30:17″
“visits”:10,
“record_created”:”2020-09-03 21:30:17″
}
]
getComments()
指定の FAQ 記事のコメントを取得します。
※以下のような文字列が返されます
[
{
“id”: 3,
“content”: “動作環境も追記いただけると助かります。”,
“date”: “2020-08-27T21:15:31+0200”
},
{
“id”: 5,
“content”: “疑問解決しました。”,
“date”: “2012-08-27T21:15:31+0200”
}
]
login
CollasQ にログインし、その結果を返します。
※POST する値
※以下のような文字列が返されます
成功時
“loggedin”: true,
“error”: “”
}
失敗時
“loggedin”: false,
“error”: “Error message”
}