5 ms·
It might technically look like an API - but it could still not count as an API legally (for the constitutional trick) if the interface was not intended to be pu
by munk-a 5y ago
It might technically look like an API - but it could still not count as an API legally (for the constitutional trick) if the interface was not intended to be public.
If you want to stretch the terms, everything on and off the web that does communication is basically an API - it's just that some of those APIs use JSON to encode their data and make it really easy to access... and some of them bury it in mountains of HTML - but if the data is there the data is there. There really isn't a functional difference between a scraper that goes from TEXT => DATA and a json decoder that goes from TEXT => DATA except how easy it is to write and maintain it.
One outcome of this fight might be that government organizations are directed to use more proprietary communication methods which would be a poor outcome for everyone involved.
- monocasa 5y agoPrivately documented APIs are still APIs.
- munk-a 5y agoI don't disagree (though when it comes to this particular case it's a question of what the opinion of Swedish courts is) but there's just a lot of grey area there. Would you consider `ls` an API for exposing your filesystem?
- iamstupidsimple 5y ago> Would you consider `ls` an API for exposing your filesystem? I don't see why not. It has an interface for input and output, conforms to well known specifications and is publicly documented. There's also multiple implementations behind the API.
- randomswede 5y agoI would consider "ls" a presentation tool that uses an API to present information about a file system. I would consider stat/lstat/opendir/readdir/closedir the API that "ls" use to gather the information.
- monocasa 5y agoWhen you combine it with shell scripts, I'd say that ls is an API to itself.
- tsimionescu 5y ago> One outcome of this fight might be that government organizations are directed to use more proprietary communication methods which would be a poor outcome for everyone involved. I agree with the rest of your argument, but I think that this part is not necessarily a good example of the risks. Far easier would be to use a shared key between the app and the site, and thus use encryption to prevent reading the data, while still sending it in JSON over HTTPS. A pinned certificate would do the trick, at least on phones which prevent the user from inspecting app bundles.
- munk-a 5y agoI think it depends on the outcome of the case - I could see some possible resolution like the Swedish supreme court declaring that JSON counts as a public record and that forcing a block on prohibitive encryption of JSON endpoints offered by the government (assuming everything the OP said about constitutionality is correct). We've seen such bizarre technical decisions from high courts before.
- aliswe 5y agoI dont think the swedish legal system uses precedents though. Does that matter?
- munk-a 5y agoI don't know - I think all legal systems use precedents to a certain extent - they're just extremely formalized in America and Britain. Sorry but I'm not familiar enough with their system to reply with confidence but I would say that if a high court in a country rules a certain way, even if that isn't binding to future rulings, it will cause people to adjust their behavior to avoid falling into a trap that's been clearly called out already. Uh, also, IANAL.
- urvader 5y agoThe law is not specific at all in regards to the format of the document. So to talk about an “API legally” has no meaning. In a private scenario it makes sense but what we are talking about here is public documents which are sent through an API. The city has responsibility to only send information I have (as a parent) legally right to see. How I parse it and present it is up to me as citizen (through an app or save it as json and upload to an excel file or such) One implication of this project could be that government agencies in Sweden can not have private API:s. To use more proprietary methods (private api:s) will have no effect on the constitutional law. You still have received a public document as a citizen.
- munk-a 5y agoHere's one possible issue though - I asked (in another sibling comment) if `ls` could be considered a filesystem API - I strongly believe it is. That means we probably (for sanity's sake) need to differentiate internal vs. external APIs and provide a method for safely allowing this public document method to be well defined. If a spy is filling out an expense report via secure email after an undercover mission to Norway (trying to figure out if Norway is hording lutefisk, I assume) which ends up resulting in a bombshell report to the public about international lutefisk accessibility then that report is clearly public - but the spy's expense report (including, I'd assume, their identity) is something that should logically be kept secret. There's some press secretary in the middle that takes the raw information and turns it into the scandal we all know it would be. The data being transmitted over an API is not intended to be directly consumed by the public - there is, instead, an application that exists to take that raw data and transform it into something that is publicly viewable. That application is the corollary for our press secretary here. I am concerned this might be a bigger rabbit hole than you expect. I totally agree that the town shouldn't flip out and be stupid calling in legal authorities like it currently is - but I think this might be more complex.
- withinboredom 5y agoIn this particular example, It’s likely none of that would be digital (over the web) and it would be classified.