CLI: Audit Categories
Learn how to use the DryvIQ CLI to view and manage audit categories.
Table of Contents
Audit Categories
List Audit Categories
Example Command
Example Results
Example JSON Results
Show an Audit Category
Example Command With Variables
Example Command With Example Values
Example Results
Example JSON Results
Create an Audit Category
Example Command with variables
Example Command With Example Values
Expected Result
Expected JSON Result
Example with JSON
Example Command With Variables
Example Command With Values
Expected Result
Expected JSON Result
Delete an Audit Category
Example Command With Variables
Example Command With Example Values
Expected Result
Error Result
The CLI references “skysync.” This is expected.
Audit Categories
The authentication parameters are provided within the configuration file in all examples. See the CLI: Authentication for more information.
List Audit Categories
Parameter | Description | Required | Default |
---|---|---|---|
search, q | Search text | Optional | |
offset | Search offset | Optional | 0 |
limit | Search page size | Optional | 20 |
Example Command
skysync-cli transfer-audit-categories list
Example Results
ID Name Action Level Priority
414625577a8643fbb3498ba552b0220c ParamTest retry warn 9999
17cd1af5358f4a5cb718c7083dbed7ca License Failures retry error 5000
3024e963e1bf45578f6ef7c5722fea53 Conflict Failures retry error 5000
65c5e85659284d279f6dea0c71707fc0 Io Failures retry error 5000
480f984a7dd94343b107553dd017ca83 Invalid Item Failures retry error 5000
e92c5ec1a0f4415ba3efe79a8c78627b Duplicate Item Failures retry error 5000
009fa2b7578d488695a3f0db0dc53553 Item Not Found Failures retry error 5000
9ab945f3d3524f4a9b128eb717cf20fd Policy Failures retry error 5000
a4bdd7af71f6490c817155b4d1dabe51 Permission Failures retry error 5000
ae073f4b34a846ca9a71eabca31f475f Access Failures retry error 5000
9b3b464d77ab4fa5a03d097f6da9f745 Connectivity Failures retry error 5000
814d1fa15a974c83a8bcac10d266798b Unknown Failures retry error 5000
Example JSON Results
[
{
"id": "17cd1af5358f4a5cb718c7083dbed7ca",
"name": "License Failures",
"action": "retry",
"level": "error",
"priority": 5000,
"description": "Files and folders that have failed due an unlicensed product feature.",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5011
},
"type": "filter_context"
}
]
}
},
{
"id": "3024e963e1bf45578f6ef7c5722fea53",
"name": "Conflict Failures",
"action": "retry",
"level": "error",
"priority": 5000,
"description": "Files that have failed due to unresolved conflicts.",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5010
},
"type": "filter_context"
}
]
}
}
]
Show an Audit Category
Parameter | Description | Required |
---|---|---|
id | ID of the audit category to be shown | Required |
Example Command With Variables
skysync-cli transfer-audit-categories show {{id}}
Example Command With Example Values
skysync-cli transfer-audit-categories show 17cd1af5358f4a5cb718c7083dbed7ca
Example Results
ID 17cd1af5358f4a5cb718c7083dbed7ca
Name License Failures
Action retry
Level error
Priority 5000
Description Files and folders that have failed due an unlicensed product feature.
Example JSON Results
[
{
"id": "17cd1af5358f4a5cb718c7083dbed7ca",
"name": "License Failures",
"action": "retry",
"level": "error",
"priority": 5000,
"description": "Files and folders that have failed due an unlicensed product feature.",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5011
},
"type": "filter_context"
}
]
}
}
]
Create an Audit Category
Parameter | Description | Type | Option 1 | Option 2 |
---|---|---|---|---|
name | Audit category name | string | Required | |
description | Audit category description | string | Required | |
action | Action to take when audit category is triggered | string | Required | |
level | Logging Level | string | Required | |
priority | Priority in case multiple audit categories match an error | integer | Required | |
auditType | Error code to match this audit category against | integer | Required | |
options-input | parameter to specify that JSON should be read from pipeline | switch | Required |
Example Command with variables
skysync-cli transfer-audit-categories add --name={{name}} --description={{description}} --action={{action}} --level={{level}} --priority={{priority}} --auditType={{auditType}}
Example Command With Example Values
skysync-cli transfer-audit-categories add --name='CreatedWithParameters' --description='Test Audit Category created with CLI parameters' --action 'retry' --level 'warn' --priority 4000 --auditType 5050
Expected Result
id : 11726921eda448199ffd7710a4f4aa3a
name : CreatedWithParameters
action : retry
level : warn
priority : 4000
description : Test Audit Category created with CLI parameters
filter : @{rules=System.Object[]}
Expected JSON Result
[
{
"id": "b0a0a2ec00ec42d6828e016c3bc335e1",
"name": "CreatedWithParameters",
"action": "retry",
"level": "warn",
"priority": 4000,
"description": "Test Audit Category created with CLI parameters",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5050
},
"type": "filter_context"
}
]
}
}
]
Example with JSON
Example Command With Variables
{{JSON}} | skysync-cli transfer-audit-categories add --options-input --name={{name}}
Example Command With Values
'{
"description": "Test Audit Category created with JSON block",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5050
},
"type": "filter_context"
}
]
},
"action": "retry",
"priority": 4000,
"level": "warn"
}' | skysync-cli transfer-audit-categories add --options-input --name="created with JSON"
Expected Result
id : 325fc08fd69a44b88c0b2fb6f921e4ad
name : CreatedWithJSON
action : retry
level : warn
priority : 4000
description : Test Audit Category created with JSON block
filter : @{rules=System.Object[]}
Expected JSON Result
[
{
"id": "f69ee246f7994693ae7f210702e9d88a",
"name": "CreatedWithJSON",
"action": "retry",
"level": "warn",
"priority": 4000,
"description": "Test Audit Category created with JSON block",
"filter": {
"rules": [
{
"filter": {
"name": "audit_type",
"select": null,
"op": "eq",
"value": 5050
},
"type": "filter_context"
}
]
}
}
]
Delete an Audit Category
Parameter | Description | Required |
---|---|---|
id | ID of the audit category to be deleted | Required |
Example Command With Variables
skysync-cli transfer-audit-categories delete {{id}}
Example Command With Example Values
skysync-cli transfer-audit-categories delete 17cd1af5358f4a5cb718c7083dbed7ca
Expected Result
The audit category was deleted successfully.
Error Result
The audit category could not be deleted.