This commit is contained in:
Cyber MacGeddon 2025-05-06 23:21:51 +01:00
parent 3ca709e2ab
commit 51b23ab1ca
3 changed files with 127 additions and 0 deletions

38
test-api/test-knowledge-list Executable file
View file

@ -0,0 +1,38 @@
#!/usr/bin/env python3
import requests
import json
import sys
import base64
import time
url = "http://localhost:8088/api/v1/"
############################################################################
input = {
"operation": "list-kg-cores",
"user": "trustgraph",
}
resp = requests.post(
f"{url}knowledge",
json=input,
)
print(resp.text)
resp = resp.json()
print(resp)
if "error" in resp:
print(f"Error: {resp['error']}")
sys.exit(1)
# print(resp["response"])
print(resp)
sys.exit(0)
############################################################################