Skip to content

Instantly share code, notes, and snippets.

@AnthonyLaw
Created June 27, 2018 03:16
Show Gist options
  • Save AnthonyLaw/b8c0c92040164d1c6ec0525c76fc2724 to your computer and use it in GitHub Desktop.
Save AnthonyLaw/b8c0c92040164d1c6ec0525c76fc2724 to your computer and use it in GitHub Desktop.
Catapult api list

Catapult REST API Reference

Version: 0.7.7

License: Apache 2.0

Find out more about NEM2

/account/{accountId}


GET

Summary: Get account information

Description: Returns AccountInfo for an account.

Parameters

Name Located in Description Required Schema
accountId path Account address or publicKey. Yes string

Responses

Code Description Schema
200 success AccountInfoDTO
404 resource not found
409 invalid argument

/account


POST

Summary: Get accounts information

Description: Returns AccountsInfo for different accounts.

Parameters

Name Located in Description Required Schema
addresses body Array of addresses. Yes addresses

Responses

Code Description Schema
200 success [ AccountInfoDTO ]
400 invalid content
409 invalid argument

/account/{publicKey}/transactions


GET

Summary: Get confirmed transactions information

Description: Gets an array of confirmed transaction for which an account is signer or recipient.

Parameters

Name Located in Description Required Schema
publicKey path Account publicKey. Yes string
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
409 invalid argument

/account/{publicKey}/transactions/incoming


GET

Summary: Get incoming transactions information

Description: Gets an array of transactions for which an account is the recipient. A transaction is said to be incoming regarding an account if the account is the recipient of a transaction.

Parameters

Name Located in Description Required Schema
publicKey path Account publicKey. Yes string
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
409 invalid argument

/account/{publicKey}/transactions/outgoing


GET

Summary: Get outgoing transactions information

Description: Gets an array of transactions for which an account is the sender. A transaction is said to be outgoing regarding an account if the account is the sender of a transaction.

Parameters

Name Located in Description Required Schema
publicKey path Account publicKey. Yes string
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
409 invalid argument

/account/{publicKey}/transactions/unconfirmed


GET

Summary: Get unconfirmed transactions information

Description: Gets the array of transactions for which an account is the sender or receiver and which have not yet been included in a block.

Parameters

Name Located in Description Required Schema
publicKey path Account publicKey. Yes string
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
409 invalid argument

/account/{publicKey}/transactions/partial


GET

Summary: Get aggregate bonded transactions information

Description: Gets an array of aggregate bonded transactions for which an account is the sender or has signed the transaction. A transaction is said to be aggregate bonded regarding an account if announced but there are missing signatures.

Parameters

Name Located in Description Required Schema
publicKey path Account publicKey. Yes string
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
409 invalid argument

/account/{accountId}/multisig


GET

Summary: Get multisig account information

Description: Returns MultisigAccountInfo for an account.

Parameters

Name Located in Description Required Schema
accountId path Account address or public key. Yes string

Responses

Code Description Schema
200 success MultisigAccountInfoDTO
404 resource not found
409 invalid argument

/account/{accountId}/multisig/graph


GET

Summary: Get multisig account graph information

Description: Returns MultisigAccountGraphInfo for an account.

Parameters

Name Located in Description Required Schema
accountId path Account address or public key. Yes string

Responses

Code Description Schema
200 success [ MultisigAccountGraphInfoDTO ]
404 resource not found
409 invalid argument

/blocks/{height}/limit/{limit}


GET

Summary: Get blocks information

Description: Returns an array of BlockInfo for a given block height and limit.

Parameters

Name Located in Description Required Schema
height path Block height. Yes long
limit path Number of following blocks to be returned. Yes integer (int)

Responses

Code Description Schema
200 success [ BlockInfoDTO ]
409 invalid argument

/block/{height}


GET

Summary: Get block information

Description: Returns BlockInfo for a given block height.

Parameters

Name Located in Description Required Schema
height path Block height. Yes long

Responses

Code Description Schema
200 success BlockInfoDTO
404 resource not found
409 invalid argument

/block/{height}/transactions


GET

Summary: Get transactions from a block

Description: Returns array of transactions included in a block for a block height.

Parameters

Name Located in Description Required Schema
height path Block height Yes long
pageSize query The number of transactions to return. Should be between 10 and 100, otherwise 10. No integer
id query Identifier of the transaction after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ object ]
404 resource not found
409 invalid argument

/chain/height


GET

Summary: Get the current height of the chain

Description: Returns the current blockchain height.

Responses

Code Description Schema
200 success HeightDTO

/chain/score


GET

Summary: Get the current score of the chain

Description: Returns the current chain score.

Responses

Code Description Schema
200 success BlockchainScoreDTO

