Skip to content

Latest commit

 

History

History
207 lines (130 loc) · 7.86 KB

EntriesApi.md

File metadata and controls

207 lines (130 loc) · 7.86 KB

\EntriesApi

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

Method HTTP request Description
GetEntriesByChainID Get /chains/{chain_id}/entries Get Chain's Entries
GetEntryByHash Get /chains/{chain_id}/entries/{entry_hash} Get Entry Info
GetFirstEntry Get /chains/{chain_id}/entries/first Get Chain's First Entry
GetLastEntry Get /chains/{chain_id}/entries/last Get Chain's Last Entry
PostEntriesSearch Post /chains/{chain_id}/entries/search Search Chain's Entries
PostEntryToChainID Post /chains/{chain_id}/entries Create an Entry

GetEntriesByChainID

EntryList GetEntriesByChainID(ctx, chainId, optional) Get Chain's Entries

List all entries contained on the specified chain.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
chainId string Chain identifier
optional *GetEntriesByChainIDOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetEntriesByChainIDOpts 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

EntryList

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]

GetEntryByHash

Entry GetEntryByHash(ctx, chainId, entryHash) Get Entry Info

Returns information about a specific entry on Connect. The requested entry must be specified using the Chain ID and Entry Hash.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
chainId string Chain identifier
entryHash string The unique identitfier of the entry.

Return type

Entry

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]

GetFirstEntry

Entry GetFirstEntry(ctx, chainId) Get Chain's First Entry

Retrieve the first entry that has been saved to this chain.

Required Parameters

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

Return type

Entry

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]

GetLastEntry

Entry GetLastEntry(ctx, chainId) Get Chain's Last Entry

Retrieve the last entry that has been saved to this chain.

Required Parameters

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

Return type

Entry

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]

PostEntriesSearch

EntrySearchResponse PostEntriesSearch(ctx, chainId, searchBody, optional) Search Chain's Entries

Find all of the entries within the specified chain that have the requested external_ids.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a PostEntriesSearchOpts 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

EntrySearchResponse

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]

PostEntryToChainID

EntryShort PostEntryToChainID(ctx, chainId, entryCreate) Create an Entry

Create a new entry for the selected chain. Content and external id must be uploaded in Base64 format.

Required Parameters

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

Return type

EntryShort

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]