All URIs are relative to https://api.factom.pro/v1
Method | HTTP request | Description |
---|---|---|
createChain | POST /chains | Create chain |
getChain | GET /chains/{chainId} | Get chain |
getChainEntries | GET /chains/{chainId}/entries | Get chain entries |
getChainFirstEntry | GET /chains/{chainId}/entries/first | Get first entry of the chain |
getChainLastEntry | GET /chains/{chainId}/entries/last | Get last entry of the chain |
getUserChains | GET /chains | Get user's chains |
searchChainEntries | POST /chains/{chainId}/entries/search | Search chain entries |
searchUserChains | POST /chains/search | Search user's chains |
InlineResponse2003 createChain(body, callbackUrl)
Create chain
This endpoint allows you to create new chain on the Factom blockchain.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
NewChain body = new NewChain(); // NewChain |
String callbackUrl = "callbackUrl_example"; // String | URL where to send status updates
try {
InlineResponse2003 result = apiInstance.createChain(body, callbackUrl);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#createChain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | NewChain | ||
callbackUrl | String | URL where to send status updates | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
InlineResponse2003 createChain(extIds, content, callbackUrl)
Create chain
This endpoint allows you to create new chain on the Factom blockchain.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
ExtIds extIds = new ExtIds(); // ExtIds |
byte[] content = null; // byte[] |
String callbackUrl = "callbackUrl_example"; // String | URL where to send status updates
try {
InlineResponse2003 result = apiInstance.createChain(extIds, content, callbackUrl);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#createChain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
extIds | ExtIds | ||
content | byte[] | ||
callbackUrl | String | URL where to send status updates | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
InlineResponse2004 getChain(chainId)
Get chain
This endpoint returns Factom chain by Chain ID.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
try {
InlineResponse2004 result = apiInstance.getChain(chainId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getChain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
chainId | String | Chain ID of the Factom chain |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: Not defined
- Accept: application/json
InlineResponse2005 getChainEntries(chainId, start, limit, status, sort)
Get chain entries
This endpoint returns entries of Factom chain.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2005 result = apiInstance.getChainEntries(chainId, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getChainEntries");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
chainId | String | Chain ID of the Factom chain | |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 getChainFirstEntry(chainId)
Get first entry of the chain
This endpoint returns first entry of chain.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
try {
InlineResponse2006 result = apiInstance.getChainFirstEntry(chainId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getChainFirstEntry");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
chainId | String | Chain ID of the Factom chain |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 getChainLastEntry(chainId)
Get last entry of the chain
This endpoint returns last entry of chain.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
try {
InlineResponse2006 result = apiInstance.getChainLastEntry(chainId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getChainLastEntry");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
chainId | String | Chain ID of the Factom chain |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: Not defined
- Accept: application/json
InlineResponse2002 getUserChains(all, start, limit, status, sort)
Get user's chains
This endpoint returns all chains, with that API user works.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
Integer all = 56; // Integer | Return chains from entire blockchain (rather than only chains that the API user has touched)
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2002 result = apiInstance.getUserChains(all, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#getUserChains");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
all | Integer | Return chains from entire blockchain (rather than only chains that the API user has touched) | [optional] |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: Not defined
- Accept: application/json
InlineResponse2005 searchChainEntries(body, chainId, start, limit, status, sort)
Search chain entries
This endpoint allows you to search among entries of the chain by one or multiple external IDs.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
SearchExtIds body = new SearchExtIds(); // SearchExtIds |
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2005 result = apiInstance.searchChainEntries(body, chainId, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#searchChainEntries");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SearchExtIds | ||
chainId | String | Chain ID of the Factom chain | |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
InlineResponse2005 searchChainEntries(extIds, chainId, start, limit, status, sort)
Search chain entries
This endpoint allows you to search among entries of the chain by one or multiple external IDs.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
ExtIds extIds = new ExtIds(); // ExtIds |
String chainId = "chainId_example"; // String | Chain ID of the Factom chain
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2005 result = apiInstance.searchChainEntries(extIds, chainId, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#searchChainEntries");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
extIds | ExtIds | ||
chainId | String | Chain ID of the Factom chain | |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
InlineResponse2002 searchUserChains(body, all, start, limit, status, sort)
Search user's chains
This endpoint allows you to search among user's chains by one or multiple external IDs.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
SearchExtIds body = new SearchExtIds(); // SearchExtIds |
Integer all = 56; // Integer | Return chains from entire blockchain (rather than only chains that the API user has touched)
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2002 result = apiInstance.searchUserChains(body, all, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#searchUserChains");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SearchExtIds | ||
all | Integer | Return chains from entire blockchain (rather than only chains that the API user has touched) | [optional] |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
InlineResponse2002 searchUserChains(extIds, all, start, limit, status, sort)
Search user's chains
This endpoint allows you to search among user's chains by one or multiple external IDs.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ChainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
ChainsApi apiInstance = new ChainsApi();
ExtIds extIds = new ExtIds(); // ExtIds |
Integer all = 56; // Integer | Return chains from entire blockchain (rather than only chains that the API user has touched)
Integer start = 56; // Integer | Number of items to skip before returning the results
Integer limit = 56; // Integer | Number of items you would like back in each page
StatusParams status = new StatusParams(); // StatusParams | Filter results by object status
SortParams sort = new SortParams(); // SortParams | Sorting order
try {
InlineResponse2002 result = apiInstance.searchUserChains(extIds, all, start, limit, status, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChainsApi#searchUserChains");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
extIds | ExtIds | ||
all | Integer | Return chains from entire blockchain (rather than only chains that the API user has touched) | [optional] |
start | Integer | Number of items to skip before returning the results | [optional] |
limit | Integer | Number of items you would like back in each page | [optional] |
status | StatusParams | Filter results by object status | [optional] |
sort | SortParams | Sorting order | [optional] |
[Bearer Authorization](../README.md#Bearer Authorization)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json