def get_property(graph_id, auth=None): """ :param graph_id: :param auth: """ url = "/api/v1.2/graph-connections/%d/schema/propertykeys" % graph_id code, res = Request().request(method="get", path=url, types="hubble") return code, res
def query_load_job(graph_id, auth=None): """ 查询导入任务,可返回ID :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/" % graph_id code, res = Request().request(method='get', path=url, types="hubble") return code, res
def get_edgeLabel(graph_id, auth=None): """ 验证:EdgeLabel读权限 :param graph_id: :param auth: :return: """ url = "/api/v1.2/graph-connections/%d/schema/edgelabels" % graph_id code, res = Request().request(method='get', path=url, types="hubble") return code, res
def get_index(graph_id, auth=None): """ 查看IndexLabel :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/schema/indexlabels" % graph_id code, res = Request().request(method='get', path=url, types="hubble") return code, res
def mapping_complete_next_step(graph_id, job_id, auth=None): """ 设置映射完成,点击下一步 :param auth: :param graph_id: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/file-mappings/next-step" % ( graph_id, job_id) code, res = Request().request(method='put', path=url, types="hubble") return code, res
def query_all_load_tasks(graph_id, job_id, auth=None): """ 查询全部导入任务 :param auth: :param graph_id: :param job_id: :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/load-tasks" % ( graph_id, job_id) code, res = Request().request(method='get', path=url, types="hubble") return code, res
def delete_graph_connect(graph_id, auth=None): """ 删除全部图链接 :param auth: :param graph_id: :return: """ url = '/api/v1.2/graph-connections/%d' % graph_id code, res = Request().request(method="delete", path=url, types="hubble") return code, res
def view_async_tasks_results(graph_id, async_task_id, auth=None): """ 查看异步任务结果 :param auth: :param async_task_id: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/async-tasks/%d" % (graph_id, async_task_id) code, res = Request().request(method='get', path=url, types="hubble") return code, res
def upload_file_next_step(graph_id, job_id, auth=None): """ 上传文件完成,点击下一步 :param auth: :param graph_id: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/upload-file/next-step" % ( graph_id, job_id) code, res = Request().request(method='put', path=url, types="hubble") return code, res
def query_all_file_mapping(graph_id, job_id, auth=None): """ 查看所有文件映射 :param auth: :param graph_id: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/file-mappings" % ( graph_id, job_id) code, res = Request().request(method='get', path=url, types="hubble") return code, res
def get_graph_connect(param=None, auth=None): """ 查看图链接 :param param: :param auth: :return: """ url = '/api/v1.2/graph-connections' code, res = Request().request(method="get", path=url, params=param, types="hubble") return code, res
def reuse_edgeLabel(body, graph_id, auth=None): """ :param body: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/schema/edgelabels/reuse" % graph_id code, res = Request().request(method='post', path=url, json=body, types="hubble") return code, res
def delete_property(graph_id, param=None, auth=None): """ :param param: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/schema/propertykeys" % graph_id code, res = Request().request(method='delete', path=url, params=param, types="hubble") return code, res
def add_graph_connect(body, auth=None): """ 添加图链接 :param auth: :param body :return: """ url = "/api/v1.2/graph-connections" code, res = Request().request(method="post", path=url, json=body, types="hubble") return code, res
def create_property(body, graph_id, auth=None): """ :param body: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/schema/propertykeys" % graph_id code, res = Request().request(method='post', path=url, json=body, types="hubble") return code, res
def gremlin_task(body, graph_id, auth=None): """ 执行GREMLIN任务 :param body: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/gremlin-query/async-task" % graph_id code, res = Request().request(method='post', path=url, json=body, types="hubble") return code, res
def update_graph_connect(graph_id, body, auth=None): """ 修改图链接 :param auth: :param graph_id: :param body: :return: """ url = '/api/v1.2/graph-connections/%d' % graph_id code, res = Request().request(method="put", path=url, types="hubble", json=body) return code, res
def view_async_tasks_all(graph_id, param=None, auth=None): """ 查看所有异步任务 :param param: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/async-tasks" % graph_id code, res = Request().request(method='get', path=url, params=param, types="hubble") return code, res
def collect_query_statement(body, graph_id, auth=None): """ 收藏语句 :param auth: :param body: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/gremlin-collections" % graph_id code, res = Request().request(method='post', json=body, path=url, types="hubble") return code, res
def delete_index(name, graph_id, auth=None): """ 删除indexLabel删除 :param name: :param auth: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/schema/indexlabels/%s" % ( graph_id, name) code, res = Request().request(method='delete', path=url, types="hubble") return code, res
def delete_load_job(graph_id, job_id, auth=None): """ 删除导入任务 :param auth: :param graph_id: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d" % (graph_id, job_id) code, res = Request().request(method='delete', path=url, types="hubble") return code, res
def create_load_job(body, graph_id, auth=None): """ 创建导入任务 :param auth: :param body: :param graph_id: :return: """ url = "/api/v1.2/graph-connections/%d/job-manager" % graph_id code, res = Request().request(method='post', json=body, path=url, types="hubble") return code, res
def delete_edgeLabel(graph_id, param=None, auth=None): """ 删除edgeLabel :param param: {} :param graph_id: :param auth: :return: """ url = "/api/v1.2/graph-connections/%d/schema/edgelabels" % graph_id code, res = Request().request(method='delete', path=url, params=param, types="hubble") return code, res
def delete_edge_mapping(graph_id, job_id, file_id, edge_id, auth=None): """ 删除边映射 :param auth: :param graph_id: :param job_id:导入任务ID :param file_id:文件ID :param edge_id:边映射ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/file-mappings/%d/edge-mappings/%s" % ( graph_id, job_id, file_id, edge_id) code, res = Request().request(method='delete', path=url, types="hubble") return code, res
def get_loadfile_token(graph_id, job_id, param=None, auth=None): """ 获取文件token :param auth: :param graph_id: :param job_id:导入任务ID :param param: :return: ?names=movie.csv """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/upload-file/token" % ( graph_id, job_id) code, res = Request().request(method='get', path=url, params=param, types="hubble") return code, res
def retry_load(graph_id, job_id, param, auth=None): """ 重试导入 :param auth: :param graph_id: :param param: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/load-tasks/retry" % ( graph_id, job_id) code, res = Request().request(method='post', path=url, params=param, types="hubble") return code, res
def update_load_job(body, graph_id, job_id, auth=None): """ 修改导入任务名称 :param auth: :param graph_id: :param job_id:导入任务ID :param body:需要修改的名称 :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d" % (graph_id, job_id) code, res = Request().request(method='put', path=url, json=body, types="hubble") return code, res
def add_load_setting(body, graph_id, job_id, auth=None): """ 添加导入设置 :param body: :param auth: :param graph_id: :param job_id:导入任务ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/file-mappings/load-parameter" % ( graph_id, job_id) code, res = Request().request(method='post', path=url, json=body, types="hubble") return code, res
def add_edge_mapping(body, graph_id, job_id, file_id, auth=None): """ 添加边映射 :param body: :param auth: :param graph_id: :param job_id:导入任务ID :param file_id:文件ID :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/file-mappings/%d/edge-mappings" % ( graph_id, job_id, file_id) code, res = Request().request(method='post', path=url, json=body, types="hubble") return code, res
def delete_file(graph_id, job_id, file_name, param, auth=None): """ 删除文件 :param auth: :param graph_id: :param file_name:需要上传一个字典 {"file": open("./add_data/finally.csv", 'rb')} :param job_id:导入任务ID :param param: total=1&index=1&name=finally.csv&token= :return: """ url = "/api/v1.2/graph-connections/%d/job-manager/%d/upload-file" % ( graph_id, job_id) code, res = Request().request(method='post', path=url, params=param, files=file_name, types="hubble") return code, res