Harmony Connect
- API version: 1.0.19
- Build date: 2019-02-19T17:12:36.829940300-06:00[America/Chicago]
An easy to use API that helps you access the Factom blockchain.
For more information, please visit https://docs.harmony.factom.com
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>factomProject</groupId>
<artifactId>harmony-connect-client</artifactId>
<version>1.0.7</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "factomProject:harmony-connect-client:1.0.7"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/harmony-connect-client-1.0.7.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import harmony_connect_client.*;
import harmony_connect_client.auth.*;
import harmony_connect_client.model.*;
import harmony_connect_client.api.ChainsApi;
import java.io.File;
import java.util.*;
public class ChainsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AppId
ApiKeyAuth AppId = (ApiKeyAuth) defaultClient.getAuthentication("AppId");
AppId.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AppId.setApiKeyPrefix("Token");
// Configure API key authorization: AppKey
ApiKeyAuth AppKey = (ApiKeyAuth) defaultClient.getAuthentication("AppKey");
AppKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AppKey.setApiKeyPrefix("Token");
// Configure base path. Default is https://ephemeral.api.factom.com/v1
defaultClient.setBasePath("YOUR BASE PATH");
ChainsApi apiInstance = new ChainsApi();
String chainId = "6a6d796c77cc5654bb8600e9cb36e94c7767a7bb99d6abcfb0ab54b8187c7df8"; // String | Chain identifier
try {
Chain result = apiInstance.getChainByID(chainId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getChainByID");
e.printStackTrace();
}
}
}
All URIs are relative to https://ephemeral.api.factom.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ChainsApi | getChainByID | GET /chains/{chain_id} | Get Chain Info |
ChainsApi | getChains | GET /chains | Get All Chains |
ChainsApi | postChain | POST /chains | Create a Chain |
ChainsApi | postChainSearch | POST /chains/search | Search Chains |
EntriesApi | getEntriesByChainID | GET /chains/{chain_id}/entries | Get Chain's Entries |
EntriesApi | getEntryByHash | GET /chains/{chain_id}/entries/{entry_hash} | Get Entry Info |
EntriesApi | getFirstEntry | GET /chains/{chain_id}/entries/first | Get Chain's First Entry |
EntriesApi | getLastEntry | GET /chains/{chain_id}/entries/last | Get Chain's Last Entry |
EntriesApi | postEntriesSearch | POST /chains/{chain_id}/entries/search | Search Chain's Entries |
EntriesApi | postEntryToChainID | POST /chains/{chain_id}/entries | Create an Entry |
IdentitiesApi | getIdChainbyId | GET /identities/{identity_chain_id} | Get Identity Chain Info |
IdentitiesApi | getKeybyEntryHash | GET /identities/{identity_chain_id}/keys/{key_string} | Get Key Info |
IdentitiesApi | getKeysbyIdChainId | GET /identities/{identity_chain_id}/keys | Get Identity Chain's Keys |
IdentitiesApi | postIdChain | POST /identities | Create Identity Chain |
IdentitiesApi | postKeytoIdChainId | POST /identities/{identity_chain_id}/keys | Replace Identity Key |
InfoApi | getApiInfo | GET / | API Info |
ProofsApi | getAnchorbySearch | GET /anchors/{object_id} | Get Object's Anchors |
ProofsApi | getReceiptsbyEntry | GET /receipts/{entry_hash} | Get Entry's Receipts |
ProofsApi | getSearch | GET /search | Search |
- ABlockEntry
- ABlockEntryData
- ABlockEntryLink
- ABlockEntryList
- ABlockList
- ABlockLong
- ABlockLongDblock
- ABlockLongNext
- ABlockLongPrev
- ABlockShort
- ABlockShortDblock
- Address
- AddressLink
- AddressList
- AllInfo
- AllInfoLinks
- AnchorLong
- AnchorLongData
- BitcoinAnchor
- Chain
- ChainCreate
- ChainData
- ChainDataDblock
- ChainDataEblock
- ChainDataEntries
- ChainLink
- ChainList
- ChainListData
- ChainShort
- CommitLink
- CommitLong
- DBlockLink
- DBlockList
- DBlockLong
- DBlockLongAblock
- DBlockLongBtcAnchorEntry
- DBlockLongBtcAnchorEntryChain
- DBlockLongEblocks
- DBlockLongEcblock
- DBlockLongFblock
- DBlockLongNext
- DBlockLongPrev
- DBlockShort
- EBlockLink
- EBlockLinkChain
- EBlockList
- EBlockLong
- EBlockLongNext
- EBlockLongPrev
- EBlockShort
- EBlockShortChain
- EBlockShortDblock
- ECBlockEntryList
- ECBlockList
- ECBlockLong
- ECBlockLongDblock
- ECBlockShort
- Entry
- EntryCreate
- EntryData
- EntryDataDblock
- EntryDataEblock
- EntryList
- EntryListChain
- EntryListData
- EntrySearchResponse
- EntrySearchResponseData
- EntryShort
- ErrorMessage
- ErrorMessageErrors
- EthereumAnchor
- FBlockList
- FBlockLong
- FBlockLongNext
- FBlockLongPrev
- FBlockShort
- FactomAnchor
- IdentityChain
- IdentityCreate
- IdentityKey
- IdentityKeyData
- IdentityKeyReplace
- IdentityKeyShort
- IdentityKeyShortData
- KeyList
- MerkleNode
- ReceiptLong
- ReceiptLongData
- SearchBody
- SearchResult
- SearchResultData
- SingleAnchor
- Transaction
- TransactionLink
- TransactionLinkShort
- TransactionList
- TransactionShort
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: app_id
- Location: HTTP header
- Type: API key
- API key parameter name: app_key
- Location: HTTP header
When you move to a public or private blockchain plan, you'll need to update your basepath to match your new API address. You can see your current API basepath on the Application Details page in your Harmony Dev portal..
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("YOUR BASE PATH");
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
For more information, you can view the Connect documentation at https://docs.harmony.factom.com
For additional support, contact us at harmony-support@factom.com