Page MenuHomeSoftware Heritage

use a better example for the /content/ API endpoint
Closed, MigratedEdits Locked

Description

There are a number of optional features returned for /content/ objects via the Web API: blake2 checksum, filetype, language, license, etc. Also /raw/ download is available only for selected objects for now.

The example content object we use right now exposes almost no optional feature: cannot be downloaded, license has not been detected, etc.
We should use a better example, that showcases all the additional information we have. Bonus point: it should be a "nice" piece of source code to look at.

Proposal: hello.c from (some version of) GNU Hello. But after making sure optional features for it are available. If they aren't/cannot be made available, we can try other options.

Event Timeline

Agreed, the example should provide data regarding filetype / language / license. Nevertheless, there is no official github mirror for GNU Hello. So what about linking the content example to ls.c from the official GNU coreutils mirror : https://archive.softwareheritage.org/api/1/content/dc2830a9e72f23c1dfebef4413003221baa5fb62/ ?

great example! it has indeed all the needed features. Approved :-)

zack claimed this task.

fixed by @anlambert in 49bfa06aff5c8fc97ac5217a74991d9557726463