Simon Willison’s Weblog

Subscribe

API ready for testing, first video status update

2nd March 2021

Originally posted to my internal blog at VaccinateCA

To celebrate GitHub’s new support for drag-and-dropping mp4 files into Markdown, I decided to switch things around a little and include a video update with today’s blog entry.

Here’s a demonstration of where I’ve got to with the Django+PostgreSQL backend project—as a 2m33s MP4 video:

[Video omitted as it includes screenshots of names and email addresses for our reporters]

That’s a shame, it looks like it doesn’t show a preview, just a link. I’ll add a screenshot to make this more visually interesting.

image

The big news today is that I have a working initial version of the submitReport API, along with an API explorer for testing it out!

Visit https://vaccinateca-preview.herokuapp.com/api/submitReport/debug to try it out.

You need a JWT token. The easiest way to get one of those is to log in to the https://vaccinateca-preview.herokuapp.com/ site (or log out and log back in) and then visit the https://vaccinateca-preview.herokuapp.com/api/submitReport/debug page again—this will pre-fill the JWT field with your current token.

Then you can paste in example POST bodies from our logs at https://airtable.com/tblvSiTbFMdCxv0Bq/viwJE9fQEfeHtPScq?blocks=hide and see what happens!

Here’s an animated GIF demo of the API explorer in case you’re too busy to watch the 2m33s video.

demo

More examples you can copy and paste into the demo:

{
    "Location": "recaQlVkkI1rNarvx",
    "Availability": [
        "No: may be a vaccination site in the future"
    ],
    "Notes": "March 2: recommended to check their website for new availability in a week or more",
    "Internal Notes": ""
}
{
    "Location": "recgDrq7aQMo0M5x7",
    "Appointment scheduling instructions": "www.walgreens.com",
    "Availability": [
        "Yes: vaccinating 65+",
        "Yes: appointment required",
        "Vaccinating essential workers"
    ],
    "Notes": "Check the Walgreens site regularly to see when appointments open up.",
    "Internal Notes": ""
}
{
    "Location": "recPns4QkB3Vrh1Bp",
    "Appointments by phone?": true,
    "Appointment scheduling instructions": "(888) 909-5232 - Press 1 if you meet the criteria (65+ y/o and tier 1 workers)",
    "Availability": [
        "Yes: vaccinating 65+",
        "Yes: appointment required"
    ],
    "Notes": "",
    "Internal Notes": ""
}
{
    "Location": "recOUvNBttZSHegD5",
    "Availability": [
        "No: may be a vaccination site in the future"
    ],
    "Notes": "3/2 - They do not have the vaccine at this time but they said to check the Walgreens.com site for updates.\nFeb 27: not sure when they'll have the vaccines but in the meantime, it's recommended to establish yourself on their website (or smartphone app) so that you can be ready to make an appt",
    "Internal Notes": ""
}
{
    "Location": "recKoseUfWFeK9TjB",
    "Availability": [
        "No: will never be a vaccination site"
    ],
    "Notes": "",
    "Internal Notes": "Press 4 for pharmacy.  They said they were at first going to had COVID vaccines, but they changed their minds.\n"
}

You can also track progress on the API in issue 25.

Everything else I worked on today can be found in the commit history. I wrote up the trick I’m using for timezones in the Django Admin in this TIL.

This is API ready for testing, first video status update by Simon Willison, posted on 2nd March 2021.

Part of series VaccinateCA internal blog

  1. Importing data from Airtable into Django, plus a search engine for all our code - Feb. 24, 2021, 5 p.m.
  2. Django admin customization, JSON in our PostgreSQL - Feb. 25, 2021, 5 p.m.
  3. Drawing the rest of the owl - March 1, 2021, 5 p.m.
  4. API ready for testing, first video status update - March 2, 2021, 5 p.m.
  5. Replaying logs to exercise the new API - March 3, 2021, 5 p.m.
  6. The simplest possible call queue - March 6, 2021, 5 p.m.
  7. New call queue ready to test. Also geography. - March 7, 2021, 5 p.m.
  8. … more

Next: Replaying logs to exercise the new API

Previous: Drawing the rest of the owl