更新时间:2022-08-09 GMT+08:00

查询图列表

功能介绍

查询当前租户所有的图。

URI

GET /v1.0/{project_id}/graphs

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目编号,用于资源隔离。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

本次请求的起始位置,默认为0。

limit

Integer

每页资源数量的最大值,默认为10。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

graphCount

Integer

图总个数。请求失败时为空。

graphs

Array of graph_1 objects

图列表。请求失败时为空。

errorMessage

String

系统提示信息,执行成功时,字段可能为空。执行失败时,用于显示错误信息。

errorCode

String

系统提示信息,执行成功时,字段可能为空。执行失败时,用于显示错误码。

表5 graph_1

参数

参数类型

描述

id

String

图ID。

name

String

图名称。

createdBy

String

图的创建人账号。

isMultiAz

String

是否支持跨AZ高可用。

regionCode

String

域编码。

azCode

String

可用区编码。

schemaPath

Array of schemaPath_1 objects

元数据文件路径。

edgesetPath

Array of edgesetPath_1 objects

边数据集OBS路径。

edgesetFormat

String

边数据集文件格式。

edgesetDefaultLabel

String

边数据集文件默认Label。

vertexsetPath

Array of vertexsetPath_1 objects

点数据集OBS路径。

vertexsetFormat

String

点数据集文件格式。

vertexsetDefaultLabel

String

点数据集文件默认Label。

dataStoreVersion

String

图版本。

sys_tags

Array of SysTagsRes objects

企业项目信息,如果未指定则不开启,默认不开启。

status

String

图的状态码。

  • 100:准备中
  • 200:运行中
  • 201:升级中
  • 202:导入中
  • 203:回滚中
  • 204:导出中
  • 205:清空中
  • 206:扩容准备中
  • 207:扩容中
  • 208:扩容回退中
  • 300:故障
  • 303:创建失败
  • 400:被删除
  • 900:停止
  • 901:停止中
  • 920:启动中

actionProgress

String

图创建进度百分比。

graphSizeTypeIndex

String

图规模类型索引。

  • 0:一万边
  • 1:百万边
  • 2:千万边
  • 3:一亿边
  • 4:十亿边
  • 5:百亿边
  • 6:千亿边
  • 401:十亿增强边

vpcId

String

虚拟私有云ID。

subnetId

String

指定虚拟私有云下的子网ID。

securityGroupId

String

安全组ID。

replication

Integer

副本个数,默认为1。

created

String

图创建时间。

updated

String

图更新时间。

privateIp

String

图实例私有网络访问浮动IP地址,通过该IP用户可以通过私有网络中已部署的弹性云服务器对图实例进行访问。

trafficIpList

List<String>

图实例私有网络访问物理地址列表。为了防止浮动IP切换造成业务闪断,我们推荐您通过轮询的方式使用物理IP访问图实例。

cryptAlgorithm

String

图实例加密算法,取值为:

  • generalCipher:国际算法
  • SMcompatible:商密算法(兼容国际)

enableHttps

Boolean

是否开启安全模式,开启安全模式会对性能有较大影响

tags

JsonArray

标签列表,每个标签用<key,value>键值对表示。

表6 schemaPath_1

参数

参数类型

描述

jobId

String

导入OBS文件对应的jobId。

path

String

OBS存储路径,不包含OBS Endpoint。

status

String

OBS文件导入状态。

  • success:完全导入成功
  • partiallyFailed:部分失败
  • failed:完全导入失败
表7 edgesetPath_1

参数

参数类型

描述

jobId

String

导入OBS文件对应的jobId。

path

String

OBS存储路径,不包含OBS Endpoint。

status

String

OBS文件导入状态。

  • success:完全导入成功
  • partiallyFailed:部分失败
  • failed:完全导入失败
表8 vertexsetPath_1

参数

参数类型

描述

jobId

String

导入OBS文件对应的jobId。

path

String

OBS存储路径,不包含OBS Endpoint。

status

String

OBS文件导入状态。

  • success:完全导入成功
  • partiallyFailed:部分失败
  • failed:完全导入失败
表9 SysTagsRes

参数

参数类型

描述

key

String

企业项目的key填:_sys_enterprise_project_id。

value

String

企业项目的id。可以从企业项目获取。

请求示例

GET https://Endpoint/v1.0/{project_id}/graphs?offset=0&limit=10

响应示例

状态码: 200

OK

{
    "graphCount": 2,
    "graphs": [
        {
            "id": "f1529b88-c958-493e-8452-fccfe932cde1",
            "name": "demo",
            "regionCode": "az1-dc1",
            "azCode": "az1-dc1a",
            "schemaPath": [
              {
              "path": "ges-graphs/demo_movie/schema.xml",
              "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
             ],
             "edgesetPath": [
              {
               "path": "ges-graphs/demo_movie/edge.csv",
               "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
            ],
            "vertexsetPath": [
             {
              "path": "",
              "jobId": "ff80808167bb90340167bc7445670428",
              "status": "success"
             }
           ],
            "status": "200",
            "graphSizeTypeIndex": "1",
            "vpcId": "2d8af840-fd57-4e3b-a8f1-cda0f55ccd99",
            "subnetId": "dc018ec3-67d1-46c9-b2fc-19d83367f4e2",
            "securityGroupId": "11d27338-8649-4076-8579-5ebc1a60f79e",
            "created": "2018-07-23T04:09:44",
            "updated": "2018-07-23T04:09:44",
            "privateIp": "192.168.0.4",
            
            "dataStoreVersion": "1.0.5",
            "arch": "x86_64",
        },
        {
            "id": "53205529-026b-455a-9e07-228fae4b12b9",
            "name": "ges_c5de",
            "regionCode": "az1-dc1",
            "azCode": "az1-dc1a",

            "schemaPath": [
              {
              "path": "ges-graphs/demo_movie/schema.xml",
              "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
             ],
             "edgesetPath": [
              {
               "path": "ges-graphs/demo_movie/edge.csv",
               "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
            ],
             "vertexsetPath": [
             {
              "path": "",
              "jobId": "ff80808167bb90340167bc7445670428",
              "status": "success"
             }
           ],
            "status": "200",
            "graphSizeTypeIndex": "2",
            "vpcId": "2d8af840-fd57-4e3b-a8f1-cda0f55ccd99",
            "subnetId": "dc018ec3-67d1-46c9-b2fc-19d83367f4e2",
            "securityGroupId": "11d27338-8649-4076-8579-5ebc1a60f79e",
            "created": "2018-07-18T13:30:16",
            "updated": "2018-07-18T13:30:16",
            "privateIp": "192.168.0.168",
            "dataStoreVersion": "1.0.5",
            "arch": "aarch64",
        }
    ]
}

状态码

状态码

描述

200

OK