website / docs /postman /collection.json
Andrej Janchevski
feat(coins): add sample-query endpoint and resolve Freebase MIDs to names
db54566
{
"info": {
"name": "Scalable Graph ML Research API",
"description": "REST API for testing PhD research methods from \"Scalable Methods for Knowledge Graph Reasoning and Generation\" (Andrej Janchevski, EPFL, 2025).",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "base_url",
"value": "http://localhost:8000/api/v1"
},
{
"key": "multiprox_state",
"value": ""
}
],
"item": [
{
"name": "Health",
"item": [
{
"name": "GET / (API root)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/",
"host": ["{{base_url}}"],
"path": [""]
},
"description": "API root. Returns name, version, description, and full endpoint directory."
}
},
{
"name": "GET /health",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/health",
"host": ["{{base_url}}"],
"path": ["health"]
},
"description": "Server health check. Returns which model groups are loaded."
}
},
{
"name": "GET /methods",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/methods",
"host": ["{{base_url}}"],
"path": ["methods"]
},
"description": "List the 3 research methods."
}
},
{
"name": "POST /debug/force-unlock",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/debug/force-unlock",
"host": ["{{base_url}}"],
"path": ["debug", "force-unlock"]
},
"description": "Force-release a stuck inference lock. Only available in DEBUG mode."
}
}
]
},
{
"name": "COINs - Discovery",
"item": [
{
"name": "GET /coins/datasets",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/datasets",
"host": ["{{base_url}}"],
"path": ["coins", "datasets"]
},
"description": "List KG datasets with entity/relation counts."
}
},
{
"name": "GET /coins/datasets/{id}/entities",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/datasets/wordnet/entities?page=1&page_size=10&q=dog",
"host": ["{{base_url}}"],
"path": ["coins", "datasets", "wordnet", "entities"],
"query": [
{ "key": "page", "value": "1" },
{ "key": "page_size", "value": "10" },
{ "key": "q", "value": "dog", "description": "Substring search filter" }
]
},
"description": "Paginated, searchable entity list."
}
},
{
"name": "GET /coins/datasets/{id}/relations",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/datasets/wordnet/relations?page=1&page_size=10&q=hyper",
"host": ["{{base_url}}"],
"path": ["coins", "datasets", "wordnet", "relations"],
"query": [
{ "key": "page", "value": "1" },
{ "key": "page_size", "value": "10" },
{ "key": "q", "value": "hyper", "description": "Substring search filter" }
]
},
"description": "Paginated, searchable relation list."
}
},
{
"name": "GET /coins/datasets/{id}/sample-triples",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/datasets/wordnet/sample-triples?count=5&seed=2026-04-15",
"host": ["{{base_url}}"],
"path": ["coins", "datasets", "wordnet", "sample-triples"],
"query": [
{ "key": "count", "value": "5" },
{ "key": "seed", "value": "2026-04-15", "description": "Optional. When provided, sampling is deterministic (same seed + count ⇒ same triples). Omit for random." }
]
},
"description": "Random sample triples from the dataset. Each triple has head/relation/tail entries with { id, name, label }; `label` is a dataset-specific display-friendly form of `name` (NELL strips `concept:` prefixes, Freebase strips `/m/`, WordNet drops the POS suffix). Pass an optional `seed` (any string) for deterministic sampling — e.g. seed by today's ISO date for a day-stable 'fact of the day' widget."
}
},
{
"name": "GET /coins/datasets/{id}/sample-query",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/datasets/nell/sample-query?query_structure=2i&count=1&seed=2026-04-17",
"host": ["{{base_url}}"],
"path": ["coins", "datasets", "nell", "sample-query"],
"query": [
{ "key": "query_structure", "value": "2i", "description": "Required. One of: 1p, 2p, 3p, 2i, 3i, ip, pi." },
{ "key": "count", "value": "1", "description": "Number of sample queries (max 10)." },
{ "key": "seed", "value": "2026-04-17", "description": "Optional. Deterministic sampling when provided." }
]
},
"description": "Sample a structurally valid KG query by walking the training graph. Returns anchors, relations, and a known target entity that form a real path/intersection. Keys in `anchors` and `relations` match the node/edge IDs from GET /coins/query-structures. Preferred over sample-triples for multi-hop and intersection query prefills."
}
},
{
"name": "GET /coins/models",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/models",
"host": ["{{base_url}}"],
"path": ["coins", "models"]
},
"description": "List embedding algorithms with supported query structures."
}
},
{
"name": "GET /coins/query-structures",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/coins/query-structures",
"host": ["{{base_url}}"],
"path": ["coins", "query-structures"]
},
"description": "Query structure graph templates for frontend rendering."
}
}
]
},
{
"name": "COINs - Inference",
"item": [
{
"name": "POST /coins/predict (1p - single hop)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"rotate\",\n \"query_structure\": \"1p\",\n \"anchors\": {\"a\": 11754},\n \"variables\": {},\n \"relations\": {\"r1\": 3},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Single hop link prediction."
}
},
{
"name": "POST /coins/predict (2i - intersection)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"2i\",\n \"anchors\": {\"a1\": 0, \"a2\": 6744},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 4},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Two-way intersection query answering."
}
},
{
"name": "POST /coins/predict (ip - intersection then projection)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"ip\",\n \"anchors\": {\"a1\": 17274, \"a2\": 20065},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 4, \"r3\": 1},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Intersection then projection query answering."
}
},
{
"name": "POST /coins/predict (2p - variable unspecified)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"2p\",\n \"anchors\": {\"a\": 0},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 1},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Two-hop chain; intermediate variable sampled automatically."
}
},
{
"name": "POST /coins/predict (2p - variable specified)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"2p\",\n \"anchors\": {\"a\": 0},\n \"variables\": {\"v1\": 39522},\n \"relations\": {\"r1\": 3, \"r2\": 1},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Two-hop chain; intermediate variable pinned to entity 5432."
}
},
{
"name": "POST /coins/predict (pi - projection then intersection)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"pi\",\n \"anchors\": {\"a1\": 0, \"a2\": 32953},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 3, \"r3\": 1},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Projection then intersection query answering."
}
},
{
"name": "POST /coins/predict (3i - three-way intersection)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"3i\",\n \"anchors\": {\"a1\": 0, \"a2\": 6744, \"a3\": 24892},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 4, \"r3\": 1},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Three-way intersection query answering."
}
},
{
"name": "POST /coins/predict (3p - three hop)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"q2b\",\n \"query_structure\": \"3p\",\n \"anchors\": {\"a\": 0},\n \"variables\": {},\n \"relations\": {\"r1\": 3, \"r2\": 1, \"r3\": 3},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Three-hop chain query answering."
}
},
{
"name": "POST /coins/predict (kbgat 1p)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"algorithm\": \"kbgat\",\n \"query_structure\": \"1p\",\n \"anchors\": {\"a\": 11754},\n \"variables\": {},\n \"relations\": {\"r1\": 3},\n \"top_k\": 10\n}"
},
"url": {
"raw": "{{base_url}}/coins/predict",
"host": ["{{base_url}}"],
"path": ["coins", "predict"]
},
"description": "Single hop link prediction with KBGAT."
}
}
]
},
{
"name": "Graph Generation - Discovery",
"item": [
{
"name": "GET /graph-generation/datasets",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/graph-generation/datasets",
"host": ["{{base_url}}"],
"path": ["graph-generation", "datasets"]
},
"description": "List graph generation datasets (QM9, Community20)."
}
},
{
"name": "GET /graph-generation/sampling-modes",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/graph-generation/sampling-modes",
"host": ["{{base_url}}"],
"path": ["graph-generation", "sampling-modes"]
},
"description": "List sampling strategies (standard, multiprox)."
}
}
]
},
{
"name": "Graph Generation - Inference",
"item": [
{
"name": "POST /graph-generation/generate (standard, QM9, discrete)",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"qm9\",\n \"model_type\": \"discrete\",\n \"sampling_mode\": \"standard\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"chain_frames\": 30\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "Standard denoising on QM9 molecules (discrete model). Returns final PNG image + chain GIF."
}
},
{
"name": "POST /graph-generation/generate (standard, QM9, continuous)",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"qm9\",\n \"model_type\": \"continuous\",\n \"sampling_mode\": \"standard\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"chain_frames\": 30\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "Standard denoising on QM9 molecules (continuous/lifted model). Returns final PNG image + chain GIF."
}
},
{
"name": "POST /graph-generation/generate (standard, comm20, discrete)",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"comm20\",\n \"model_type\": \"discrete\",\n \"sampling_mode\": \"standard\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"chain_frames\": 30\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "Standard denoising on Community20 graphs (discrete model). Returns final PNG image + chain GIF."
}
},
{
"name": "POST /graph-generation/generate (standard, comm20, continuous)",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"comm20\",\n \"model_type\": \"continuous\",\n \"sampling_mode\": \"standard\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"chain_frames\": 30\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "Standard denoising on Community20 graphs (continuous/lifted model). Returns final PNG image + chain GIF."
}
},
{
"name": "POST /graph-generation/generate (multiprox init, QM9, discrete)",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["// Extract state from the SSE result event and store as collection variable", "var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) {", " pm.collectionVariables.set('multiprox_state', result.state);", " console.log('State saved to {{multiprox_state}} (' + result.state.length + ' chars)');", " }", " } catch (e) { console.log('Failed to parse result event: ' + e); }", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"qm9\",\n \"model_type\": \"discrete\",\n \"sampling_mode\": \"multiprox\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"multiprox_params\": {\n \"n\": 10,\n \"m\": 100,\n \"t\": 0.5,\n \"t_prime\": 0.004,\n \"gibbs_chain_freq\": 10\n }\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "MultiProx Gibbs init on QM9 (discrete). Best params from thesis Table 4.3.1: t=50%, t'=0.4% of T. Returns step 0 image + state blob. State is auto-saved to {{multiprox_state}}."
}
},
{
"name": "POST /graph-generation/generate (multiprox init, QM9, continuous)",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) { pm.collectionVariables.set('multiprox_state', result.state); }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"qm9\",\n \"model_type\": \"continuous\",\n \"sampling_mode\": \"multiprox\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"multiprox_params\": {\n \"n\": 10,\n \"m\": 100,\n \"t\": 0.5,\n \"t_prime\": 0.004,\n \"gibbs_chain_freq\": 10\n }\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "MultiProx Gibbs init on QM9 (continuous/lifted). Best params from thesis Table 4.3.1: t=50%, t'=0.4% of T. Returns step 0 image + state blob. State is auto-saved to {{multiprox_state}}."
}
},
{
"name": "POST /graph-generation/generate (multiprox init, comm20, discrete)",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) { pm.collectionVariables.set('multiprox_state', result.state); }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"comm20\",\n \"model_type\": \"discrete\",\n \"sampling_mode\": \"multiprox\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"multiprox_params\": {\n \"n\": 10,\n \"m\": 100,\n \"t\": 0.4,\n \"t_prime\": 0.1,\n \"gibbs_chain_freq\": 10\n }\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "MultiProx Gibbs init on Community20 (discrete). Best params from thesis Table C.2.1: t=40%, t'=10% of T. Returns step 0 image + state blob. State is auto-saved to {{multiprox_state}}."
}
},
{
"name": "POST /graph-generation/generate (multiprox init, comm20, continuous)",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) { pm.collectionVariables.set('multiprox_state', result.state); }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"comm20\",\n \"model_type\": \"continuous\",\n \"sampling_mode\": \"multiprox\",\n \"num_nodes\": null,\n \"diffusion_steps\": 500,\n \"multiprox_params\": {\n \"n\": 10,\n \"m\": 100,\n \"t\": 0.4,\n \"t_prime\": 0.1,\n \"gibbs_chain_freq\": 10\n }\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/generate",
"host": ["{{base_url}}"],
"path": ["graph-generation", "generate"]
},
"description": "MultiProx Gibbs init on Community20 (continuous/lifted). Best params from thesis Table C.2.1: t=40%, t'=10% of T. Returns step 0 image + state blob. State is auto-saved to {{multiprox_state}}."
}
},
{
"name": "POST /graph-generation/continue",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["// Update state for chaining multiple continue calls", "var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) {", " pm.collectionVariables.set('multiprox_state', result.state);", " console.log('State updated (done=' + result.done + ', step=' + result.step + ')');", " }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"state\": \"{{multiprox_state}}\"\n}"
},
"url": {
"raw": "{{base_url}}/graph-generation/continue",
"host": ["{{base_url}}"],
"path": ["graph-generation", "continue"]
},
"description": "Advance MultiProx chain by gibbs_chain_freq inner steps. Uses {{multiprox_state}} from the last init/continue call. Can be fired repeatedly to chain steps."
}
}
]
},
{
"name": "KG Anomaly - Discovery",
"item": [
{
"name": "GET /kg-anomaly/datasets",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/kg-anomaly/datasets",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "datasets"]
},
"description": "List KG anomaly correction datasets."
}
},
{
"name": "GET /kg-anomaly/datasets/{id}/sample-subgraphs",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/kg-anomaly/datasets/wordnet/sample-subgraphs?count=3",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "datasets", "wordnet", "sample-subgraphs"],
"query": [
{ "key": "count", "value": "3" }
]
},
"description": "Pre-computed example subgraphs for correction (clean)."
}
},
{
"name": "GET /kg-anomaly/datasets/{id}/sample-subgraphs (noised, correct)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/kg-anomaly/datasets/wordnet/sample-subgraphs?count=3&noise_level=0.4&task=correct&seed=42",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "datasets", "wordnet", "sample-subgraphs"],
"query": [
{ "key": "count", "value": "3" },
{ "key": "noise_level", "value": "0.4" },
{ "key": "task", "value": "correct" },
{ "key": "seed", "value": "42" }
]
},
"description": "Pre-noised example subgraphs for the 'correct' task (only inpaint-mask region is corrupted)."
}
},
{
"name": "GET /kg-anomaly/datasets/{id}/sample-subgraphs (noised, generate)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/kg-anomaly/datasets/wordnet/sample-subgraphs?count=3&noise_level=0.4&task=generate&seed=43",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "datasets", "wordnet", "sample-subgraphs"],
"query": [
{ "key": "count", "value": "3" },
{ "key": "noise_level", "value": "0.4" },
{ "key": "task", "value": "generate" },
{ "key": "seed", "value": "43" }
]
},
"description": "Pre-noised example subgraphs for the 'generate' task (all edges corrupted)."
}
}
]
},
{
"name": "KG Anomaly - Inference",
"item": [
{
"name": "POST /kg-anomaly/correct (standard, correct task)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"sampling_mode\": \"standard\",\n \"task\": \"correct\",\n \"subgraph\": {\n \"nodes\": [\n {\"entity_id\": 28155, \"type_id\": 1},\n {\"entity_id\": 29348, \"type_id\": 4},\n {\"entity_id\": 29358, \"type_id\": 1},\n {\"entity_id\": 36247, \"type_id\": 1},\n {\"entity_id\": 36248, \"type_id\": 4},\n {\"entity_id\": 36855, \"type_id\": 1},\n {\"entity_id\": 36858, \"type_id\": 4},\n {\"entity_id\": 36860, \"type_id\": 4},\n {\"entity_id\": 36881, \"type_id\": 1},\n {\"entity_id\": 39993, \"type_id\": 1}\n ],\n \"edges\": [\n {\"source_idx\": 1, \"target_idx\": 2, \"relation_id\": 1},\n {\"source_idx\": 1, \"target_idx\": 3, \"relation_id\": 1},\n {\"source_idx\": 2, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 2, \"target_idx\": 4, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 4, \"relation_id\": 1},\n {\"source_idx\": 4, \"target_idx\": 2, \"relation_id\": 1},\n {\"source_idx\": 4, \"target_idx\": 3, \"relation_id\": 1},\n {\"source_idx\": 5, \"target_idx\": 6, \"relation_id\": 2},\n {\"source_idx\": 5, \"target_idx\": 7, \"relation_id\": 1},\n {\"source_idx\": 5, \"target_idx\": 8, \"relation_id\": 5},\n {\"source_idx\": 5, \"target_idx\": 9, \"relation_id\": 4},\n {\"source_idx\": 6, \"target_idx\": 4, \"relation_id\": 3},\n {\"source_idx\": 6, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 6, \"target_idx\": 8, \"relation_id\": 1},\n {\"source_idx\": 7, \"target_idx\": 5, \"relation_id\": 10},\n {\"source_idx\": 7, \"target_idx\": 6, \"relation_id\": 10},\n {\"source_idx\": 8, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 6, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 7, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 9, \"relation_id\": 1},\n {\"source_idx\": 9, \"target_idx\": 0, \"relation_id\": 3},\n {\"source_idx\": 9, \"target_idx\": 6, \"relation_id\": 10},\n {\"source_idx\": 9, \"target_idx\": 7, \"relation_id\": 3},\n {\"source_idx\": 9, \"target_idx\": 8, \"relation_id\": 10}\n ]\n },\n \"diffusion_steps\": 500,\n \"chain_frames\": 20\n}"
},
"url": {
"raw": "{{base_url}}/kg-anomaly/correct",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "correct"]
},
"description": "Standard correction with masking (fixed edges kept, masked edges corrected)."
}
},
{
"name": "POST /kg-anomaly/correct (standard, generate task)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"sampling_mode\": \"standard\",\n \"task\": \"generate\",\n \"subgraph\": {\n \"nodes\": [\n {\"entity_id\": 28155, \"type_id\": 1},\n {\"entity_id\": 29348, \"type_id\": 4},\n {\"entity_id\": 29358, \"type_id\": 1},\n {\"entity_id\": 36247, \"type_id\": 1},\n {\"entity_id\": 36248, \"type_id\": 4},\n {\"entity_id\": 36855, \"type_id\": 1},\n {\"entity_id\": 36858, \"type_id\": 4},\n {\"entity_id\": 36860, \"type_id\": 4},\n {\"entity_id\": 36881, \"type_id\": 1},\n {\"entity_id\": 39993, \"type_id\": 1}\n ],\n \"edges\": [\n {\"source_idx\": 0, \"target_idx\": 2, \"relation_id\": 10},\n {\"source_idx\": 0, \"target_idx\": 4, \"relation_id\": 2},\n {\"source_idx\": 1, \"target_idx\": 0, \"relation_id\": 0},\n {\"source_idx\": 1, \"target_idx\": 2, \"relation_id\": 2},\n {\"source_idx\": 1, \"target_idx\": 3, \"relation_id\": 1},\n {\"source_idx\": 1, \"target_idx\": 5, \"relation_id\": 9},\n {\"source_idx\": 1, \"target_idx\": 7, \"relation_id\": 7},\n {\"source_idx\": 1, \"target_idx\": 8, \"relation_id\": 3},\n {\"source_idx\": 2, \"target_idx\": 0, \"relation_id\": 7},\n {\"source_idx\": 2, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 2, \"target_idx\": 4, \"relation_id\": 5},\n {\"source_idx\": 2, \"target_idx\": 8, \"relation_id\": 10},\n {\"source_idx\": 2, \"target_idx\": 9, \"relation_id\": 2},\n {\"source_idx\": 3, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 4, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 5, \"relation_id\": 7},\n {\"source_idx\": 3, \"target_idx\": 6, \"relation_id\": 6},\n {\"source_idx\": 3, \"target_idx\": 7, \"relation_id\": 0},\n {\"source_idx\": 4, \"target_idx\": 2, \"relation_id\": 1},\n {\"source_idx\": 4, \"target_idx\": 3, \"relation_id\": 6},\n {\"source_idx\": 4, \"target_idx\": 6, \"relation_id\": 7},\n {\"source_idx\": 4, \"target_idx\": 7, \"relation_id\": 7},\n {\"source_idx\": 5, \"target_idx\": 4, \"relation_id\": 2},\n {\"source_idx\": 5, \"target_idx\": 6, \"relation_id\": 2},\n {\"source_idx\": 5, \"target_idx\": 7, \"relation_id\": 6},\n {\"source_idx\": 5, \"target_idx\": 8, \"relation_id\": 1},\n {\"source_idx\": 5, \"target_idx\": 9, \"relation_id\": 1},\n {\"source_idx\": 6, \"target_idx\": 0, \"relation_id\": 5},\n {\"source_idx\": 6, \"target_idx\": 3, \"relation_id\": 7},\n {\"source_idx\": 6, \"target_idx\": 4, \"relation_id\": 3},\n {\"source_idx\": 6, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 6, \"target_idx\": 7, \"relation_id\": 0},\n {\"source_idx\": 6, \"target_idx\": 8, \"relation_id\": 1},\n {\"source_idx\": 6, \"target_idx\": 9, \"relation_id\": 4},\n {\"source_idx\": 7, \"target_idx\": 2, \"relation_id\": 10},\n {\"source_idx\": 7, \"target_idx\": 5, \"relation_id\": 5},\n {\"source_idx\": 7, \"target_idx\": 6, \"relation_id\": 5},\n {\"source_idx\": 8, \"target_idx\": 0, \"relation_id\": 0},\n {\"source_idx\": 8, \"target_idx\": 2, \"relation_id\": 6},\n {\"source_idx\": 8, \"target_idx\": 4, \"relation_id\": 10},\n {\"source_idx\": 8, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 6, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 7, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 9, \"relation_id\": 0},\n {\"source_idx\": 9, \"target_idx\": 0, \"relation_id\": 3},\n {\"source_idx\": 9, \"target_idx\": 1, \"relation_id\": 8},\n {\"source_idx\": 9, \"target_idx\": 3, \"relation_id\": 5},\n {\"source_idx\": 9, \"target_idx\": 7, \"relation_id\": 5},\n {\"source_idx\": 9, \"target_idx\": 8, \"relation_id\": 1}\n ]\n },\n \"diffusion_steps\": 500,\n \"chain_frames\": 20\n}"
},
"url": {
"raw": "{{base_url}}/kg-anomaly/correct",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "correct"]
},
"description": "Generate all edges from scratch (no masking)."
}
},
{
"name": "POST /kg-anomaly/correct (multiprox init)",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) { pm.collectionVariables.set('multiprox_state', result.state); }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"dataset_id\": \"wordnet\",\n \"sampling_mode\": \"multiprox\",\n \"task\": \"correct\",\n \"subgraph\": {\n \"nodes\": [\n {\"entity_id\": 28155, \"type_id\": 1},\n {\"entity_id\": 29348, \"type_id\": 4},\n {\"entity_id\": 29358, \"type_id\": 1},\n {\"entity_id\": 36247, \"type_id\": 1},\n {\"entity_id\": 36248, \"type_id\": 4},\n {\"entity_id\": 36855, \"type_id\": 1},\n {\"entity_id\": 36858, \"type_id\": 4},\n {\"entity_id\": 36860, \"type_id\": 4},\n {\"entity_id\": 36881, \"type_id\": 1},\n {\"entity_id\": 39993, \"type_id\": 1}\n ],\n \"edges\": [\n {\"source_idx\": 1, \"target_idx\": 2, \"relation_id\": 1},\n {\"source_idx\": 1, \"target_idx\": 3, \"relation_id\": 1},\n {\"source_idx\": 2, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 2, \"target_idx\": 4, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 1, \"relation_id\": 1},\n {\"source_idx\": 3, \"target_idx\": 4, \"relation_id\": 1},\n {\"source_idx\": 4, \"target_idx\": 2, \"relation_id\": 1},\n {\"source_idx\": 4, \"target_idx\": 3, \"relation_id\": 1},\n {\"source_idx\": 5, \"target_idx\": 6, \"relation_id\": 2},\n {\"source_idx\": 5, \"target_idx\": 7, \"relation_id\": 1},\n {\"source_idx\": 5, \"target_idx\": 8, \"relation_id\": 5},\n {\"source_idx\": 5, \"target_idx\": 9, \"relation_id\": 4},\n {\"source_idx\": 6, \"target_idx\": 4, \"relation_id\": 3},\n {\"source_idx\": 6, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 6, \"target_idx\": 8, \"relation_id\": 1},\n {\"source_idx\": 7, \"target_idx\": 5, \"relation_id\": 10},\n {\"source_idx\": 7, \"target_idx\": 6, \"relation_id\": 10},\n {\"source_idx\": 8, \"target_idx\": 5, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 6, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 7, \"relation_id\": 1},\n {\"source_idx\": 8, \"target_idx\": 9, \"relation_id\": 1},\n {\"source_idx\": 9, \"target_idx\": 0, \"relation_id\": 3},\n {\"source_idx\": 9, \"target_idx\": 6, \"relation_id\": 10},\n {\"source_idx\": 9, \"target_idx\": 7, \"relation_id\": 3},\n {\"source_idx\": 9, \"target_idx\": 8, \"relation_id\": 10}\n ]\n },\n \"multiprox_params\": {\n \"n\": 10,\n \"m\": 100,\n \"t\": 0.4,\n \"t_prime\": 0.1,\n \"gibbs_chain_freq\": 10\n }\n}"
},
"url": {
"raw": "{{base_url}}/kg-anomaly/correct",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "correct"]
},
"description": "MultiProx Gibbs init on wordnet correction. SSE stream; the result event's state blob is auto-saved to {{multiprox_state}}."
}
},
{
"name": "POST /kg-anomaly/continue",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": ["var body = pm.response.text();", "var lines = body.split('\\n');", "for (var i = 0; i < lines.length; i++) {", " if (lines[i].trim() === 'event: result' && i + 1 < lines.length) {", " var dataLine = lines[i + 1].replace(/^data: /, '');", " try {", " var result = JSON.parse(dataLine);", " if (result.state) {", " pm.collectionVariables.set('multiprox_state', result.state);", " console.log('State updated (done=' + result.done + ', step=' + result.step + ')');", " }", " } catch (e) {}", " break;", " }", "}"]
}
}
],
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"state\": \"{{multiprox_state}}\"\n}"
},
"url": {
"raw": "{{base_url}}/kg-anomaly/continue",
"host": ["{{base_url}}"],
"path": ["kg-anomaly", "continue"]
},
"description": "Advance MultiProx correction by one step. Uses {{multiprox_state}}; can be chained repeatedly."
}
}
]
}
]
}