阅读739 返回首页    go 阿里云 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参考手册_开放搜索-阿里云