User Tools

Site Tools


daemon:api



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
daemon:api [2017/03/24 22:02]
Daisychain
daemon:api [2018/09/10 13:59] (current)
Fornax update gitlab links
Line 1: Line 1:
-====== Sia API ======+====== Siad API ====== 
 +The [[:daemon|Sia Daemon]] provider API routes for all of its modules. Documentation for each module's API routes are found in the [[https://gitlab.com/NebulousLabs/Sia/tree/master/doc/api|Sia GitLab repository]]. 
 + 
 +All Siad API calls return either JSON or no content. 
 + 
 +A few important notes to keep in mind when working with the API are: 
 + 
 +  * Requests must set their User-Agent string to contain the substring "Sia-Agent"
 +  * By default, siad listens on "localhost:9980". You can change this by using the --api-addr flag when running siad. 
 +  * You should not bind or expose the API to a non-loopback address unless you are aware of the possible dangers. 
 + 
 + 
 +===Example GET curl call:=== 
 +  curl -A "Sia-Agent" "localhost:9980/wallet/transactions?startheight=1&endheight=250" 
 + 
 +===Example POST curl call:=== 
 +  curl -A "Sia-Agent" --data "amount=123&destination=abcd" "localhost:9980/wallet/siacoins" 
 + 
 + 
 +===Sources:=== 
 +[[https://gitlab.com/NebulousLabs/Sia/blob/master/doc/API.md|Siad API documentation on GitHub]]
  
daemon/api.1490392935.txt.gz · Last modified: 2017/03/24 22:02 by Daisychain