Pretty URLs #15

Closed
opened 4 years ago by max.mehl · 3 comments
Owner

Currently, the JSON endpoint is something like https://api.reuse.software/api/project?url=https://git.fsfe.org/reuse/website, and the badge http://api.reuse.software/badge?url=https%3A%2F%2Fgit.fsfe.org%2Freuse%2Fwebsite (URL encoded, but even decoded it wouldn't be pretty).

It would be nice to have prettier URLs, although I guess that this will be a bit hard since we allow all kinds of source forges, for instance also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ where the structure does not follow the common host.com/user/repo scheme.

Currently, the JSON endpoint is something like `https://api.reuse.software/api/project?url=https://git.fsfe.org/reuse/website`, and the badge `http://api.reuse.software/badge?url=https%3A%2F%2Fgit.fsfe.org%2Freuse%2Fwebsite` (URL encoded, but even decoded it wouldn't be pretty). It would be nice to have prettier URLs, although I guess that this will be a bit hard since we allow all kinds of source forges, for instance also `https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/` where the structure does not follow the common `host.com/user/repo` scheme.
Collaborator

Would https://api.reuse.software/status/https/git.fsfe.org/reuse/website be better?

Depending on how we decide on #3, we could even shorten this to https://api.reuse.software/status/git.fsfe.org/reuse/website.

The entry points could be:

  • https://api.reuse.software/register for project registration
  • https://api.reuse.software/confirm/...?signature=... for project registration confirmation
  • https://api.reuse.software/info/... for the nice human readable info page (#14)
  • https://api.reuse.software/status/... for the JSON status information
  • https://api.reuse.software/badge/... for the badge

Is this closer to what you'd envision?

Would `https://api.reuse.software/status/https/git.fsfe.org/reuse/website` be better? Depending on how we decide on #3, we could even shorten this to `https://api.reuse.software/status/git.fsfe.org/reuse/website`. The entry points could be: * `https://api.reuse.software/register` for project registration * `https://api.reuse.software/confirm/...?signature=...` for project registration confirmation * `https://api.reuse.software/info/...` for the nice human readable info page (#14) * `https://api.reuse.software/status/...` for the JSON status information * `https://api.reuse.software/badge/...` for the badge Is this closer to what you'd envision?
Poster
Owner

Yes to all, and https://api.reuse.software/status/git.fsfe.org/reuse/website would be perfectly fine!

Yes to all, and `https://api.reuse.software/status/git.fsfe.org/reuse/website` would be perfectly fine!
Owner

https://api.reuse.software/status/git.fsfe.org/reuse/website

This seems reasonable to me, with the following remark:

The reason I included the entire URL as a query string is because I figured that that would support basically anything, so long as you can git clone it. By changing to the above format, there might be some edge cases that may no longer be supported. For 99% of projects, however, it will probably work.

> `https://api.reuse.software/status/git.fsfe.org/reuse/website` This seems reasonable to me, with the following remark: The reason I included the entire URL as a query string is because I figured that that would support _basically anything_, so long as you can `git clone` it. By changing to the above format, there might be some edge cases that may no longer be supported. For 99% of projects, however, it will probably work.
max.mehl added this to the 0.1 milestone 4 years ago
reinhard self-assigned this 4 years ago
reinhard closed this issue 4 years ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: reuse/api#15
Loading…
There is no content yet.