fablabbcn / smartcitizen-api

The Smart Citizen Engine
https://developer.smartcitizen.me
GNU Affero General Public License v3.0
10 stars 4 forks source link

Add models and endpoints for Experiments #343

Closed timcowlishaw closed 11 hours ago

timcowlishaw commented 1 month ago

Experiments are groups of devices which are being used as part of a single experiment.

An experiment has an optional start and end time, and is owned by a user - the user does not need to own the participating devices.

you get GET/PUT/PATCH/POST/DELETE to the /v0/experiments endpoint with json like:

    {
      "name": "test experiment",
      "description": "a test experiment",
      "is_test": false,
      "active": true,
      "starts_at": "2024-01-01T00:00:00Z",
      "ends_at": "2024-06-30T23:59:59Z",
      "device_ids": [ 123, 456, 789 ]
    }
oscgonfer commented 1 month ago

Final to-dos: