Skip to content

API Data item

Elena edited this page Apr 5, 2021 · 6 revisions

Table of Contents

Description

The model stores code snapshots of user solutions from the TaskTracker plugin in the database. When the user clicks Submit, the plugin POSTs the Activity Tracker log and obtains its ID from the server, then POSTs the solution file(s) with this activityTrackerKey. Activity Tracker and TaskTracker files are stored in the database as pairs. After sending, the user files on the workstation are purged and ready to register user activity data for another solution.

Model

Field Type Description
id String Internal MongoDB ObjectId.
externalDiId Integer External ID represented in public fields as id.
codePath String Path to the file with code snapshots.
activityTrackerKey String External ActivityTracker item ID.

Public fields

Field Type Description
id Integer External ID.--
codePath String Path to the file with code snapshots.
activityTrackerKey String External ActivityTracker ID. Can be -1, if the activity-tracker-item does not exist.

Operations

Create a TaskTracker item

Operation

Endpoint Method Description
/api/data-item POST Save a TaskTracker file with code snapshots in the database.

Request parameters

Parameter Type Description
tasktracker File TaskTracker file (in .csv format).
activityTrackerKey Number activity-tracker-item external ID. Optional.

Response

The external ID of the submitted TaskTracker file with code snapshots.

Request example in Postman


Get TaskTracker items

Operation

Endpoint Method Description
/api/data-item/all GET Get metadata for all TaskTracker files.

Request parameters

Empty body.

Response

List of TaskTracker files with metadata—public fields of the data-item model.


Get a TaskTracker item

Operation

Endpoint Method Description
/api/data-item/:id GET Get metadata for a TaskTracker file by its external ID.

Request parameters

Empty body.

Response

Metadata for the respective TaskTracker file—public fields of the data-item model.