Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Restapivalidactionsbatch

Restapivalidactionsbatch

Last edited by Arturo Montejo Ráez Feb 03, 2016
Page history

<< Student

Enviar un lote de acciones grabadas

Operación

POST /stu/actions_batch

Petición

Se pasa un objeto JSON con el campo actions que contiene una lista de objetos action con los siguientes campos:

  • action: Acción a realizar: add | delete | select | show
  • attributes:
    • timestamp: marca de tiempo de la acción
    • id_sup: id del supervisor (opcional)
    • id_stu: id del alumno
    • id_dev: id del dispositivo
    • picto: descripción del picto (cadena que representa un JSON)

Ejemplo de petición:

POST /stu/actions_batch

{
  "actions": [
    {
      "action": "add",
      "attributes": {
        "id_stu": 3,
        "timestamp": "Web Nov 25 06:24:05 GMT 2015",
        "picto": "{ 'picto': { 'id': 2718, 'uri': '/symbolstx/color/png/descriptives/hot_spicy.png', 'category': 9, 'source': 1, 'owner': null }, 'expression': { 'id': 7878, 'lang': 'es-es', 'text': 'condimentado', 'picto': 2718 }, 'attributes': { 'id_cat': 609, 'coord_x': 3, 'coord_y': 3, 'status': 'invisible', 'magnify': false, 'highlight': false } }"
      }
   },
   {
     "action": "delete"
     ...
   },
   ...]
}

Respuesta

Se recibe un mensaje de error {error: <mensaje>} o un JSON con un Ok y el número de acciones registradas.

Ejemplo de respuesta:

{
     result: "Ok",
     total: 34
}
  Clone repository
  • 20170328_isabellemonfort
  • 20170328_luisballesteros
  • 20170328_luisperez
  • Apiaction
  • Apiadminvalid
  • Apiattribute
  • Apidevicevalid
  • Apienrolment
  • Apiinstructionresource
  • Apiinstructionvalid
  • Apilearningunitresource
  • Apimetamethodvalid
  • Apimethod
  • Apimethodresource
  • Apimethodvalid
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.