Skip to content

verdict fact bulk

Insert and delete facts in one batch from a JSON file.

Runs against the selected server connection. Effects: mutate stored facts.

ArgumentTypeRequiredDefaultDescription
<file>positionalyesNo parser defaultPath to the JSON batch file
--jsonbooleannofalseOutput as JSON
--endpointstringnoNo parser defaultInstance base URL, including any subpath (env: VERDICT_HOST, fallback: http://localhost:4891)
--hoststringnoNo parser defaultAlias for —endpoint
--api-keystringnoNo parser defaultAPI key (env: VERDICT_API_KEY takes precedence)
--profilestringnoNo parser defaultStored profile (env: VERDICT_PROFILE)
--localbooleannofalseUse http://localhost:4891 without stored or environment credentials

--help (-h) shows command help without executing the command. Boolean flags support --no-<flag>. Defaults stated in descriptions may be resolved by the handler or configuration rather than the argument parser.

Required JSON batch file path; stdin is unsupported.

File input: supported. Standard input: unsupported.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Verdict bulk facts",
"type": "object",
"properties": {
"inserts": {
"type": "array",
"items": {
"$ref": "#/$defs/fact"
}
},
"deletes": {
"type": "array",
"items": {
"$ref": "#/$defs/pattern"
}
}
},
"additionalProperties": false,
"$defs": {
"predicate": {
"type": "string",
"minLength": 1
},
"identity": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
},
"int64": {
"type": "object",
"properties": {
"type": {
"const": "int64"
},
"value": {
"type": "string",
"pattern": "^-?[0-9]+$",
"maxLength": 20
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
"term": {
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"$ref": "#/$defs/identity"
},
{
"$ref": "#/$defs/int64"
}
]
},
"wildcard": {
"type": "object",
"required": [
"wildcard"
],
"additionalProperties": false,
"properties": {
"wildcard": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z][A-Za-z0-9_]*$"
},
"type": {
"type": "string",
"minLength": 1
}
}
}
}
},
"patternTerm": {
"anyOf": [
{
"$ref": "#/$defs/term"
},
{
"type": "null"
},
{
"$ref": "#/$defs/wildcard"
}
]
},
"fact": {
"oneOf": [
{
"type": "array",
"prefixItems": [
{
"$ref": "#/$defs/predicate"
}
],
"items": {
"$ref": "#/$defs/term"
},
"minItems": 2,
"maxItems": 4
},
{
"type": "object",
"properties": {
"predicate": {
"$ref": "#/$defs/predicate"
},
"terms": {
"type": "array",
"items": {
"$ref": "#/$defs/term"
},
"minItems": 1,
"maxItems": 3
}
},
"required": [
"predicate",
"terms"
],
"additionalProperties": false
}
]
},
"pattern": {
"oneOf": [
{
"type": "array",
"prefixItems": [
{
"$ref": "#/$defs/predicate"
}
],
"items": {
"$ref": "#/$defs/patternTerm"
},
"minItems": 2,
"maxItems": 4
},
{
"type": "object",
"properties": {
"predicate": {
"$ref": "#/$defs/predicate"
},
"terms": {
"type": "array",
"items": {
"$ref": "#/$defs/patternTerm"
},
"minItems": 1,
"maxItems": 3
}
},
"required": [
"predicate",
"terms"
],
"additionalProperties": false
}
]
}
}
}
{
"kind": "json-schema",
"schema": {
"type": "object",
"required": [],
"additionalProperties": false,
"properties": {
"inserted": {
"type": "integer",
"nullable": true
},
"deleted": {
"type": "integer",
"nullable": true
}
}
}
}

By default, the command renders human-readable records. --json writes one JSON result to stdout. Operational failures use status 1; JSON failures contain an error object with code and message. See shared output semantics.

  • 0: the command completed its operation.

Argument, I/O, and other failures handled by the CLI runner use status 1.

verdict fact bulk changes.json --json