Ontology Developer Center
DISCOVERCOMMUNITYSUPPORT
  • Introduction
  • Discover Ontology
  • Getting Started
  • Glossary
  • Decentralized Identity and Data
    • ONT ID
      • Decentralized Identifiers
        • Method Specification for Ontology
        • Method Specification for Ethereum
        • Method Specification for BSC
      • Verifiable Credentials
        • Anonymous Credentials
      • ONT Login
        • Scenarios
        • Protocol Specification
        • Front-end JavaScript SDK
          • Integration and Usage
          • API Reference
        • Front-end UI SDK
          • Integration and Usage
          • API Reference
        • Back-end Go SDK
          • Integration and Usage
          • API Reference
        • Back-end Java SDK
          • Integration and Usage
          • API Reference
      • ONT TAG
        • Workflow
        • API Reference
      • Mercury
      • OScore
    • DDXF
      • Components and Interfaces
      • GREP
      • Overall Scheme
      • Solutions
        • Marketplace
          • Deployment
          • Scenarios
          • SaaS Tenant
          • Java SDK
        • Data Storage
          • Deployment
          • Java SDK
        • Resource Auditor
        • Offline Judge
      • Use Cases
        • E-Shops
  • ONTOLOGY ELEMENTS
    • Smart Contracts
      • Types of smart contracts
    • Token Protocols
    • Consensus Mechanism
    • Ontology Oracle
      • Oracle Process Flow
  • GUIDES & TUTORIALS
    • Development Guides
      • dApp Development
        • Using the dAPI
        • Data Synchronization
      • Smart Contract Development
        • EVM Contract
          • Development Environment and Tools
          • Wallet Setup
          • Contract Development
          • How to Deploy a Smart Contract with GetBlock
        • NeoVM Contract
          • Development tools and environment
          • Launching the IDE
          • Writing and editing program logic
          • Deploying and testing on private net
        • WASM Contract
          • Development Environment
          • Project Initiation - Hello World
          • Creating your own project
          • Development using SmartX
          • Runtime API
          • Contract Fundamentals
          • Inter-contract Interaction
          • Developing Contracts in C++
        • Publish Contract Source Code
    • Integration Guides
      • dApp Integration
        • dAPI Integration
          • Chrome Plugin
          • Mobile wallet dApp
          • QR code mechanism
          • Wake call mechanism
        • Cocos 2D-x
        • Unity 3D applications
      • Mobile Wallet Integration
        • SDK integration
        • dAPI Integration
          • In-wallet applications
          • QR code mechanism
          • Wake call mechanism
        • Stake
      • Using ONT ID
      • Exchange Integration
        • Exchange Docking Guide
        • Exchange API
      • Ontology for dApp Stores
    • EVM & Token Decimals Upgrade
  • ONTOLOGY NODE
    • Abstract
    • Node Deployment
      • Standard Node
      • Rosetta Node
    • Interacting with a Public Node
  • DEVELOPER TOOLS
    • dApp Development Framework
      • Punica CLI
      • Punica boxes
      • Solo Chain
    • IDE
    • APIs
      • HTTP API
        • Restful
        • WebSocket
        • Remote Procedure Call (RPC)
      • Explorer v2 API
        • Block
        • Address
        • Contract
        • Token
        • Transactions
        • ONT ID
        • Summary
        • Node
      • Native Token API
        • ONT Contract API
        • ONG Contract API
      • ONT ID Contract API
      • Web3 API
      • OScore Open API
      • Rosetta Node API
        • Data API
        • Construction API
      • DToken Contract API
      • DDXF
        • Marketplace Contract API
        • Storage API
      • Governance API
    • Digital Wallet
      • Chrome Plugin provider
      • Chrome Plugin dAPI
      • Mobile version provider
      • Mobile version dAPI
    • SDKs
    • Signing Server
      • Installation
      • API reference
  • COMMUNITY
    • Ecosystem Programs
    • Community Libraries
    • Community Events
    • Community Channels
    • Core Contributors
  • SUPPORT
    • FAQ
      • Basic blockchain concepts
      • Ontology Nodes
      • Ontology token protocols
      • Smart contracts
      • SDKs and APIs
    • Contact Us
Powered by GitBook
On this page
  • ONT ID description
  • DDO Attribute
  • 1. Get latest ONT ID list
  • 2. Get ONT ID list by page
  • 3. Get ONT ID transaction list by page
  • 4. Get ONT ID DDO

Was this helpful?

  1. DEVELOPER TOOLS
  2. APIs
  3. Explorer v2 API

ONT ID

APIs to obtain ONT ID related details

ONT ID description

Value

Type

Description

register OntId

String

register OntId

add publicKey:xxxxx

String

add publicKey

remove publicKey:xxxxx

String

remove publicKey

add attribute:value1&value2

String

add attribute

update attribute:xxxx

String

update attribute