/diagnostic/storage


GET

Summary: Get the storage information

Description: Returns statistical information about the blockchain.

Responses

Code Description Schema
200 success BlockchainStorageInfoDTO

/mosaic/{mosaicId}


GET

Summary: Get mosaic information

Description: Returns MosaicInfo for a given mosaicId.

Parameters

Name Located in Description Required Schema
mosaicId path Mosaic identifier. Yes string

Responses

Code Description Schema
200 success MosaicInfoDTO
404 resource not found
409 invalid argument

/mosaic


POST

Summary: Get information for a set of mosaics

Description: Returns MosaicInfo for a given set of mosaicIds.

Parameters

Name Located in Description Required Schema
mosaicIds body Array of mosaicIds. Yes mosaicIds

Responses

Code Description Schema
200 success [ MosaicInfoDTO ]
400 invalid content
409 invalid argument

/namespace/{namespaceId}/mosaics


GET

Summary: Get mosaics information.

Description: Returns an array of MosaicInfo from mosaics created under provided namespace.

Parameters

Name Located in Description Required Schema
namespaceId path Namespace identifier. Yes string
pageSize query The number of mosaics to return. No integer
id query Identifier of the mosaic after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ MosaicInfoDTO ]
409 invalid argument

/mosaic/names


POST

Summary: Get readable names for a set of mosaics

Description: Returns names for mosaics.

Parameters

Name Located in Description Required Schema
mosaicIds body Array of mosaicIds. Yes mosaicIds

Responses

Code Description Schema
200 success [ MosaicNameDTO ]
400 invalid content
409 invalid argument

/namespace/{namespaceId}


GET

Summary: Get namespace information

Description: Returns NamespaceInfo for a given namespaceId.

Parameters

Name Located in Description Required Schema
namespaceId path Namespace identifier. Yes string

Responses

Code Description Schema
200 success NamespaceInfoDTO
404 resource not found
409 invalid argument

/account/{accountId}/namespaces


GET

Summary: Get namespaces an account owns

Description: Returns an array of NamespaceInfo for an account.

Parameters

Name Located in Description Required Schema
accountId path Account address or public key. Yes string
pageSize query The number of namespaces to return. No integer
id query Identifier of the namespace after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ NamespaceInfoDTO ]
409 invalid argument

/account/namespaces


POST

Summary: Get namespaces information

Description: Returns an array of NamespaceInfo for a given set of addresses.

Parameters

Name Located in Description Required Schema
addresses body Accounts address array. Yes addresses
pageSize query The number of namespaces to return. No integer
id query Identifier of the namespace after which we want the transactions to be returned. No string

Responses

Code Description Schema
200 success [ NamespaceInfoDTO ]
400 invalid content
409 invalid argument

/namespace/names


POST

Summary: Get readable names for a set of namespaces

Description: Returns names for namespaces.

Parameters

Name Located in Description Required Schema
namespaceIds body Array of namespaceIds. Yes namespaceIds

Responses

Code Description Schema
200 success [ NamespaceNameDTO ]
400 invalid content
409 invalid argument

/transaction/{transactionId}


GET

Summary: Get transaction information

Description: Returns transaction given its transactionId or hash.

Parameters

Name Located in Description Required Schema
transactionId path TransactionId or hash. Yes string

Responses

Code Description Schema
200 success object
404 resource not found
409 invalid argument

/transaction


POST

Summary: Get transactions information

Description: Returns transaction information for a given set of transactionId or hash.

Parameters

Name Located in Description Required Schema
transactionIds body Array of transactionIds or hashes. Yes transactionIds

Responses

Code Description Schema
200 success [ object ]
400 invalid content
409 invalid argument
PUT

Summary: Announce a new transaction

Description: Announces a transaction to the network.

Parameters

Name Located in Description Required Schema
payload body Transaction payload. Yes transactionPayload

Responses

Code Description Schema
202 success object
400 invalid content
409 invalid argument

/transaction/partial


PUT

Summary: Announce an aggregate bonded transaction

Description: Announces an aggregate bonded transaction to the network.

Parameters

Name Located in Description Required Schema
payload body Transaction payload. Yes transactionPayload

Responses

Code Description Schema
202 success object
400 invalid content
409 invalid argument

/transaction/cosignature


PUT

Summary: Announce a cosignature transaction

Description: Announces a cosignature transaction to the network.

Parameters

Name Located in Description Required Schema
payload body Transaction payload. Yes transactionPayload

Responses

Code Description Schema
202 success object
400 invalid content
409 invalid argument

/transaction/{hash}/status


GET

Summary: Get transaction status

Description: Returns transaction status for a given transactionId or hash.

Parameters

Name Located in Description Required Schema
hash path Transaction hash. Yes string

