File Catalog Api Create File Rule
Creates a SHA-256 Rule (rank CUSTOM_GLOBAL) for the entry; the hash is taken from the entry, never from the request. The rule is attached to no Policy, so it enforces nothing until it is attached and published. Requires the ADMIN or SECURITY_OPERATOR role.
File catalog entry id
101
The Rule name and the action for the SHA-256 Rule that is created from the entry.
Show optional properties
{
"ruleName": "string",
"action": "string"
}
{
"ruleName": "Ban backup-agent.sh",
"action": "PREVENT"
}
Name of the new Rule, validated as for POST /api/v1/rules
The action chosen when creating a rule from a catalog entry: PREVENT bans the file (stored as BLOCK, the entry becomes BANNED) and ALLOW approves it. The value is matched case-insensitively.
PREVENT: Creates a BLOCK rule for the file's SHA-256 and sets the entry to BANNEDALLOW: Creates an ALLOW rule for the file's SHA-256 and sets the entry to APPROVED
201 Created successful response envelope. The entry as updated and the created Rule
{
"file": {
"fileId": 101,
"fileName": "backup-agent.sh",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"fileKind": "SCRIPT",
"globalState": "BANNED",
"hypervisorCount": 2,
"rule": {
"ruleId": 1000002,
"name": "Ban backup-agent.sh",
"action": "BLOCK",
"ruleRank": "CUSTOM_GLOBAL",
"isEnabled": true,
"attachment": "NOT_ATTACHED",
"attachedPolicyCount": 0
}
},
"rule": {
"ruleId": 1000002,
"name": "Ban backup-agent.sh",
"description": "Created from the file catalog for backup-agent.sh",
"ruleType": "HASH",
"matchData": "{\"sha256_hash\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"file_name_hint\":\"backup-agent.sh\",\"file_size_bytes\":2048}",
"action": "BLOCK",
"ruleRank": "CUSTOM_GLOBAL",
"minAgentVersion": "1.0.0",
"guid": "00000000-0000-4000-8000-000000000040",
"isEnabled": true,
"isBuiltIn": false,
"revision": 1,
"createdBy": 1,
"updatedBy": 1,
"policyCount": 0,
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:30:00Z"
}
}
One distinct file, keyed by SHA-256. Absent fields are omitted from the JSON.
A Rule (Built-in or Custom).
400 Bad Request: INVALID_ACTION, INVALID_RULE_NAME, DUPLICATE_RULE_NAME or MALFORMED_REQUEST
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
403 Forbidden: FORBIDDEN or CSRF_ERROR. CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
404 Not Found: FILE_NOT_FOUND
"ApiErrorResponse Object"
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
409 Conflict: FILE_RULE_ALREADY_EXISTS
"ApiErrorResponse Object"
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"ruleName":"string","action":"string"}' https://{api_host}/api/v1/file-catalog/{fileId}/rule