Skip to content

Internal API usage overview

Stellan Lagerström edited this page Jun 11, 2019 · 4 revisions

Submission of data (app->backend)

  1. The app writes each form instance answers into a JSON file.
  2. The JSON file is then packed into a zip file.
  3. The zip file is stored in the S3 bucket, /devicezip folder, using the awsXxx credentials.
  4. Any media files are stored in the /images folder.
  5. The app then triggers the ingestion process by calling GET /processor?action=submit&formID=nnnn&fileName=5174ef3c-f2ba-4a32-a4f6-b2ad7d82d0ce.zip{+device-identifying info}
  6. ProcessorServlet checks that the formID exists, and forks to a task (on the default queue) at /app_worker/task?action=processFile&fileName=xxxx{+device-identifying info}
  7. TaskServlet tries to fetch and extract the file from the zipfile. If that fails, it will retry 7 times at 20-second intervals.
  8. A DeviceFile entity is created in the DS, and the answers are parsed.
Clone this wiki locally