Elements Manual
Elements 3 Manual
Elements 3 Manual
  • Welcome 👋
  • QUICK START
    • Elements in Five Minutes or Less
    • Accessing the Web UI (CRM)
    • Creating A User
  • General
    • General Concepts
    • N-Tier Architecture
    • Security Model
  • Core Features
    • Core API Overview
    • Sessions
    • Applications
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Leaderboards
    • Matchmaking
    • Followers
    • Friends
    • Reward Issuance
    • Save Data
    • Schemas and Metadata Specifications
    • Queries
      • Base Query Syntax
      • Boolean Queries
      • Object Graph Navigation
      • Advanced Operators
        • .ref
        • .name
    • Custom Code
      • Element Structure
      • RESTful APIs
      • Websockets
    • Auth Schemes
      • OIDC
      • OAuth2
  • Web 3
    • Omni Chain Support
    • Vaults
    • Wallets
    • Smart Contracts
      • Smart Contracts: Ethereum
      • Smart Contracts: Flow
      • Smart Contracts: Solana
      • Smart Contracts: Neo
  • CONFIGURATION
    • Direct Database Access and Batch Configuration
    • Batch Samples
      • Item Upload Bash Script Sample
      • Mission Upload Bash Script Sample
  • RESTful APIs
    • Swagger and Swagger UI
    • API Specification
      • /application
      • /application/configuration
      • /auth
      • /auth_scheme
        • /custom
        • /oauth2
        • /oidc
      • /blockchain
      • /followee
      • /follower
      • /friend
      • /google
      • /index
      • /inventory
      • /item
      • /large_object
      • /leaderboard
      • /rank
      • /score
      • /match
      • /mission
      • /progress
      • /reward_issuance
      • /schedule
      • /notification
      • /profile
      • /save_data
      • /metadata_spec
      • /mock_session
      • /session
      • /health
      • /version
      • /signup
      • /user
    • Javadocs
  • Releases
    • 3.1 Release Notes
    • 3.2 Release Notes
Powered by GitBook
On this page
  1. RESTful APIs
  2. API Specification

/blockchain

Previous/oidcNext/followee

Last updated 2 months ago

Gets a specific Smart Contract

get

Gets a specific Smart Contract by contractId.

Authorizations
Path parameters
contractIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Deletes a Smart Contract

delete

Deletes a Smart Contract with the specified contractId.

Authorizations
Path parameters
contractIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
delete
DELETE /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets vaults. Optionally filtered for a specific user

get

Gets a pagination of Wallets. Optionally a user Id can be specified to filter for a given user.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
userIdanyOptional
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/vault HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets a specific Vault

get

Gets a specific Vault by Id.

Authorizations
Path parameters
vaultIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Deletes a Vault

delete

Deletes a Vault with the specified id.

Authorizations
Path parameters
vaultIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
delete
DELETE /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets wallets. Optionally filtered for a specific user

get

Gets a pagination of Wallets. Optionally a user Id can be specified to filter for a given user.

Authorizations
Path parameters
vaultIdanyRequired
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
userIdanyOptional
apiundefined · enumOptionalPossible values:
networkanyOptional
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId}/wallet HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets a specific Wallet

get

Gets a specific Wallet by Id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Deletes a Wallet

delete

Deletes a Wallet with the specified id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
delete
DELETE /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets a specific Wallet

get

Gets a specific Wallet by Id.

Authorizations
Path parameters
walletIdanyRequired
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}
  • GETGets contracts.
  • POSTPatches a Smart Contract
  • GETGets a specific Smart Contract
  • PUTPatches a Smart Contract
  • DELETEDeletes a Smart Contract
  • GETGets vaults. Optionally filtered for a specific user
  • POSTCreates a new Vault
  • GETGets a specific Vault
  • PUTUpdates a Vault
  • DELETEDeletes a Vault
  • GETGets wallets. Optionally filtered for a specific user
  • POSTCreates a new Wallet
  • GETGets a specific Wallet
  • PUTUpdates a Wallet
  • DELETEDeletes a Wallet
  • GETGets a specific Wallet

Gets contracts.

get

Gets a pagination of SmartContracts.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
apiundefined · enumOptionalPossible values:
networkanyOptional
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/blockchain/omni/smart_contract HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Patches a Smart Contract

post

Patches a Smart Contract entry, associated with the specified deployed script hash.

Authorizations
Body

Creates a smart contract.

nameanyRequired

The unique symbolic name of the smart contract.

Pattern: ^\S+$
displayNameanyRequired

The name given to this contract for display purposes.

