Sismo Docs
  • Welcome to Sismo
    • What is Sismo?
  • Build with Sismo Connect
    • Overview
    • Installation
    • Sismo Connect Cheatsheet
    • Tutorials
      • Get Your appId - Create a Sismo Connect App
      • Onchain Tutorial (1/2): Code Your Airdrop Contract With Privately-Aggregated Data
      • Onchain Tutorial (2/2): Deploy Your Airdrop Contract
    • Technical Documentation
      • Sismo Connect Configuration
      • Auths
      • Claims
      • Signature
      • Packages
        • Sismo Connect Client: Request
        • Sismo Connect React: Request
        • Sismo Connect Server: Verify Offchain
        • Sismo Connect Solidity Library: Verify Onchain
    • FAQ
  • Data Groups
    • Overview
    • Tutorials
      • Factory Guide: Create a Data Group in 5 Minutes
      • Sismo Hub Guide: Create Data Groups Programmatically
      • Sismo Hub Guide: Add a Data Provider to the Sismo Factory
    • Sismo Hub
      • Sismo Hub Repository
        • Group Generators
        • Data Providers
        • Data Operators
        • Command Line Interface
      • Accounts Registry Tree
  • Data Vault
    • Overview
    • Vault Identifiers
    • Proving Schemes
      • Hydra-S1
      • Hydra-S2
    • Commitment Mapper
  • Resources
    • Deployed Contract Addresses
    • Sismo API
      • API Links
      • Query From a Client
      • Group
        • Get groups
        • Get group snapshots
      • Common Parameters
      • Advanced Filtering
      • Transaction
  • Links
    • Sismo Landing Page
    • Sismo Factory
    • Sismo App Store
    • Sismo Builder Resources
    • GitHub
    • Discord
    • Twitter
    • Blog
Powered by GitBook
On this page
  • Query a group
  • Query all groups
  1. Resources
  2. Sismo API
  3. Group

Get groups

Query toolkit to fetch group metadata and its snapshots

PreviousGroupNextGet group snapshots

Last updated 1 year ago

Query a group

You can query a group by its id or its name. The name argument is not case sensitive, you can see all the groups created on the .

query getGroupFromId {
  group (id: "0x682544d549b8a461d7fe3e589846bb7b") {
    id
    name
    description
    specs
    generationFrequency
    latestSnapshot {
      id
      dataUrl
      size
      valueDistribution {
        value
        numberOfAccounts
      }
      timestamp
    }
    snapshots {
      id
      size
      timestamp
      valueDistribution {
        numberOfAccounts
        value
      }
    }
  }
}
query getGroupFromName{
  group (name: "proof-of-humanity") {
    id
    name
    description
    specs
    generationFrequency
    latestSnapshot {
      id
      dataUrl
      size
      valueDistribution {
        value
        numberOfAccounts
      }
      timestamp
    }
    snapshots {
      id
      size
      timestamp
      valueDistribution {
        numberOfAccounts
        value
      }
    }
  }
}
{
  "data": {
    "group": {
      "id": "0x682544d549b8a461d7fe3e589846bb7b",
      "name": "proof-of-humanity",
      "description": "Prove you are a human with PoH",
      "specs": "Appear as a verified Proof of Humanity submission on the Proof of Humanity subgraph",
      "generationFrequency": "weekly",
      "latestSnapshot": {
        "id": "0x682544d549b8a461d7fe3e589846bb7b6c617465737400000000000000000000",
        "dataUrl": "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com/group-snapshot-store/0x682544d549b8a461d7fe3e589846bb7b/1678111868.json",
        "size": 17054,
        "valueDistribution": [
          {
            "value": "1",
            "numberOfAccounts": 17014
          },
        ],
        "timestamp": "latest"
      },
      "snapshots": [
        {
          "id": "0x682544d549b8a461d7fe3e589846bb7b0000000000000000000000006405c984",
          "size": 17054,
          "timestamp": "1678100868",
          "valueDistribution": [
            {
              "numberOfAccounts": 17014,
              "value": "1"
            },
          ]
        },
        ...
        ...
        {
          "id": "0x682544d549b8a461d7fe3e589846bb7b000000000000000000000000631eff65",
          "size": 15711,
          "timestamp": "1662975845",
          "valueDistribution": [
            {
              "numberOfAccounts": 15711,
              "value": "1"
            }
          ]
        }
      ]
    }
  }
}

Query all groups

You can query all the groups created on Sismo with their latest snapshot (the last data for this group) with this simple query.

query getAllGroups {
  groups {
    id
    generationFrequency
    description
    name
    specs
    latestSnapshot {
      dataUrl
      timestamp
      id
      size
      valueDistribution {
        numberOfAccounts
        value
      }
    }
  }
}
{
  "data": {
    "groups": [
      {
        "id": "0x175a1e4c38a2d9bf13a143002be08468",
        "generationFrequency": "daily",
        "description": "Verify your e-mail address on Zohal's website",
        "name": "zohal-KYC",
        "specs": "Get your e-mail address verified",
        "latestSnapshot": {
          "dataUrl": "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com/group-snapshot-store/0x175a1e4c38a2d9bf13a143002be08468/1678629415.json",
          "timestamp": "latest",
          "id": "0x175a1e4c38a2d9bf13a143002be084686c617465737400000000000000000000",
          "size": 24,
          "valueDistribution": [
            {
              "numberOfAccounts": 24,
              "value": "1"
            }
          ]
        }
      },
      ...
      ...
      {
        "id": "0x5b9d1b3cdabdd33363ccae4659b09eda",
        "generationFrequency": "once",
        "description": "",
        "name": "-lrcrypto",
        "specs": "",
        "latestSnapshot": {
          "dataUrl": "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com/group-snapshot-store/0x5b9d1b3cdabdd33363ccae4659b09eda/1674390214.json",
          "timestamp": "latest",
          "id": "0x5b9d1b3cdabdd33363ccae4659b09eda6c617465737400000000000000000000",
          "size": 2,
          "valueDistribution": [
            {
              "numberOfAccounts": 2,
              "value": "1"
            }
          ]
        }
      }
    ]
  }
}

Sismo Factory