User

GraphQL queries showing you how to get information around users

User Details

The following query returns the full set of data available for the given user record, including user information, certificates, and holdings.

query{
  users (filter: {key:"id", operator:EQ, value:"fi-a:101:bc6f1969-0a01-489b-94a7-fe0c0ecc54e4"}) {
    nodes {
      id
      name
      organizationId
      publicKey
      
      metadata {
        acl
      }
      
      certificates  {
        nodes {
            id
            profileId
            type
            providerId
            issuedAt
            expiry
            data
            documents {
              nodes{
                id
                uri
                name
                mimeType
              }
            }
        }
      }      
      holdings {
        nodes {                
            assetType          
            asset {
             ...on FiatAsset {
                  code
             }
             ... on Cryptocurrency {
                 symbol        
             }
             ...on FinP2PAsset {
               resourceId     
             } 
            }            
            balance            
        }
      }                    
    }
  }
}
{
  "data": {
    "users": {
      "nodes": [
        {
          "id": "bank-us:101:482cc7ef-3cde-48d2-bd69-f2ab8b9a1499",
          "name": "",
          "organizationId": "bank-us",
          "publicKey": "02f07bebc437cdc2cfce83d1b5f357295c07514de7cc87942900a3c34d1c000a5e",
          "metadata": {
            "acl": [
              "circle-escrow"
            ]
          },
          "certificates": {
            "nodes": [
              {
                "id": "bank-us:101:482cc7ef-3cde-48d2-bd69-f2ab8b9a1499_318ac2ad-add2-4154-88e4-2473394452b5",
                "profileId": "bank-us:101:482cc7ef-3cde-48d2-bd69-f2ab8b9a1499",
                "type": "ownerInfo",
                "providerId": "bank-us",
                "issuedAt": 1666786481,
                "expiry": 1698322481,
                "data": "{\"email\":\"[email protected]\",\"name\":\"Test1\",\"type\":\"company\"}",
                "documents": {
                  "nodes": []
                }
              },
              {
                "id": "bank-us:101:482cc7ef-3cde-48d2-bd69-f2ab8b9a1499_5b3ea104-4d44-4c61-9b52-47743cce877e",
                "profileId": "bank-us:101:482cc7ef-3cde-48d2-bd69-f2ab8b9a1499",
                "type": "KYC/AML",
                "providerId": "bank-us",
                "issuedAt": 1669940081,
                "expiry": 1666786481,
                "data": "{\"name\":\"AML/KYC Compliance\",\"country\":\"United States\",\"info\":[{\"type\":\"text\",\"name\":\"Certificate ID\",\"value\":\"FI0SXE8NIQ6\"},{\"type\":\"text\",\"name\":\"Country\",\"value\":\"United States\"}]}",
                "documents": {
                  "nodes": []
                }
              }
            ]
          },
          "holdings": {
            "nodes": []
          }
        }
      ]
    }
  }
}