User Tools

Site Tools


api1:knowledge_structure:knowledge_edge

The content’s structure is symbolized by knowledge edges. Knowledge edges are the last objects to instantiate while setting up your content on our API. It gives you a simple way to build your learning path.

 Knowledge Edge example

Object resources

Property Type Description
knowledge_graph_id Integer The knowledge graph the knowledge edge belongs to
source_node_id Integer The source node of the knowledge edge
destination_node_id Integer The destination node of the knowledge edge
instance_id Integer The instance the knowledge edge belongs to
direct Boolean A direct prerequisite link. If false, abstract link between source and destination nodes
hops Integer Number of links between source and destination nodes
distance Integer Number of nodes between source and destination nodes
created_at Timestamp The creation date of the object
updated_at Timestamp The last update date of the object

Create (POST)

Method POST
URL /knowledge_edges
Parameters (*Requiered parameters)
Property Type Description
knowledge_graph_id* Integer The knowledge graph the knowledge edge belongs to
source_node_id* Integer The source node of the knowledge edge
destination_node_id* Integer The destination node of the knowledge edge
Send the request (JSON input example)
{
	knowledge_graph_id: 1,
	source_node_id: 1,
	destination_node_id: 2
}
Get the response (JSON output example)
{
	id: 1,
	knowledge_graph_id: 1,
	source_node_id: 1,
	destination_node_id: 2,
	instance_id : 1,
	created_at : 2014-09-17 09:21:03,
	updated_at : 2014-09-17 09:21:03
}

Fetch (GET)

Method GET
URL /knowledge_edges/{knowledge_edge_id}

If no knowledge_edge_id is provided it will fetch all the Knowledge Edges for your instance.

Get the response (JSON output example)

With ID provided

{
	id: 1,
	knowledge_graph_id: 1,
	source_node_id: 1,
	destination_node_id: 2,
	instance_id : 1,
	direct: true,
	hops: 1,
	distance: 1,
	created_at : 2014-09-17 09:21:03,
	updated_at : 2014-09-17 09:21:03
}

Without ID provided

[
	{
		id: 1,
		knowledge_graph_id: 1,
		source_node_id: 1,
		destination_node_id: 2
	},
	{
		id: 2,
		knowledge_graph_id: 1,
		source_node_id: 1,
		destination_node_id: 3
	}
]

Fetch Knowledge Edges by Knowledge Node (GET)

You can get all related Knowledge Edges for a given Source Knowledge Node

Method GET
URL /knowledge_nodes/{knowledge_node_id}/knowledge_edges
api1/knowledge_structure/knowledge_edge.txt · Last modified: 2017/10/17 10:22 by maries