Skip to content
Yasushi Sakai edited this page May 23, 2019 · 2 revisions

cityio program proposal v0.3.0

Proposal for the next version of cityio. Note that this is not a format change.

criteria

  1. backward compatibility (no breaking changes for current clients)
  2. stability
  3. speed

new rules

  1. posting empty {} objects will be rejected
  2. meta now holds a hash tree for each module

new endpoints

1.deep get

[GET] https://cityio.media.mit.edu/api/table/:table_name/:field/:deep/:deep/:deep/...
  • collision with /api/table/clear/{table_name} endpoint...
  • the posting table under the name of clear will be discarded

2.module data post

[POST] https://cityio.media.mit.edu/api/table/update/:table_name/:module_name/

  • note that unlike the deep get, this only allows posting data to the root level
  • propagates empty field if table does not yet exist
  • [GET] /api/table/clear/:table_name ? clears all data under :table_name
  • [POST] /api/table/update/:table_name/meta will be rejected, meta will be reserved for server

next?

curl -X GET https://cityio.media.mit.edu/api/archive/table/{table_id}

where {table_id} is in table.meta.id

curl -X GET https://cityio.media.mit.edu/api/archive/table/{table_name}

get tables archived in db. (needs a limit?)