addressesanyRequired

The address of the contract from the blockchain. Depending on the network or protocol this may have several meanings and vary depending on the specific API or network.

vaultIdanyRequired

The Elements database id of the wallet containing the default account to be used for contract related requests.

metadataanyOptional

Any metadata for this contract.

Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
post
POST /api/rest/blockchain/omni/smart_contract HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 80

{
  "name": null,
  "displayName": null,
  "addresses": null,
  "vaultId": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Patches a Smart Contract

put

Patches a Smart Contract entry, associated with the specified deployed script hash.

Authorizations
Path parameters
contractIdanyRequired
Body

Updates a smart contract.

nameanyRequired

The unique symbolic name of the smart contract.

Pattern: ^\S+$
displayNameanyRequired

The name given to this contract for display purposes.

addressesanyRequired

The address of the contract from the blockchain. Depending on the network or protocol this may have several meanings and vary depending on the specific API or network.

vaultIdanyRequired

The Elements database id of the wallet containing the default account to be used for contract related requests.

metadataanyOptional

Any metadata for this contract.

Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
put
PUT /api/rest/blockchain/omni/smart_contract/{contractId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 80

{
  "name": null,
  "displayName": null,
  "addresses": null,
  "vaultId": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Creates a new Vault

post

Creates a new Vault, associated with the given user.

Authorizations
Body
userIdanyRequired

The elements-defined user ID to own the vault.

displayNameanyRequired

A user-defined name for the vault. This is used simply for the user's reference and has no bearing onthe vault's functionality.

passphraseanyOptional

The passphrase used to to encrypt the vault. If empty, then the vault will not be encrypted. Some configurations may opt to disallow encryption entirely.

algorithmundefined · enumOptional

The encryption algorithm used to secure the vault. Once crated, a vault will contains a private/public key pair which will be used to encrypt the wallets within the vault.

Possible values:
Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
post
POST /api/rest/blockchain/omni/vault HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "userId": null,
  "displayName": null,
  "passphrase": null,
  "algorithm": "RSA_256"
}
{
  "code": "text",
  "message": "text"
}

Updates a Vault

put

Updates a Vault with the specified name or id.

Authorizations
Path parameters
vaultIdanyRequired
Body
displayNameanyRequired

A user-defined name for the vault. This is used simply for the user's reference and has no bearing onthe vault's functionality.

userIdanyRequired

The elements-defined user ID to own the vault.

passphraseanyOptional

The current passphrase for the vault. If left null, no updates to the passphrase will be made. If not-null, then the new password must also not be null.

newPassphraseanyOptional

The updated passphrase for the vault. If left null, no updates to the passphrase will be made. If not-null, then the password must also not be null.

Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
put
PUT /api/rest/blockchain/omni/vault/{vaultId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 73

{
  "displayName": null,
  "userId": null,
  "passphrase": null,
  "newPassphrase": null
}
{
  "code": "text",
  "message": "text"
}

Creates a new Wallet

post

Creates a new Wallet, associated with the given user.

Authorizations
Path parameters
vaultIdanyRequired
Body

Creates a new custodial wallet.

displayNameanyRequired

A user-defined name for the wallet. This is used simply for the user's reference and has no bearing onthe wallet's functionality.

apiundefined · enumRequired

The protocol of this wallet. Once set, this cannot be unset.

Possible values:
networksanyRequired

The networks associated with this wallet. All must support the Wallet's protocol.

preferredAccountanyOptional

The default identity. Must not be larger than the count of identities.

accountsanyRequired

Specifies a Custodial Wallet Account Creating a Wallet

Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
post
POST /api/rest/blockchain/omni/vault/{vaultId}/wallet HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "displayName": null,
  "api": "NEO",
  "networks": [],
  "preferredAccount": null,
  "accounts": [
    {
      "generate": null,
      "address": null,
      "privateKey": null
    }
  ]
}
{
  "code": "text",
  "message": "text"
}

Updates a Wallet

put

Updates a Wallet with the specified name or id.

Authorizations
Path parameters
vaultIdanyRequired
walletIdanyRequired
Body

Updates a Wallet.

displayNameanyOptional

The new display name of the wallet.

preferredAccountany · min: 1Optional

The default identity. Must not be larger than the count of identities.

networksanyRequired

The networks associated with this wallet. All must support the Wallet's protocol.

Responses
400Error
application/json
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
put
PUT /api/rest/blockchain/omni/vault/{vaultId}/wallet/{walletId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "displayName": null,
  "preferredAccount": null,
  "networks": []
}
{
  "code": "text",
  "message": "text"
}