Coordinator Python SDK 参考文档

这是基于OpenAPI 3.0规范的GraphScope FLEX HTTP服务规范。您可以在doc中查看关于该规范的更多详细信息。

这个Python包是由OpenAPI Generator项目自动生成的:

  • API 版本: 1.0.0

  • 软件包版本:1.0.0

  • 生成器版本:7.8.0

  • 构建包:org.openapitools.codegen.languages.PythonClientCodegen

系统要求.

Python 3.7+

安装与使用

pip安装

如果Python包托管在代码仓库中,您可以直接通过以下方式安装:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(你可能需要使用root权限运行pipsudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

然后导入该包:

import graphscope.flex.rest

Setuptools

通过Setuptools安装。

python setup.py install --user

(或使用 sudo python setup.py install 为所有用户安装该软件包)

然后导入该包:

import graphscope.flex.rest

测试

执行 pytest 来运行测试。

快速开始

请按照安装步骤进行操作,然后运行以下命令:


import graphscope.flex.rest
from graphscope.flex.rest.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = graphscope.flex.rest.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with graphscope.flex.rest.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = graphscope.flex.rest.AlertApi(api_client)
    create_alert_receiver_request = graphscope.flex.rest.CreateAlertReceiverRequest() # CreateAlertReceiverRequest | 

    try:
        api_response = api_instance.create_alert_receiver(create_alert_receiver_request)
        print("The response of AlertApi->create_alert_receiver:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AlertApi->create_alert_receiver: %s\n" % e)

API端点文档

所有URI均相对于http://localhost

方法

HTTP请求

描述

AlertApi

create_alert_receiver

POST /api/v1/alert/receiver

AlertApi

delete_alert_message_in_batch

DELETE /api/v1/alert/message-collection

AlertApi

delete_alert_receiver_by_id

DELETE /api/v1/alert/receiver/{receiver_id}

AlertApi

delete_alert_rule_by_id

DELETE /api/v1/alert/rule/{rule_id}

AlertApi

list_alert_messages

GET /api/v1/alert/message

AlertApi

list_alert_receivers

GET /api/v1/alert/receiver

AlertApi

list_alert_rules

GET /api/v1/alert/rule

AlertApi

update_alert_message_in_batch

PUT /api/v1/alert/message-collection/status

AlertApi

update_alert_receiver_by_id

PUT /api/v1/alert/receiver/{receiver_id}

AlertApi

update_alert_rule_by_id

PUT /api/v1/alert/rule/{rule_id}

DataSourceApi

bind_datasource_in_batch

POST /api/v1/graph/{graph_id}/datasource

DataSourceApi

get_datasource_by_id

GET /api/v1/graph/{graph_id}/datasource

DataSourceApi

unbind_edge_datasource

DELETE /api/v1/graph/{graph_id}/datasource/edge/{type_name}

DataSourceApi

unbind_vertex_datasource

DELETE /api/v1/graph/{graph_id}/datasource/vertex/{type_name}

DeploymentApi

get_deployment_info

GET /api/v1/deployment

DeploymentApi

get_deployment_pod_log

GET /api/v1/deployment/log

DeploymentApi

get_deployment_resource_usage

GET /api/v1/deployment/resource/usage

DeploymentApi

get_deployment_status

GET /api/v1/deployment/status

DeploymentApi

get_storage_usage

GET /api/v1/deployment/storage/usage

GraphApi

create_edge_type

POST /api/v1/graph/{graph_id}/schema/edge

GraphApi

create_graph

POST /api/v1/graph

GraphApi

create_vertex_type

POST /api/v1/graph/{graph_id}/schema/vertex

GraphApi

delete_edge_type_by_name

DELETE /api/v1/graph/{graph_id}/schema/edge/{type_name}

GraphApi

delete_graph_by_id

DELETE /api/v1/graph/{graph_id}

GraphApi

delete_vertex_type_by_name

DELETE /api/v1/graph/{graph_id}/schema/vertex/{type_name}

GraphApi

get_graph_by_id

GET /api/v1/graph/{graph_id}

GraphApi

get_schema_by_id

GET /api/v1/graph/{graph_id}/schema

GraphApi

import_schema_by_id

POST /api/v1/graph/{graph_id}/schema

GraphApi

list_graphs

GET /api/v1/graph

JobApi

delete_job_by_id

DELETE /api/v1/job/{job_id}

JobApi

get_dataloading_job_config

POST /api/v1/graph/{graph_id}/dataloading/config

JobApi

get_job_by_id

GET /api/v1/job/{job_id}

JobApi

list_jobs

GET /api/v1/job

JobApi

submit_dataloading_job

POST /api/v1/graph/{graph_id}/dataloading

ServiceApi

get_service_status_by_id

GET /api/v1/graph/{graph_id}/service

ServiceApi

list_service_status

GET /api/v1/service

ServiceApi

restart_service

POST /api/v1/service/restart

ServiceApi

start_service

POST /api/v1/service/start

ServiceApi

stop_service

POST /api/v1/service/stop

StoredProcedureApi

create_stored_procedure

POST /api/v1/graph/{graph_id}/storedproc

StoredProcedureApi

delete_stored_procedure_by_id

DELETE /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id}

存储过程API

get_stored_procedure_by_id

GET /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id}

StoredProcedureApi

list_stored_procedures

GET /api/v1/graph/{graph_id}/storedproc

StoredProcedureApi

update_stored_procedure_by_id

PUT /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id}

UtilsApi

upload_file

POST /api/v1/file/uploading

模型文档

授权文档

端点无需授权。

作者

graphscope@alibaba-inc.com