Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to the Developer Q&A for the
MultiChain
blockchain platform.
Please feel free to ask questions about the platform to receive answers from the MultiChain developers or other members of the community.
Related questions
How can I test max TX per second using a RPC API calls
Sporadically receiving connection error when doing JSON RPC requests
Documentation/Example sending JSON-RPC requests
API no longer responds after 3 to 5 requests - Bug
How to male JSON-RPC API call using Rest based SAP PO Adapter?
4,157
questions
4,370
answers
5,718
comments
Most popular tags
multichain
streams
assets
stream
transactions
json-rpc
blockchain
wallet
permissions
error
address
raw-transactions
asset
mining
node
api
issue
multichain-explorer
nodes
connect
multichaind
multisig
transaction
smart-filters
metadata
private-key
atomic-exchange
multichain-cli
multichain-web-demo
data
connection
performance
blocks
demo
web
json
database
storage
native-currency
bitcoin
private-blockchain
network
fee
smart-contracts
wallets
signrawtransaction
off-chain
exchange
multiple-nodes
getnewaddress
Can I access multichain using REST calls?
+1
vote
Hi,
I have an application written in Java.
I want to connect with multichain using REST (HTTP) calls. Is this possible?
If yes, please share the tutorial link.
Regards
Anuj
api
http
asked
May 17, 2017
by
anuj
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+1
vote
Best answer
Yes, of course, the entire MultiChain API uses JSON-RPC which is a REST-like interface.
You can find a ton of information including a Java library on this page:
http://www.multichain.com/developers/
answered
May 17, 2017
by
MultiChain
selected
May 17, 2017
by
anuj
As per my understanding it's pretty straight forward to execute JSON-RPC API calls from the command line, but how do we execute it in an HTTP call.
So what should be the HTTP URL say to fetch all the addresses from the node?
http://[HOST]:[PORT]/???
Regards
Anuj
You just need to make an HTTP POST request to the right host and port, using HTTP basic authentication with your RPC username and password, and the POST payload containing the JSON which looks something like this:
{"method":"publish","params":["stream1","key","0A0A"],"id":1,"chain_name":"chain1"}
That's the equivalent of:
multichain-cli chain1 publish stream1 key 0A0A
In general you can see the HTTP POST payload for any request by looking at the first line output by multichain-cli.
This clears my query. Thanks a lot.
Please
log in
or
register
to add a comment.
...