API references should be by URL and internal ID. For example, on the legislation endpoint (http://www.councilmatic.org/api/v2/files/), the sponsors are referred only by URL. This is necessary for a well-connected REST interface, but is not sufficient for a useful interface considering conventions of REST-based JS frameworks in particular. It would be prudent to use a small object with {"id": "123", "uri": "http://..."} in favor of just a URI (though it is technically redundant).
I don't feel this way anymore. I see the aesthetic sense in using database ids for references, but I'm ok with using the URL as an identifier for the purposes of the REST interface.
API references should be by URL and internal ID. For example, on the legislation endpoint (http://www.councilmatic.org/api/v2/files/), the sponsors are referred only by URL. This is necessary for a well-connected REST interface, but is not sufficient for a useful interface considering conventions of REST-based JS frameworks in particular. It would be prudent to use a small object with
{"id": "123", "uri": "http://..."}
in favor of just a URI (though it is technically redundant).Also, all resources should include their own URI in their definition. For example, a councilmember (http://www.councilmatic.org/api/v2/councilmembers/29) has no self-uri reference.