Skip to content

Load Concept Map

David Alejandro Molano Vásquez edited this page Feb 11, 2020 · 2 revisions

Load Concept Map

This endpoint allows an authenticated user to load one concept map. Accepts GET requests. If an authenticated user with rol "Student" tries to load a base concept map the endpoint rejects the operation. The request must provide the following fields:

  • Concept Map id: This parameter is passed by URL.
URL /api/cpt-map/<concept_map_id>
Method GET
URL Params concept_map_id
Data Params
{  "title": [string],  "concepts": [array],  "propositons": [array]}
Success Response
Code: 204
None
Error Response
Code: 404
{"Error": "Invalid ConceptMap id"}
Error Response
Code: 401
{"Error": "Student cannot access base concept map"}

Concept array entry

Each entry on the concepts array has the following fields:

  • Text: The text of the concept
  • x: The x coordinate of the concept in the concept map. This is for reloading purposes.
  • y: The y coordinate of the concept in the concept map. This is for reloading purposes.
  • id: Identifier of the concept, in order to store its relations with propositions and other concepts.
{
   "text": [string],
   "x": [number],
   "y": [number],
   "id": [string]
}

Proposition array entry

Each entry on the propositions array has the following fields:

  • Text: The text of the proposition.
  • frm: The identifier of the concept from where the proposition starts.
  • to: The identifier of the concept from where the proposition goes.
{
   "text": [string],
   "frm": [string],
   "to": [string]
}

Clone this wiki locally