Skip to main content
Glama
10.nebula插件.md2.23 kB
--- title: "nebula插件" date: "2023-08-16T09:16:55.000Z" permalink: "/pages/5f9028/" --- # 引入依赖 <dependency> <groupId>org.ssssssss</groupId> <artifactId>magic-api-plugin-nebula</artifactId> <version>magic-api-lastest-version</version> </dependency> # 配置 nebula: hostAddress: ${NEBULA_HOSTADDRESS:localhost:9669} userName: ${NEBULA_USERNAME:root} password: ${NEBULA_PASSWORD:nebula} # 使用 import nebula; var ngsl = """" USE db_name;MATCH p_=(p:`assignee`)-[*3]-(p2:`transferor`) where id(p2) == "阿里巴巴" or id(p)== "阿里巴巴" RETURN p_ limit 1000' """ var resultJson = nebula.executeJson(ngsl) nebula.convert(resultJson) nebula.executeNebulaModel(ngsl) 其他支持的方法不太常用, 这里不再一一列举, 可参考源码 org.ssssssss.magicapi.nebula.NebulaModule # 返回的数据格式为: 该结构的数据可被很多前端组件库支持进行可视化展示 如: angv G6 { "code": 0, "message": "success", "data": { "nodes": [ { "edgeSize": 1, "assignee.name": "", "type": "vertex", "assignee.addr": "", "assignee.legal_person": "周勇", "registrant.addr": "", "registrant.name": "", "id": "", "assignee.type": "" }, { "edgeSize": 15, "type": "vertex", "transferor.name": "", "transferor.legal_person": "", "transferor.type": "企业", "transferor.addr": "", "registrant.addr": "", "registrant.name": "", "id": "" }, ... ], "edges": [ { "dst": "", "src": "", "source": "", "label": "trans_with", "type": "edge", "target": "", "name": "trans_with", "ranking": 0, "value": 0 },... ] }, "timestamp": 1692149280167, "requestTime": 1692149280143, "executeTime": 24 }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dwsy/magic-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server