remove attribute:xxxx

String

remove attribute

change recovery:xxxx

String

change recovery

add recovery:xxxx

String

add recovery

create new claim: claimId:xxxxxx

String

create claim

DDO Attribute

Key

Value

Type

Description

Claim

ContextDesc

String

description

ClaimContext

String

claim context

IssuerOntId

String

ONT ID of the issuer

ClaimId

String

hash of the claim

SelfDefined

value

String

user defined DDO info

1. Get latest ONT ID list

url:/v2/latest-ontids?count=10, 
method:GET, 
successResponse:{
    "code":0, 
    "msg":"SUCCESS", 
    "result":[
        {
            "ontid":"did:ont:TA7aqop3BcYJpHtEEyfg1ucausfDETyTQA", 
            "description":"register OntId", 
            "tx_hash":"9762458cd30612509f7c...a010ccc7b347057eb5", 
            "tx_type":209, 
            "tx_time":1522210288, 
            "block_height":1212, 
            "fee":"0.01"
        }
    ]
}

Url RequestField

Type

Description

count

int

number of latest ontids (limited between 1 and 50)

ResponseField

Type

Description

ontid

String

ONT ID

tx_hash

String

transaction hash

block_height

int

block height

tx_time

int

UNIX time of the transaction

description

String

transaction description for given ONT ID

tx_type

int

209

fee

String

fee

2. Get ONT ID list by page

url:/v2/ontids?page_size=10&page_number=1, 
method:GET, 
successResponse:{
    "code":0, 
    "msg":"SUCCESS", 
    "result":{
    	"records":[
            {
                "ontid":"did:ont:TA7aqop3BcYJpHtEEyfg1ucausfDETyTQA", 
                "description":"register OntId", 
                "tx_hash":"9762458cd30612509f7c...a010ccc7b347057eb5", 
                "tx_type":209, 
                "tx_time":1522210288, 
                "block_height":1212, 
                "fee":"0.01"
            }
    	], 
    	"total":100
    }
}

Url RequestField

Type

Description

page_size

int

number of records in one page (The page size is limited between 1 and 20)

page_number

int

number of the page (At least 1 or greater)

ResponseField

Type

Description

total

int

total ONT ID

ontid

String

ONT ID

tx_hash

String

transaction hash

block_height

int

block height

tx_time

int

UNIX time of the transaction

description

String

transaction description for given ONT ID

tx_type

int

209

fee

String

fee

3. Get ONT ID transaction list by page

url:/v2/ontids/{ontid}/transactions?page_size=10&page_number=1, 
method:GET, 
successResponse:{
    "code":0, 
    "msg":"SUCCESS", 
    "result":{
		"records":[
			{
				"tx_hash":"df272d8bf471ed...669fadc996f1b3f", 
				"block_height":123, 
				"tx_type": 209, 
				"tx_time":1522213966, 
				"description":"add attribute:claim", 
				"fee":"0.01", 
				"ontid": "did:ont:TA96Nqm9HRFKzudLjgH16Zfvdw3ixq8UGZ"
			}
		], 
		"total":10
    }
}

RequestField

Type

Description

ontid

String

ONT ID

page_size

int

number of records in one page (The page size is limited between 1 and 20)

page_number

int

number of the page (At least 1 or greater)

ResponseField

Type

Description

tx_hash

String

transaction hash

block_height

int

block height

tx_type

int

209

fee

String

fee

ontid

String

ONT ID

tx_time

int

UNIX time of the transaction

description

String

transaction description for given ONT ID

total

int

total transactions of the ONT ID

4. Get ONT ID DDO

url:/v2/ontids/{ontid}/ddo, 
method:GET, 
successResponse:{
    "code":0, 
    "msg":"SUCCESS", 
    "result":{
        "Attributes":[
            {
                "Claim":{
                    "ClaimId":"111ab2f56d106da...8fa65a9996b03ba0", 
                    "ClaimContext":"claim:github_authentication", 
                    "ContextDesc":"my github claim", 
                    "IssuerOntId":"did:ont:TKhyXw8o...sy4p6fYZPB"
                }
            }
        ], 
        "OntId":"did:ont:TA7aqop3B...ausfDETyTQA", 
        "Owners":[
            {
                "Type": "ECDSA", 
                "Curve": "P-256", 
                "Value": "120203cef1f2ff7...4031dcdf5c5772e449", 
                "PublicKeyId": "did:ont:TA96Nq...vdw3ixq8UGZ#keys-1"
            }
        ]
    }
}

RequestField

Type

Description

ontid

String

ONT ID

ResponseField

Type

Description

Attributes

list

Attribute of the ONT ID

OntId

String

ONT ID

Owners.Type

String

ECDSA

Owners.Curve

String

P-256

Owners.Value

String

publickey in HEX string

PreviousTransactionsNextSummary

Last updated 4 years ago

Was this helpful?