閱讀739 返回首頁    go 人物


應用管理類__應用操作接口_API參考手冊_開放搜索-阿裏雲

查看應用信息

查看一個應用信息

URL

/index/$app_name (app_name為要創建的應用名稱)

支持格式

JSON

HTTP請求方式

GET、POST

請求參數

參數 類型 必需 取值範圍 默認值 描述
action string status status

返回結果

參數 類型 描述
status string 訪問結果,OK為成功,FAIL為失敗,請根據返回錯誤碼進行排查
result string 應用信息,具體信息如下說明
  • index_name:應用名
  • pv:每日搜索請求數
  • doc_last_update_time:上次更新時間
  • quota:是否超配額信息
  • fields:應用結構信息
  • from_table:表結構信息

    示例

    請求:(此處省略了公共參數及編碼等因素)
    1. https://$host/index/test_create_index?action=status
    成功返回:
    1. {"result": {
    2. "index_name": "test_create_index",
    3. "pv": 0,
    4. "doc_last_update_time": 0,
    5. "total_doc_num": 10000,
    6. "fields": {
    7. "from_table": {
    8. "main": {
    9. "id": {
    10. "name": "id",
    11. "type": "TEXT",
    12. "is_multi": "1",
    13. "is_pk": "0"
    14. }
    15. }
    16. },
    17. "join_map": [],
    18. "master": "main",
    19. "level": {
    20. "main": "0"
    21. }
    22. },
    23. "merge_table": {
    24. "id": {
    25. "name": "id",
    26. "type": "LITERAL",
    27. "is_pk": "1",
    28. "is_multi": 0
    29. }
    30. },
    31. "primary_key": "id"
    32. },
    33. "indexes": {
    34. "search_fields": {
    35. "id": {
    36. "fields": [
    37. "id"
    38. ]
    39. }
    40. },
    41. "filter_fields": [
    42. "id",
    43. "int_arr",
    44. "literal_arr"
    45. ]
    46. }
    47. },
    48. "errors":[],
    49. "status": "OK",
    50. "request_id": "1422267002004077600495891"}
    錯誤返回:
    1. {"result":null,
    2. "status":"FAIL",
    3. "errors":[{"code":2001,"message":"App is not found"}],
    4. "RequestId":"14222669850171034003366"
    5. }

獲取應用列表

獲得當前應用

URL

/index

支持格式

JSON

HTTP請求方式

GET、POST

請求參數

參數 類型 必需 取值範圍 默認值 描述
page int 獲取第幾頁應用列表
page_size int 每頁返回的應用個數

返回結果

參數 類型 描述
status string 訪問結果,OK為成功,FAIL為失敗,請根據返回錯誤碼進行排查
created int 應用創建時間戳
name string 應用名稱
id int 應用id
total int 總的應用個數

示例

請求:(此處省略了公共參數及編碼等因素)

  1. https://$host/index?page=1&page_size=1

成功返回:

  1. {
  2. "result": [
  3. {
  4. "id": "107557",
  5. "name": "test_create_index",
  6. "description": "test",
  7. "created": "1422266999"
  8. }
  9. ],
  10. "total": "2",
  11. "status": "OK",
  12. "RequestId": "1422268539021275800907873"
  13. }

最後更新:2016-11-23 16:04:03

  上一篇:go 錯誤碼說明__調用方式_API參考手冊_開放搜索-阿裏雲
  下一篇:go 數據處理類__應用操作接口_API參考手冊_開放搜索-阿裏雲