forked from addonscript/addonscript-spec
1.4 KiB
1.4 KiB
File Repository
Endpoints
GET {base URL}/v1/files/:namespace/:addon/:version/:qualifier
This endpoint can be used to retrieve information about a specific file. If the instance don't know this file, it must respond with status code 404.
Path variables:
namespace
: The canonical namespace of the addon to which the file belongs toaddon
: The addon ID of the addon to which the file belongs toversion
: The addon version to which the file belongs toqualifier
: The qualifier of the file
Example response:
{
"links": ["https://example.com/file.jar"],
"filename?": "file.jar",
"hashes": {
"sha1": "somesha1checksum"
},
"meta": {
"additional": {}
}
}
GET {base URL}/v1/files/:algorithm/:hash
This endpoint can be used to retrieve information about a file from the hash value of the file. If the instance can't find the file by the hash or does not know the specified hash algorithm, it must respond with status code 404.
Path variables:
algorithm
: The hash algorithm of the hashhash
: The hash value of the file
Example response:
{
"links": ["https://example.com/file.jar"],
"filename?": "file.jar",
"hashes": {
"sha1": "somesha1checksum"
},
"meta": {
"additional": {}
}
}