I am trying to learn the open311 API and have a few questions
regarding some of its intent:
* API Key: the URL schema given is `
http://api.dc.gov/api_name/
version/method.format?apikey=YOUR_KEY¶ms` , what is the reason for
the api key? Is this just a substitute for auth while open311 is in
the "beta" phase? will this eventually be replaced by auth?
* for the application registration,
http://api.dc.gov/key , it wants
an application URL. Does this mean I shouldn't register for a key
until I have the application deployed somewhere? Then give it some
base URL equivalent to
http://api.dc.gov/myappname/beta? Will you
forward requests to my service? Or...?
* can the `version` part of the URL be anything? what should it be?
* is there a reason for the 'meta_' prefix of 'meta_getTypesList' and
'meta_getTypeDefinition'? is there a reason for it, or just to make
it look more semantic?
* looking at the JSON from `
http://api.dc.gov/open311/v1/
meta_getTypesList.json`:
"""
{"servicetype": [{"servicetype": "Traffic Signals"}, {"servicecode":
"S0436"}]}, {"servicetype": [{"servicetype": "Traffic Signs"},
{"servicecode": "S0376"}]}, {"servicetype": [{"servicetype": "Trash
Collection"}, {"servicecode": "S0441"}]}, {"servicetype":
[{"servicetype": "Tree Emergency"}, {"servicecode": "S0457"}]},
{"servicetype": [{"servicetype": "Tree Maintenance"}, {"servicecode":
"S0456"}]}, {"servicetype": [{"servicetype": "Tree Planting"},
{"servicecode": "S04TP"}]},
"""
My first question is: why a list of hashes all with the same key? I
don't know, maybe there's a good reason.
My second question is: why a service code? Is anything gained by
this? To me it just adds obscurity.
In general, is the JSON from the examples supposed to be what the JSON
looks like? Or is this flexible? If it is canonical, then maybe it
should be documented.
* for the `meta_TypeDefinition` example,
http://api.dc.gov/open311/v1/meta_getTypeDefinition.json?servicecode=S0000
, The format for fields is only implicit in the example, which I find
disturbing. Again, the format is a bit different from what I
expected. Maybe its worth documenting what this should look like? I
don't know if putting such HTML-ish verbosing like {"type":
"DropDown "} is a good idea. Thoughts?
* for the `submit` method, should the application store its own
data? or should it interface with some back-end store that already
exists? (i guess this question is also important for the `get`
method)
Thanks! Sorry for the barrage.
Jeff