Count Digital Passports using Data
Retrieve the count of digital passports on your NFT Management Platform.
URL
Required rights:
adminorcertRead
To return the number of digital passports matching your filters, use /certificate/v2/search/count.
GET - https://{{nmpUrl}}/certificate/v2/search/countQuery Parameter | Type | Mandatory | Description |
|---|---|---|---|
| Object | ✅ | JSON encoded key/value request to filter results. Field list you can use in your query:
Dig deeper into compliant operators here. Compound you can use in your query to combine operators:
|
{
"q": {
"must": [
{
"range": {
"path": "blockNumberCreation",
"gt": 0
}
},
{
"regex": {
"path": "issuer",
"query": "^0x.*",
"allowAnalyzedField": true
}
}
],
"mustNot": [
{
"queryString": {
"defaultPath": "owner",
"query": "owner:0x000000000000000000000000000000000000dEaD"
}
}
]
}
}
curl --location '<https://nmpUrl.com/certificate/v2/search?q=%7B%22must%22%3A%5B%7B%22range%22%3A%7B%22path%22%3A%22blockNumberCreation%22%2C%22gt%22%3A0%7D%7D%2C%7B%22regex%22%3A%7B%22path%22%3A%22issuer%22%2C%22query%22%3A%220x.*%22%2C%22allowAnalyzedField%22%3Atrue%7D%7D%5D%2C%22mustNot%22%3A%5B%7B%22queryString%22%3A%7B%22defaultPath%22%3A%22owner%22%2C%22query%22%3A%22owner%3A%200x000000000000000000000000000000000000dEaD%22%7D%7D%5D%7D>' \\
--header 'x-api-key: yourApiKey'Return Payload
| Field | Type | Description |
|---|---|---|
count | Number | Count of digital passports minted on your NFT Management Platform. |
{
"count": 99778
}Errors
| Status Code | Success | Description |
|---|---|---|
500 | false | Something is wrong with your request. |
{}{
"ok": 0,
"code": 8,
"codeName": "UnknownError",
"$clusterTime": {
"clusterTime": {
"$timestamp": "7382159732183662725"
},
"signature": {
"hash": "aPNjdyusTSgGnJxufx08EAFxheE=",
"keyId": {
"low": 2,
"high": 1709154390,
"unsigned": false
}
}
},
"operationTime": {
"$timestamp": "7382159732183662725"
}
}Updated 4 days ago