Responses

Code Description Schema
200 success TransactionStatusDTO
404 resource not found
409 invalid argument

/transaction/statuses


POST

Summary: Get transactions status.

Description: Returns an array of transaction statuses for a given set of transactionId or hash.

Parameters

Name Located in Description Required Schema
transactionHashes body Array of transactionIds or hashes. Yes transactionHashes

Responses

Code Description Schema
200 success [ TransactionStatusDTO ]
400 invalid content
409 invalid argument

/network


GET

Summary: Get the current network type of the chain

Description: Returns the current network type.

Responses

Code Description Schema
200 success NetworkTypeDTO

Models


AccountInfoDTO

Name Type Description Required
meta AccountMetaDTO Yes
account AccountDTO Yes

AccountMetaDTO

Name Type Description Required
AccountMetaDTO object

AccountDTO

Name Type Description Required
address string Yes
addressHeight UInt64DTO Yes
publicKey string Yes
publicKeyHeight UInt64DTO Yes
mosaics [ MosaicDTO ] Yes
importance UInt64DTO Yes
importanceHeight UInt64DTO Yes

MultisigAccountGraphInfoDTO

Name Type Description Required
level integer Yes
multisigEntries [ MultisigAccountInfoDTO ] Yes

MultisigAccountInfoDTO

Name Type Description Required
multisig Multisig Yes

Multisig

Name Type Description Required
account string Yes
accountAddress string No
minApproval integer Yes
minRemoval integer Yes
cosignatories [ string ] Yes
multisigAccounts [ string ] Yes

AnnounceTransactionInfoDTO

Name Type Description Required
message string Yes

TransactionStatusDTO

Name Type Description Required
group string No
status string Yes
hash string No
deadline UInt64DTO No
height UInt64DTO No

MosaicDTO

Name Type Description Required
id UInt64DTO Yes
amount UInt64DTO Yes

MosaicInfoDTO

Name Type Description Required
meta NamespaceMosaicMetaDTO Yes
mosaic MosaicDefinitionDTO Yes

NamespaceMosaicMetaDTO

Name Type Description Required
active boolean Yes
index integer Yes
id string Yes

MosaicDefinitionDTO

Name Type Description Required
namespaceId UInt64DTO Yes
mosaicId UInt64DTO Yes
supply UInt64DTO Yes
height UInt64DTO Yes
owner string Yes
properties MosaicPropertiesDTO Yes
levy object Yes

MosaicPropertiesDTO

Name Type Description Required
MosaicPropertiesDTO array

MosaicNameDTO

Name Type Description Required
parentId UInt64DTO Yes
mosaicId UInt64DTO Yes
name string Yes

NamespaceInfoDTO

Name Type Description Required
meta NamespaceMosaicMetaDTO Yes
namespace NamespaceDTO Yes

NamespaceDTO

Name Type Description Required
type integer Yes
depth integer Yes
level0 UInt64DTO Yes
level1 UInt64DTO No
level2 UInt64DTO No
parentId UInt64DTO Yes
owner string Yes
ownerAddress string No
startHeight UInt64DTO Yes
endHeight UInt64DTO Yes

NamespaceNameDTO

Name Type Description Required
parentId UInt64DTO No
namespaceId UInt64DTO Yes
name string Yes

BlockInfoDTO

Name Type Description Required
meta BlockMetaDTO Yes
block BlockDTO Yes

BlockMetaDTO

Name Type Description Required
hash string Yes
generationHash string Yes
totalFee UInt64DTO Yes
numTransactions number Yes

BlockDTO

Name Type Description Required
signature string Yes
signer string Yes
version number Yes
type number Yes
height UInt64DTO Yes
timestamp UInt64DTO Yes
difficulty UInt64DTO Yes
previousBlockHash string Yes
blockTransactionsHash string Yes

HeightDTO

Name Type Description Required
height UInt64DTO Yes

BlockchainScoreDTO

Name Type Description Required
scoreHigh UInt64DTO Yes
scoreLow UInt64DTO Yes

BlockchainStorageInfoDTO

Name Type Description Required
numBlocks integer Yes
numTransactions integer Yes
numAccounts integer Yes

NetworkTypeDTO

Name Type Description Required
name string Yes
description string Yes

mosaicIds

Name Type Description Required
mosaicIds [ string ] No

namespaceIds

Name Type Description Required
namespaceIds [ string ] No

addresses

Name Type Description Required
addresses [ string ] No

transactionIds

Name Type Description Required
transactionIds [ string ] No

transactionHashes

Name Type Description Required
hashes [ string ] No

transactionPayload

Name Type Description Required
payload string No

UInt64DTO

Name Type Description Required
UInt64DTO array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment