Evaluate Policy
Trust Layer
Evaluate Policy
Evaluate trust policies against a subject
POST
Evaluate Policy
Overview
Evaluate trust policies to determine if a subject meets specific trust requirements. This endpoint allows you to check compliance with trust-based access control, verify credentials, and assess eligibility for services based on trust scores and attestations.Parameters
Trust policy to evaluate
Subject identity to evaluate (ZKS ID or wallet address)
Additional context for evaluation
Evaluation options
Response
Indicates if the evaluation was successful
Whether the subject passed the policy evaluation
Overall evaluation score (0-100)
Policy threshold score
Evaluated subject identity
Policy details
Requirement evaluation results
Relevant attestations used in evaluation
Score breakdown by category
Recommendations for improvement
ISO 8601 timestamp of the evaluation
Examples
Response Example
Use Cases
1. Access Control
Implement trust-based access control:2. Credential Verification
Verify user credentials:3. Service Eligibility
Check eligibility for services:4. Policy Testing
Test policies before deployment:5. Policy Optimization
Optimize policies based on results:Best Practices
1. Policy Design
Design effective policies:2. Caching
Cache policy evaluations:3. Error Handling
Handle evaluation errors:4. Monitoring
Monitor policy performance:Related Endpoints
- Get Attestations - Retrieve attestations
- Create Attestation - Create new attestations
- Revoke Attestation - Revoke attestations
- Get Modules - Get available trust modules
Troubleshooting
”Policy not found”
Cause: Invalid policy ID or policy doesn’t exist. Solution:- Verify the policy ID is correct
- Check if the policy exists
- Ensure you have access to the policy
”Subject not found”
Cause: Invalid subject identity or subject doesn’t exist. Solution:- Verify the subject identity is correct
- Check if the subject exists
- Ensure the subject has some activity
”Invalid policy format”
Cause: Policy structure is invalid. Solution:- Check the policy structure
- Ensure all required fields are present
- Validate the policy format
”Evaluation failed”
Cause: Internal error during evaluation. Solution:- Check the policy requirements
- Verify the subject data
- Contact support if the issue persists
Rate Limits
Policy evaluation requests are subject to rate limits:- Free tier: 60 requests per minute
- Starter tier: 300 requests per minute
- Professional tier: 1,000 requests per minute
- Enterprise tier: Custom limits