Basic api infrastructure.
Api file downloads will come next.