This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
api_calls [03/13/2021 00:47] – created gfactor | api_calls [03/06/2022 17:13] – added Building Transactions section quickmythril | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== API Calls ====== | ====== API Calls ====== | ||
+ | {{: | ||
- | You need to have enabled API documentation in your settings.json file for using API calls. | + | **Please note: the API calls are universal. They will work on any operating system. |
- | Here is the line: | + | **Here is the line:** |
" | " | ||
List of mostly used API calls: | List of mostly used API calls: | ||
- | Your Qortal Node API Documentation/ | + | **Your Qortal Node API Documentation/ |
+ | |||
+ | http:// | ||
- | Your core block chain height, core status (minting or syncing), number of connected nodes: | + | **Your core block chain height, core status (minting or syncing), number of connected nodes: |
+ | ** | ||
- | Your Qortal Node Admin Information (your up time & Build Version): | + | http:// |
- | Your Qortal Node Information (Address, PublicKey, Blocks Minted): http:// | + | **Your Qortal Node Admin Information (your up time & Build Version): |
+ | ** | ||
- | Adding new peer to your DB: http:// | + | http:// |
+ | |||
+ | **Your Qortal Node Information (Address, PublicKey, Blocks Minted): | ||
+ | ** | ||
+ | |||
+ | http:// | ||
+ | |||
+ | **Adding new peer to your DB: | ||
+ | ** | ||
+ | |||
+ | http:// | ||
+ | |||
+ | **Ditch chain to set height:** | ||
If your core is stuck at some height, you can try to ditch blocks to some height and re-sync from there. | If your core is stuck at some height, you can try to ditch blocks to some height and re-sync from there. | ||
- | You are inputting height to ditch to. If you will input 300000, your core will drop blocks up to 300000 and then start to sync from that: http:// | + | You are inputting height to ditch to. If you will input 300000, your core will drop blocks up to 300000 and then start to sync from that height and catch back up to the right height. If during the roll back you notice its getting slower or stalling, just close core and repeat steps, sometimes you need to repeat the steps a couple to roll back to your desired block quickly: |
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | **Version 3.0 & the 'API Key' | ||
+ | |||
+ | In **core version 3.0.1** and beyond, there is now an ' | ||
+ | |||
+ | Any API call that has the **X-API-KEY** section in it, will require the API key to be input in order to function. For calls that have that, simply open the **apikey.txt**, | ||
+ | |||
+ | ====== Building Transactions ====== | ||
+ | **NOTE: As a prerequisite, | ||
+ | |||
+ | **WARNING: If this key is stolen, you will lose your funds.** | ||
+ | |||
+ | Better to not save this key in a file. After used, clear your browser cache as well as your copy-paste clipboard. | ||
+ | |||
+ | a. Start the UI \\ | ||
+ | b. Go to http:// | ||
+ | c. Set developer mode from browser \\ | ||
+ | (ex Chrome: More tool-> | ||
+ | d. Login to the Wallet account \\ | ||
+ | e. To display your private key, execute in console: \\ | ||
+ | Base58.encode(reduxStore.getState().app.selectedAddress.seed) | ||
+ | |||
+ | **1: Find the API call for the desired transaction.** | ||
+ | |||
+ | It will say "Build raw, unsigned, ... transaction" | ||
+ | Click the heading then click the "Try it out" button. | ||
+ | Edit all the keys to their proper values for this tx. | ||
+ | Fee is 0.001 and enter reference and timestamp last. | ||
+ | (see info at 1a & 1b) | ||
+ | Press " | ||
+ | |||
+ | 1a: Reference is retrieved using the following API call: | ||
+ | |||
+ | / | ||
+ | |||
+ | 1b: Timestamp is retrieved using the following API call: | ||
+ | |||
+ | / | ||
+ | |||
+ | **2: Sign the raw, unsigned transaction with API call:** | ||
+ | |||
+ | / | ||
+ | |||
+ | Enter your Private Key and the Response Body from step 1. | ||
+ | Press " | ||
+ | |||
+ | **3: Submit signed transaction with API call:** | ||
+ | |||
+ | / | ||
+ | |||
+ | Paste the Response Body from step 2 and press " |