Page MenuHomeSoftware Heritage

Web API: /known return false for existing release and snapshot SWHIDs
Closed, MigratedEdits Locked

Description

As per title. Test case:

$ curl --silent \
  --header "Content-Type: application/json" \
  --request POST \
  --data "[\"swh:1:cnt:fe95a46679d128ff167b7c55df5d02356c5a1ae1\", \
	   \"swh:1:dir:977fc4b98c0e85816348cebd3b12026407c368b6\", \
	   \"swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6\", \
	   \"swh:1:rel:208f61cc7a5dbc9879ae6e5c2f95891e270f09ef\", \
	   \"swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a\"]" \
  https://archive.softwareheritage.org/api/1/known/ | jq

{
  "swh:1:cnt:fe95a46679d128ff167b7c55df5d02356c5a1ae1": {
    "known": true
  },
  "swh:1:dir:977fc4b98c0e85816348cebd3b12026407c368b6": {
    "known": true
  },
  "swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6": {
    "known": true
  },
  "swh:1:rel:208f61cc7a5dbc9879ae6e5c2f95891e270f09ef": {
    "known": false
  },
  "swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a": {
    "known": false
  }
}

whereas the release and snapshot objects in the example exist in the archive (they are our API examples for the /release and /snapshot endpoint).