Skip to content

Latest commit

 

History

History
165 lines (103 loc) · 6.72 KB

IdentitiesApi.md

File metadata and controls

165 lines (103 loc) · 6.72 KB

\IdentitiesApi

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

Method HTTP request Description
GetIdChainbyId Get /identities/{identity_chain_id} Get Identity Chain Info
GetKeybyEntryHash Get /identities/{identity_chain_id}/keys/{key_string} Get Key Info
GetKeysbyIdChainId Get /identities/{identity_chain_id}/keys Get Identity Chain's Keys
PostIdChain Post /identities Create Identity Chain
PostKeytoIdChainId Post /identities/{identity_chain_id}/keys Replace Identity Key

GetIdChainbyId

IdentityChain GetIdChainbyId(ctx, identityChainId) Get Identity Chain Info

Retrieve the details about a particular Identity Chain.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identityChainId string The hex encoded string that points to the identity's chain

Return type

IdentityChain

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]

GetKeybyEntryHash

IdentityKey GetKeybyEntryHash(ctx, identityChainId, keyString) Get Key Info

Retreive information about a specific public key for a given Identity, including the heights at which the key was activated and retired if applicable.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identityChainId string The hex encoded string that points to the identity's chain
keyString string The public key string. Must be in base58 idpub format.

Return type

IdentityKey

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]

GetKeysbyIdChainId

KeyList GetKeysbyIdChainId(ctx, identityChainId, optional) Get Identity Chain's Keys

Returns all of the keys, past and present, associated with a particular Identity. Results are paginated and ordered by activation height.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identityChainId string The hex encoded string that points to the identity's chain
optional *GetKeysbyIdChainIdOpts optional parameters nil if no parameters

Optional Parameters

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

KeyList

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]

PostIdChain

ChainShort PostIdChain(ctx, identityCreate) Create Identity Chain

Creates a new identity chain. To create the chain, you'll need to include a unique name array and an array of public keys. If successful, returns information about the chain that was created.

Required Parameters

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

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]

PostKeytoIdChainId

EntryShort PostKeytoIdChainId(ctx, identityChainId, identityKeyReplace) Replace Identity Key

Retires an existing key from an identity and replaces it with a new one. To do this, a user must send the key to be replaced (old_key), the new_key, the signing key that authorizes the replacement and a signed message from the signing key. The signing key must be either equal to or senior to the key that is being replaced. Note: You may not reuse a key. If the new_key has been used by this Identity at any level, the replacement will fail.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identityChainId string The hex encoded string that points to the identity's chain
identityKeyReplace IdentityKeyReplace

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]