Closed rhe3565 closed 1 month ago
/data_accounting/get_branch/{verification_hash} return all hashes down to genesis
page_info:
{
title,
namespace: as integer
}
I have adapted get_page_all_revs
to accept both title and verification hash (as both APIs are basically the same).
Specifying either will now return proper chain, also for forked pages
In addition to the return we need:
page_info: { title, namespace: as integer }
for the impor context.
Yes, this endpoint returns VerificationEntites
which already contain this info. or do you need it in exactly this format?
I reviewed the code with one of my team members who was really upset about this solution. He was not happy that a page containing 128 characters would not be handled if inputted into the API. Additionally, he noted that the namespace is missing.
We would like to have a robust solution which includes a separate API endpoint that receives only the hash as an input. There is a draft for this here: https://github.com/inblockio/mediawiki-extensions-Aqua/pull/394, which is working according to my colleague.
Our tests are following this shema:
@it-spiderman we tested it and it works as we want it.
Aqua chains allow for forking. This means there can be multiple aqua chains originating from one genesis hash(getting an aqua chain from a genesis hash would therefore have to return all branches). getting an aqua-chain from its page_name is possible, but not ideal, as the name of a page can be changed arbitrarily. For this reason the best way of getting an aqua chain would be by its latest revision_hash. There is currently no such api-call. This api-call would return an aqua chain with all its revisions from its first revision to the latest revision(on the relevant branch).
Ideally this call would work exactly as get_page_all_revs does but take the last revision hash rather than the page title. (the return type would remain the same)