Retrieve all the data needed for evaluating the rules
PreviousList all the schemas and policy relevant to the rule with the specified IDNextCreate a new rule from the file
Last updated
Last updated
Configuration.
Successful operation.
const response = await fetch('/api/v1/schema-rules/data', {
method: 'POST',
headers: {
"Authorization": "Bearer JWT",
"Content-Type": "application/json"
},
body: JSON.stringify({
"rules": {
"id": "000000000000000000000001",
"uuid": "00000000-0000-0000-0000-000000000000",
"name": "Tool name",
"description": "Description",
"creator": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"policyId": "000000000000000000000001",
"policyTopicId": "0.0.1",
"policyInstanceTopicId": "0.0.1",
"status": "DRAFT",
"config": {}
},
"document": {
"id": "000000000000000000000001",
"policyId": "000000000000000000000001",
"hash": "hash",
"signature": 0,
"status": "NEW",
"tag": "Block tag",
"type": "Document type",
"createDate": "1900-01-01T00:00:00.000Z",
"updateDate": "1900-01-01T00:00:00.000Z",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"document": {
"@context": [
null
],
"id": "00000000-0000-0000-0000-000000000000",
"type": [
null
],
"verifiableCredential": [
{}
],
"proof": {}
}
},
"relationships": [
{
"id": "000000000000000000000001",
"policyId": "000000000000000000000001",
"hash": "hash",
"signature": 0,
"status": "NEW",
"tag": "Block tag",
"type": "Document type",
"createDate": "1900-01-01T00:00:00.000Z",
"updateDate": "1900-01-01T00:00:00.000Z",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"document": {
"@context": [
null
],
"id": "00000000-0000-0000-0000-000000000000",
"type": [
null
],
"verifiableCredential": [
{}
],
"proof": {}
}
}
]
}),
});
const data = await response.json();
{
"rules": {
"id": "000000000000000000000001",
"uuid": "00000000-0000-0000-0000-000000000000",
"name": "Tool name",
"description": "Description",
"creator": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"policyId": "000000000000000000000001",
"policyTopicId": "0.0.1",
"policyInstanceTopicId": "0.0.1",
"status": "DRAFT",
"config": {}
},
"document": {
"id": "000000000000000000000001",
"policyId": "000000000000000000000001",
"hash": "hash",
"signature": 0,
"status": "NEW",
"tag": "Block tag",
"type": "Document type",
"createDate": "1900-01-01T00:00:00.000Z",
"updateDate": "1900-01-01T00:00:00.000Z",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"document": {
"@context": [
null
],
"id": "00000000-0000-0000-0000-000000000000",
"type": [
null
],
"verifiableCredential": [
{}
],
"proof": {}
}
},
"relationships": [
{
"id": "000000000000000000000001",
"policyId": "000000000000000000000001",
"hash": "hash",
"signature": 0,
"status": "NEW",
"tag": "Block tag",
"type": "Document type",
"createDate": "1900-01-01T00:00:00.000Z",
"updateDate": "1900-01-01T00:00:00.000Z",
"owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
"document": {
"@context": [
null
],
"id": "00000000-0000-0000-0000-000000000000",
"type": [
null
],
"verifiableCredential": [
{}
],
"proof": {}
}
}
]
}