Skip to content

Latest commit

 

History

History
143 lines (90 loc) · 5.87 KB

ChainsApi.md

File metadata and controls

143 lines (90 loc) · 5.87 KB

\ChainsApi

All URIs are relative to https://ephemeral.api.factom.com/v1

Method HTTP request Description
GetChainByID Get /chains/{chain_id} Get Chain Info
GetChains Get /chains Get All Chains
PostChain Post /chains Create a Chain
PostChainSearch Post /chains/search Search Chains

GetChainByID

Chain GetChainByID(ctx, chainId) Get Chain Info

Get information about a specific chain on Connect

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
chainId string Chain identifier

Return type

Chain

Authorization

AppId, AppKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetChains

ChainList GetChains(ctx, optional) Get All Chains

Returns all of the chains on factomd.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetChainsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetChainsOpts struct

Name Type Description Notes
limit int32 The number of items you would like back in each page.
offset int32 The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position.
stages string The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'replicated,factom'`.

Return type

ChainList

Authorization

AppId, AppKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostChain

ChainShort PostChain(ctx, chainCreate) Create a Chain

Create a new chain. Each chain functions as a mini-blockchain such that all of the entries are linked. Every entry relies on data from previous entries in the chain. Any unauthorized alterations to any of these entries can be detected. Be aware that data entered into the content and external_ids fields must be in Base64 format. Sending this request will cause Connect to create the first entry of the chain. The data entered into the content and external_id fields will be applied to this entry.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
chainCreate ChainCreate

Return type

ChainShort

Authorization

AppId, AppKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostChainSearch

ChainList PostChainSearch(ctx, searchBody, optional) Search Chains

Finds all of the chains with external_ids that match what you've entered. External IDs must be sent in Base64 format.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
searchBody SearchBody
optional *PostChainSearchOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a PostChainSearchOpts struct

Name Type Description Notes

limit | int32| The number of items you would like back in each page. | offset | int32| The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. |

Return type

ChainList

Authorization

AppId, AppKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]