mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
42 lines
682 B
Text
42 lines
682 B
Text
|
|
#!/usr/bin/env python3
|
||
|
|
|
||
|
|
import requests
|
||
|
|
import json
|
||
|
|
import sys
|
||
|
|
import base64
|
||
|
|
import time
|
||
|
|
|
||
|
|
url = "http://localhost:8088/api/v1/"
|
||
|
|
|
||
|
|
############################################################################
|
||
|
|
|
||
|
|
proc_id = "2714fc72-44ab-45f2-94dd-6773fc336535"
|
||
|
|
|
||
|
|
input = {
|
||
|
|
"operation": "remove-processing",
|
||
|
|
"user": "trustgraph",
|
||
|
|
"processing-id": proc_id,
|
||
|
|
}
|
||
|
|
|
||
|
|
resp = requests.post(
|
||
|
|
f"{url}librarian",
|
||
|
|
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)
|
||
|
|
|
||
|
|
############################################################################
|
||
|
|
|