Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter transactions & accounts by metadata #68

Closed
altitude opened this issue Nov 24, 2021 · 2 comments · Fixed by #79
Closed

Filter transactions & accounts by metadata #68

altitude opened this issue Nov 24, 2021 · 2 comments · Fixed by #79
Assignees
Labels

Comments

@altitude
Copy link
Member

Summary
We should be able to filter transactions by metadata

Solution proposal
GET /:ledger/transactions?meta:key=value
GET /:ledger/accounts?meta:key=value

The match should be done on an exact value.

Because the metadata object on transactions and accounts is always stored key by key, with the value stored as a json string we should be able to pass any type as value, scalar or compound.

Describe alternatives you've considered
Nothing yet, happy to discuss alternative ideas

Additional context
Follow-up of a discord discussion

@altitude altitude added enhancement New feature or request RFC labels Nov 24, 2021
@henry-jackson
Copy link
Contributor

@altitude I just read through the discord discussion; I would be happy to work on this!

@jdupas22
Copy link
Contributor

The correct format used to day to request metadata is this one:
metadata[key]=value1&metadata[a.nested.key]=value2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants