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 by reference #55

Closed
altitude opened this issue Oct 21, 2021 · 0 comments
Closed

Filter transactions by reference #55

altitude opened this issue Oct 21, 2021 · 0 comments
Assignees
Labels
contrib/tier-2 enhancement New feature or request

Comments

@altitude
Copy link
Member

altitude commented Oct 21, 2021

Summary
We should be able to filter transactions by reference

Solution proposal

GET /:ledger/transactions?reference=1234

Expected behavior

  • There should be zero or one transaction returned, if one exists with the matching reference
  • Works with both SQLite and Postgres storage backends
curl -X POST -H "Content-Type: application/json" http://localhost:3068/test-01/transactions -d \
'{
   "postings": [
     {
       "source": "world",
       "destination": "test:001",
       "amount": 100,
       "asset": "USD/2"
     }
   ],
   "reference": "foobar"
 }'

curl -X GET http://localhost:3068/test-01/transactions?reference=foobar | jq .
# ^ should return the transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contrib/tier-2 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants