Skip to main content
POST
/
queries
/
evaluate
Evaluate a query against the authenticated user's credentials
curl --request POST \
  --url https://api.sandbox.humanity.org/v2/queries/evaluate \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": {
    "check": {
      "claim": "<string>",
      "operator": "<unknown>",
      "value": "<unknown>"
    }
  }
}
'
{
  "type": "<unknown>",
  "passed": true,
  "evaluatedAt": "<string>",
  "evidence": {
    "claimsUsed": [
      {
        "path": "<string>",
        "value": "<unknown>",
        "credentialId": "<string>",
        "source": "<string>"
      }
    ],
    "checkResults": [
      {
        "claim": "<string>",
        "operator": "<string>",
        "expectedValue": "<unknown>",
        "actualValue": "<unknown>",
        "passed": true
      }
    ]
  },
  "expiresAt": "<string>"
}

Body

application/json

The query to evaluate

Request body for query evaluation.

query
object
required

The query to evaluate. Can be a simple check or compound policy.

Response

200 - application/json

Query evaluation result

Response from predicate query evaluation.

type
any
required
passed
boolean
required

Whether the query passed.

evaluatedAt
string
required

Timestamp when the query was evaluated.

evidence
object
required

Evidence collected during evaluation.

expiresAt
string

Earliest credential expiry date (if any).