DAPI Endpoints#
Overview#
DAPI currently provides 2 types of endpoints: JSON-RPC and gRPC. The JSON-RPC endpoints expose some layer 1 information while the gRPC endpoints support layer 2 as well as streaming of events related to blocks and transactions/transitions.
Platform Endpoints#
In addition to providing the requested data, the following endpoints can also provide proofs that the data returned is valid and complete. The endpoints are versioned so updates can be made to them without introducing issues for endpoint consumers.
Contested Resources#
Endpoint |
Description |
|---|---|
Added in Dash Platform v1.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Retrieves vote polls that will end within a specified date range |
Data Contracts and Documents#
Endpoint |
Description |
|---|---|
Returns the requested data contract |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v5.0.0 |
|
Added in Dash Platform v5.0.0 |
|
Added in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
Contract Moderation#
Added in version 5.0.0.
Contract moderation, introduced in protocol version 14, lets a data contract keep a banlist, a suspension list, and a warning list of identities, and lets its moderators delete documents. A contract’s moderators are its owner, identities it appoints, or a team elected by masternodes. A banned or suspended identity cannot submit document transitions for the contract. The endpoints in this section read an identity’s moderation status, the lists themselves, the records of removed documents, and the actions and action counts of an elected contract’s seated moderation team.
Endpoint |
Description |
|---|---|
Returns an identity’s status on one or more moderation lists of a moderated data contract: whether it is banned, until when it is suspended, and which warnings it carries. |
|
Returns one page of a moderated contract’s banlist, suspension list, or warning list, in identity ID order. |
|
Returns the removal records of documents that a contract’s moderators deleted from one document type, either for specific document IDs or as a page in document ID order. A record shows who removed the document, when, and why, and whether it has since been restored. |
|
Returns one page of the actions that an elected contract’s seated moderation team is voting on (active) or has carried out (closed), in action ID order. |
|
Returns the team members that approved one of the actions an elected contract’s seated moderation team votes on. |
|
Returns how many counted moderation actions (bans, suspensions, warnings, and document deletions) each member of an elected contract’s seated moderation team has signed since the moderators fee pot was last paid out. |
Identities#
Endpoint |
Description |
|---|---|
Returns the requested identity |
|
Returns the requested identity’s balance |
|
Returns the requested identity’s balance and revision |
|
Updated in Dash Platform v5.0.0 |
|
Returns the identity associated with the provided public key hash |
|
Returns the identity contract nonce |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v5.0.0 |
|
Returns the current identity nonce |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
Security Groups#
Added in version 2.0.0.
Security groups provide a way to distribute token configuration and update authorization across multiple identities. Each group defines a set of member identities, the voting power of each member, and the required power threshold to authorize an action. The endpoints in this section are used to retrieve information about groups and the actions they are performing.
Endpoint |
Description |
|---|---|
Retrieves information about a specific group within a contract, including its members and required power. |
|
Retrieves information about multiple groups within a contract, including their members and required power. |
|
Updated in Dash Platform v5.0.0 |
|
Retrieves the signers for a specified group action within a contract, along with their assigned power. |
Contract Groups#
Added in version 5.0.0.
From protocol version 14, contract groups organize data contracts, document types, and tokens into an identity-owned collection, which authentication keys can be scoped to. Each group has an owner, optional admins, and an optional name and description. Contract groups are not the same as security groups: security groups are defined inside a data contract and their member identities jointly authorize token actions, while the members of a contract group are contracts, document types, and tokens.
Endpoint |
Description |
|---|---|
Retrieves the stored information of a contract group: its owner, admins, name, and description. |
|
Retrieves one page of a contract group’s members of a single kind: member contracts, member document types, or member tokens. |
|
Retrieves the contract groups a data contract belongs to, whether as a whole contract, through its document types, or through its tokens. |
State Transitions#
Endpoint |
Description |
|---|---|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
System Info#
Endpoint |
Description |
|---|---|
Added in Dash Platform v1.4.0 |
|
Added in Dash Platform v1.3.0 |
|
Added in Dash Platform v1.3.0 |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v2.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Returns the number of votes cast for each protocol version |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v1.1.0 |
Tokens#
Added in version 2.0.0.
Endpoint |
Description |
|---|---|
Retrieves the token balances of a specified identity. |
|
Retrieves the token balances for a list of specified identities. |
|
Retrieves information about specified tokens for a given identity. |
|
Retrieves token information for a list of specified identities. |
|
Retrieves contract information associated with a specific token ID. |
|
Retrieves direct purchase prices defined for the specified token IDs. |
|
Retrieves the last-claim timestamp for a token’s perpetual distribution for a specific identity. |
|
Retrieves pre-programmed distributions of a specified token. |
|
Retrieves the statuses of specified tokens. |
|
Retrieves the total supply of a specified token, including aggregated user accounts and system-held amounts. |
Address System#
Added in version 3.0.0.
Endpoint |
Description |
|---|---|
Returns balance and nonce information for a specified address. |
|
Returns balance and nonce information for multiple addresses. |
|
Returns a proof of the trunk state of the address tree. |
|
Returns a Merkle proof for a branch of the address tree. |
|
Returns recent address balance changes starting from a specified block height. |
|
Returns compacted address balance changes from a specified block height. |
Shielded Transactions#
Attention
Shielded Transaction endpoints are defined in the protocol but are not yet available on public nodes.
Added in version 4.0.0.
Endpoint |
Description |
|---|---|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
|
Updated in Dash Platform v5.0.0 |
Core Endpoints#
The following endpoints provide information about the Core chain.
JSON-RPC Endpoints#
These endpoints historically expose Core information; getStatus is the exception and returns
Platform status.
Endpoint |
Description |
|---|---|
Returns block hash of the chaintip |
|
Returns block hash of the requested block |
|
Returns Platform status information |
|
Updated in Dash Platform v5.0.0 |
gRPC Endpoints#
Endpoint |
Description |
|---|---|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Returns information for the requested block |
|
Added in Dash Platform v1.0.0 |
|
Returns masternode status information |
|
Returns details for the requested transaction |
|
Updated in Dash Platform v5.0.0 |
|
Added in Dash Platform v1.0.0 |
|
Updated in Dash Platform v5.0.0 |
Note
The previous version of documentation can be viewed here.