You are viewing a single comment's thread from:

RE: DevTool SPS proposal: steem trx finder

in #steem5 years ago (edited)

https://developers.steem.io/apidefinitions/#account_history_api.get_transaction

Example rpc call:
curl -sd '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"55eb04e397569e27fff8fbf04841ca7c5b9e522c"}, "id":"0"}' anyx.io

Or via RESTful translation:
https://anyx.io/v1/account_history_api/get_transaction?id=55eb04e397569e27fff8fbf04841ca7c5b9e522c

Sort:  

Wondering why your RESTful api uses query params, instead of representing resources with URIs.

  1. because in general parameters do mean queries, they are not static resources, they are dynamic API results.
    Some do work as plain URIs, like https://anyx.io/v1/database_api/get_dynamic_global_properties, as this has no parameters.
  2. the /v1/ variant is backwards compatible and easily translatable from the original POST variant to the RESTful one. Better URIs (but breaking compatibility) can come in a v2.
    consider something like https://developers.steem.io/apidefinitions/#database_api.list_accounts
    The mapping is intuitive, instead of POSTing
    '{"jsonrpc":"2.0", "method":"database_api.list_accounts", "params": {"start":"steemit", "limit":10, "order":"by_name"}, "id":1}'
    you can instead do
    http://anyx.io/v1/database_api/list_accounts?start=steemit&limit=10&order=by_name
  3. the current steem appbase apis require the object name (e.g., as above, they require knowing "start" as well as the value associated). Including it in the request clarifies the mapping.

This is how restful implementations work typically. You have parameters to format the specific data you are interested in.

Hello
I want to use http://anyx.io and get the operational information that was done from 2016 to 2018 and recorded in the blocks. Would you please show me how I can get this information with very little delay?