ロボットのバージョン詳細を照会
api.example.com、console.example.com、files.example.comは説明用のアドレスです。実際の環境で指定された API、管理画面、ファイル配布先の URL に置き換えてください。
このAPIは、指定したロボットの現在の公開バージョン(公開バージョンがない場合は開発中のバージョン)の詳細情報を照会するために使用します。説明、アイコン、所有者、過去のバージョン一覧などの情報が含まれます。
事前操作
1. 認証APIを使用してaccessTokenを取得します。
リクエスト
| 基本 | パラメータ値 | 説明 |
|---|---|---|
| HTTP URL | https://api.example.com/oapi/app/open/query/appVersionDetail | |
| HTTP Method | GET |
リクエストヘッダー
| 基本 | パラメータ値 | 説明 |
|---|---|---|
| Authorization | Bearer {accessToken} | {accessToken}変数は、認証APIが返すaccess Tokenに置き換える必要があります |
リクエストパラメータ
URLクエリ文字列でパラメータを渡します。
| 名称 | タイプ | 必須かどうか | 説明 |
|---|---|---|---|
| appId | String | はい | ロボットID |
レスポンス
レスポンスのデータ構造
| 名称 | タイプ | 説明 |
|---|---|---|
| data | object | 結果データ |
| ├─ versionId | string | ロボット/コマンドの一意のID(現在のバージョンID) |
| ├─ appName | string | バージョン名 |
| ├─ appId | string | ロボットID |
| ├─ description | string | バージョンの説明 |
| ├─ instruction | string | バージョンの使用方法 |
| ├─ icon | string | バージョンのアイコンのアドレス |
| ├─ creator | string | 作成者のユーザーID |
| ├─ ownerName | string | ロボットの所有者名 |
| ├─ updateTime | string | 更新日時 |
| ├─ helpLink | string | コマンドのヘルプドキュメントのアドレス |
| ├─ tags | string | 業務タグ |
| ├─ uiTags | string | 表示タグ |
| ├─ likeCount | integer | いいねの数 |
| ├─ acquireCount | integer | 取得された回数 |
| ├─ versionHistoryList | array | 過去のバージョン一覧 |
| ├─ versionId | string | バージョンID |
| ├─ versionName | string | バージョン名 |
| ├─ createTime | string | 作成日時 |
| ├─ updateTime | string | 更新日時 |
| ├─ modifierUserName | string | 変更者名 |
| ├─ creator | string | 作成者のユーザーID |
| ├─ modifier | string | 変更者のユーザーID |
| ├─ versionLog | string | バージョンのリリースログ |
| ├─ versionStatus | string | バージョンのステータス:d(開発中)、a(審査中)、i(不正、審査却下と同等)、p(リリース済み) |
| ├─ version | string | ロボットのバージョン番号 |
| ├─ isOnlineVersion | boolean | 公開バージョンかどうか |
| ├─ nixRemark | string | 却下理由 |
| ├─ botDownloadUrl | string | botパッケージのダウンロードアドレス |
| ├─ forbidRobotShare | boolean | 共有を禁止するかどうか |
| ├─ acquired | boolean | 取得済みかどうか(このAPIには呼び出し元の識別情報が渡されないため、常にfalseを返します) |
| ├─ needPassword | boolean | パスワードが必要かどうか |
| ├─ like | boolean | いいね済みかどうか |
| ├─ customItems | object | フロントエンドでの表示に使用するカスタム拡張属性です。ロボットの設定によって異なります |
| ├─ isPaidApp | boolean | 有料ロボットかどうか |
| ├─ isPersonalApp | boolean | 個人版のロボットかどうか |
| ├─ isOwner | boolean | ロボットの所有者かどうか |
| ├─ isOfficial | boolean | 公式ロボットかどうか |
| ├─ ownerInfo | object | 開発者情報 |
| ├─ userId | string | ユーザーID |
| ├─ userName | string | ユーザー名 |
| ├─ userIcon | string | ユーザーのプロフィール画像のアドレス |
| ├─ userType | string | ユーザータイプ |
| ├─ ownerStatisticData | object | 開発者の統計データ |
| ├─ totalDevelopAppCount | integer | 開発したロボットの累計数 |
| ├─ totalRunTime | integer | 累計実行時間、単位:秒 |
| ├─ open | boolean | リンクを公開するかどうか |
| ├─ officialAttrTags | array[string] | 公式ロボット・コマンドの属性タグ |
| code | integer | 戻り値の結果コードです。200は成功、その他は失敗を示します |
| success | boolean | 呼び出しが成功したかどうかを示します。このフィールドでAPI呼び出しの成否を判断できます |
| requestId | string | 問題の調査に使用するリクエストID |
| serverIp | string | 処理を行うサービスのIP |
| msg | string | ステータスコードの説明 |
レスポンスデータの例
| { "data": { "versionId": "9c2f1a3e-1234-4a5b-9c1d-0f1e2d3c4b5a", "appName": "kkkkk", "appId": "107f0f23-3584-4b1b-8665-443605722f95", "description": "应用描述示例", "instruction": "使用说明示例", "icon": "https://files.example.com/icon/xxx.png", "creator": "c8d9647f-1435-4b5f-bd64-b5d4613e5283", "ownerName": "ceshiz@csqy1", "updateTime": "2024-05-08 13:50:24", "helpLink": "", "tags": "", "uiTags": "应用", "likeCount": 0, "acquireCount": 3, "versionHistoryList": [ { "versionId": "9c2f1a3e-1234-4a5b-9c1d-0f1e2d3c4b5a", "versionName": "kkkkk", "createTime": "2024-05-08 13:49:13", "updateTime": "2024-05-08 13:50:24", "modifierUserName": "ceshiz@csqy1", "creator": "c8d9647f-1435-4b5f-bd64-b5d4613e5283", "modifier": "c8d9647f-1435-4b5f-bd64-b5d4613e5283", "versionLog": "首次发布", "versionStatus": "p", "version": "3", "isOnlineVersion": true, "nixRemark": "", "botDownloadUrl": "https://files.example.com/bot/xxx.zip" } ], "forbidRobotShare": false, "acquired": false, "needPassword": false, "like": false, "customItems": {}, "isPaidApp": false, "isPersonalApp": true, "isOwner": false, "isOfficial": false, "ownerInfo": { "userId": "c8d9647f-1435-4b5f-bd64-b5d4613e5283", "userName": "ceshiz@csqy1", "userIcon": "", "userType": "" }, "ownerStatisticData": { "totalDevelopAppCount": 5, "totalRunTime": 3600 }, "open": false, "officialAttrTags": [] }, "code": 200, "success": true, "requestId": "2f296259-d953-4939-9701-bc28ac43e002", "serverIp": "10.10.1.21", "msg": null } |
|---|
発生する可能性のあるエラーコード
| code | 説明 |
|---|---|
| 401 | 未認証です。accessTokenが無効であるか、指定されていません。先に認証を完了してaccessTokenを取得する必要があります |
| 80101002 | このロボットのバージョンが存在しません(ロボットが存在しないか、ロボットにまだバージョンが1つもありません) |
使用例
curlの例
| curl --location --request GET 'https://api.example.com/oapi/app/open/query/appVersionDetail?appId={appId}' \ --header 'Authorization: Bearer {accessToken}' |
|---|