- Database will hold ~1e7 records over its lifetime (this estimate accounts for ~10 revisions per record)
- Records will be revisable, and a complete history of each record will be preserved
- Some endpoints:
/: Login with CLASSE ID/add: POST new records to add to the database- Only the user of the python process described below may use this endpoint
- GET: not allowed
/edit?id=<record ID>: Edit a record- Only some fields should be editable
- Not every user may edit any record
- GET: Respond with a form to edit the record
- POST: "Update" the record in the database with JSON provided in the body of the request
- To preserve revision history, "update" might really mean "add a new record that's the same as the old record except for the updated fields and the
versionfield, which has been incremented".
- To preserve revision history, "update" might really mean "add a new record that's the same as the old record except for the updated fields and the
/search: Search for records- GET: Respond with a form so users with no knowledge of the database's query syntax can perform "advanced" searches. For example:
- Find records whose
startTimefield is within a certain range and whosebtrfield contains a certain string - Find records whose
btrfield exactly match a certain string and whosespecCommandfield exactly matches either one of two strings
- Find records whose
- POST: Perform search using parameters from the form
- Respond with matching records presented in a table
- Columns should be interactive: add, remove, re-order, sort-by
- GET: Respond with a form so users with no knowledge of the database's query syntax can perform "advanced" searches. For example:
- Periodically look for new SPEC scans on the CHESS DAQ, generate appropriate records for them, and submit them to the database by POST-ing them as JSON in the body of a request to
/addon the server sketched above.