this project finds random project links and says them
Hmm. It doesn't seem to find private ones, which is good. But that database still seems like something we don't want to expose to users.
It can't find private ones, they're... private
I meant, plopping the raw database into a browser window isn't so useful; it should look like all our other project lists, with thumbnails etc.
rip is my project gonna break?
oh also, it's the list of projects for the front page it looks like.
Eventually, I hope. But it'll probably be a while before we get around to things that just look ugly, as opposed to not working at all.
P.S. It looks like that should be loadable as a spreadsheet/table/2D list. That would be a better basis for your project!
It's not the raw database. It's filtered through Lapis and it goes through the current user, checks its permissions, formats it in JSON, etc.
The raw database is in SQL and can't -hopefully- be viewed at all from anywhere public.
Sorry, I stand corrected. Still, we shouldn't, imho, show ugly data to users, especially since we already have a mechanism for displaying lists of projects.
Well, that's how the Internet works. APIs are always accessible via a URL, there's no way around that.
We're not showing it to regular users. Users who access the
/api URL aren't regular users, they're either developers or curious users.
You have to go through source code to find out about that URL.
But, but, @miniepicness's project says
No /api that I can see...
I was trying to find the api because i like messing with api stuff and i found /projects. didnt know /api was a thing.
I just guessed to find it.
The actual URL is https://snap.berkeley.edu/api/v1/projects/.
/projects seems to be a redirection? I don't know. I've mostly forgotten how we built that by now
They're both actual! We users don't know whether a URL redirects. :~)
Well, in any case these URLs aren't publicly posted anywhere. If someone finds them by tinkering around they'll get ugly text back, which is what they're most probably looking for.
There's no way to get to any API-level URL by solely using Snap! or its website.
Is this your first time dealing with adolescent computer hackers? :~)
If you don't count dealing with my own self two decades ago, then yep
Still, I think my point stands. If someone finds that URL it means they were off to find it and they know what an API is, regardless of their age.
An API will always have a URL that displays ugly text. We can't do much about that unless we change the Internet.
Whatever. s.b.e/projects seems like too handy a URL to waste on a synonym for s.b.e/api/something. It should be something for users to see! (Namely, all the published projects, in user-friendly format.) But, whatever. Not the most critical problem. :~)
I think this comes from a redirection rule we added when moving the site and editor to this server. If
/something isn't found, we're redirecting it to
/api/v1/something, just in case someone was using the old URLs and forgot to update them. Those URLs made sense in this server before we had published the site, because this server served only the API and thus all URLs were top level ones.
By the way, the page you'd like to see in
/projects is actually in
Well then that's what projects should redirect to! :~P
but then how are people gonna find the API without looking through the forums for this topic?