systemlink-cli 1.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- slcli/__init__.py +1 -0
- slcli/__main__.py +23 -0
- slcli/_version.py +4 -0
- slcli/asset_click.py +1289 -0
- slcli/cli_formatters.py +218 -0
- slcli/cli_utils.py +504 -0
- slcli/comment_click.py +602 -0
- slcli/completion_click.py +418 -0
- slcli/config.py +81 -0
- slcli/config_click.py +498 -0
- slcli/dff_click.py +979 -0
- slcli/dff_decorators.py +24 -0
- slcli/example_click.py +404 -0
- slcli/example_loader.py +274 -0
- slcli/example_provisioner.py +2777 -0
- slcli/examples/README.md +134 -0
- slcli/examples/_schema/schema-v1.0.json +169 -0
- slcli/examples/demo-complete-workflow/README.md +323 -0
- slcli/examples/demo-complete-workflow/config.yaml +638 -0
- slcli/examples/demo-test-plans/README.md +132 -0
- slcli/examples/demo-test-plans/config.yaml +154 -0
- slcli/examples/exercise-5-1-parametric-insights/README.md +101 -0
- slcli/examples/exercise-5-1-parametric-insights/config.yaml +1589 -0
- slcli/examples/exercise-7-1-test-plans/README.md +93 -0
- slcli/examples/exercise-7-1-test-plans/config.yaml +323 -0
- slcli/examples/spec-compliance-notebooks/README.md +140 -0
- slcli/examples/spec-compliance-notebooks/config.yaml +112 -0
- slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +1553 -0
- slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +1577 -0
- slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +912 -0
- slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- slcli/feed_click.py +892 -0
- slcli/file_click.py +932 -0
- slcli/function_click.py +1400 -0
- slcli/function_templates.py +85 -0
- slcli/main.py +406 -0
- slcli/mcp_click.py +269 -0
- slcli/mcp_server.py +748 -0
- slcli/notebook_click.py +1770 -0
- slcli/platform.py +345 -0
- slcli/policy_click.py +679 -0
- slcli/policy_utils.py +411 -0
- slcli/profiles.py +411 -0
- slcli/response_handlers.py +359 -0
- slcli/routine_click.py +763 -0
- slcli/skill_click.py +253 -0
- slcli/skills/slcli/SKILL.md +713 -0
- slcli/skills/slcli/references/analysis-recipes.md +474 -0
- slcli/skills/slcli/references/filtering.md +236 -0
- slcli/skills/systemlink-webapp/SKILL.md +744 -0
- slcli/skills/systemlink-webapp/references/deployment.md +123 -0
- slcli/skills/systemlink-webapp/references/nimble-angular.md +380 -0
- slcli/skills/systemlink-webapp/references/systemlink-services.md +192 -0
- slcli/ssl_trust.py +93 -0
- slcli/system_click.py +2216 -0
- slcli/table_utils.py +124 -0
- slcli/tag_click.py +794 -0
- slcli/templates_click.py +599 -0
- slcli/testmonitor_click.py +1667 -0
- slcli/universal_handlers.py +305 -0
- slcli/user_click.py +1218 -0
- slcli/utils.py +832 -0
- slcli/web_editor.py +295 -0
- slcli/webapp_click.py +981 -0
- slcli/workflow_preview.py +287 -0
- slcli/workflows_click.py +988 -0
- slcli/workitem_click.py +2258 -0
- slcli/workspace_click.py +576 -0
- slcli/workspace_utils.py +206 -0
- systemlink_cli-1.3.1.dist-info/METADATA +20 -0
- systemlink_cli-1.3.1.dist-info/RECORD +74 -0
- systemlink_cli-1.3.1.dist-info/WHEEL +4 -0
- systemlink_cli-1.3.1.dist-info/entry_points.txt +7 -0
- systemlink_cli-1.3.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slcli
|
|
3
|
+
description: >-
|
|
4
|
+
Query and manage NI SystemLink resources using the slcli command-line interface.
|
|
5
|
+
Covers test results, assets, systems, tags, feeds, files, notebooks,
|
|
6
|
+
routines, work items, work item templates, workflows, test plan templates,
|
|
7
|
+
custom fields, web applications, authorization policies, users, workspaces, and more.
|
|
8
|
+
Use when the user asks about test data analysis, asset management, calibration status,
|
|
9
|
+
system fleet health, operator performance, failure analysis, production metrics,
|
|
10
|
+
equipment utilization, work order tracking, or any SystemLink resource operations.
|
|
11
|
+
Supports filtering, aggregation, summary statistics, and JSON output for programmatic processing.
|
|
12
|
+
compatibility: >-
|
|
13
|
+
Requires slcli installed and authenticated (slcli login). Python 3.10+.
|
|
14
|
+
Requires network access to a SystemLink server instance.
|
|
15
|
+
metadata:
|
|
16
|
+
author: ni-kismet
|
|
17
|
+
version: "1.0"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# SystemLink CLI (slcli)
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# check current connection
|
|
26
|
+
slcli info
|
|
27
|
+
|
|
28
|
+
# list test results (table output, paginated)
|
|
29
|
+
slcli testmonitor result list --take 25
|
|
30
|
+
|
|
31
|
+
# list test results (JSON output, all results)
|
|
32
|
+
slcli testmonitor result list --take 100 -f json
|
|
33
|
+
|
|
34
|
+
# summarize test results by status
|
|
35
|
+
slcli testmonitor result list --summary --group-by status -f json
|
|
36
|
+
|
|
37
|
+
# list assets needing calibration
|
|
38
|
+
slcli asset list --calibration-status PAST_RECOMMENDED_DUE_DATE
|
|
39
|
+
|
|
40
|
+
# list connected systems
|
|
41
|
+
slcli system list --state CONNECTED
|
|
42
|
+
|
|
43
|
+
# list work items
|
|
44
|
+
slcli workitem list --format json --take 25
|
|
45
|
+
|
|
46
|
+
# create a work item
|
|
47
|
+
slcli workitem create --name "Battery Cycle Test" --type testplan --state NEW --part-number "P-001" --workspace Default
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Output formats
|
|
51
|
+
|
|
52
|
+
All list and get commands support `-f, --format` with `table` (default) or `json`.
|
|
53
|
+
|
|
54
|
+
- **Table**: Paginated (default 25 rows), human-readable with box-drawing.
|
|
55
|
+
- **JSON**: Returns all matching results as a JSON array — ideal for piping to `jq`.
|
|
56
|
+
|
|
57
|
+
Always use `-f json` when you need to process, filter, or aggregate output programmatically.
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
### testmonitor — Test data analysis
|
|
62
|
+
|
|
63
|
+
The primary command group for test result queries and product analysis.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# List results with filters
|
|
67
|
+
slcli testmonitor result list [OPTIONS]
|
|
68
|
+
|
|
69
|
+
# Convenience filters (combine freely)
|
|
70
|
+
--status TEXT # PASSED, FAILED, RUNNING, ERRORED, TERMINATED, TIMEDOUT, etc.
|
|
71
|
+
--program-name TEXT # Filter by test program name (contains)
|
|
72
|
+
--serial-number TEXT # Filter by DUT serial number (contains)
|
|
73
|
+
--part-number TEXT # Filter by part number (contains)
|
|
74
|
+
--operator TEXT # Filter by operator name (contains)
|
|
75
|
+
--host-name TEXT # Filter by test host (contains)
|
|
76
|
+
--system-id TEXT # Filter by system ID (exact)
|
|
77
|
+
--workspace, -w TEXT # Filter by workspace name or ID
|
|
78
|
+
|
|
79
|
+
# Advanced filtering
|
|
80
|
+
--filter TEXT # Dynamic LINQ expression
|
|
81
|
+
--substitution TEXT # Parameterized value for --filter (repeatable)
|
|
82
|
+
--product-filter TEXT # LINQ filter on associated products
|
|
83
|
+
--product-substitution TEXT # Parameterized value for --product-filter (repeatable)
|
|
84
|
+
|
|
85
|
+
# Sorting
|
|
86
|
+
--order-by CHOICE # ID, STARTED_AT, UPDATED_AT, PROGRAM_NAME, SYSTEM_ID,
|
|
87
|
+
# HOST_NAME, OPERATOR, SERIAL_NUMBER, PART_NUMBER,
|
|
88
|
+
# TOTAL_TIME_IN_SECONDS, PROPERTIES
|
|
89
|
+
--descending / --ascending # Default: descending
|
|
90
|
+
|
|
91
|
+
# Aggregation
|
|
92
|
+
--summary # Show summary statistics instead of individual results
|
|
93
|
+
--group-by CHOICE # status, programName, serialNumber, operator, hostName, systemId
|
|
94
|
+
|
|
95
|
+
# Pagination & output
|
|
96
|
+
--take, -t INTEGER # Items per page (default 25)
|
|
97
|
+
--format, -f [table|json] # Output format (default: table)
|
|
98
|
+
|
|
99
|
+
# Get a single result
|
|
100
|
+
slcli testmonitor result get <RESULT_ID> [--include-steps] [-f json]
|
|
101
|
+
|
|
102
|
+
# List products
|
|
103
|
+
slcli testmonitor product list [OPTIONS]
|
|
104
|
+
--name TEXT # Filter by product name (contains)
|
|
105
|
+
--part-number TEXT # Filter by part number (contains)
|
|
106
|
+
--family TEXT # Filter by product family (contains)
|
|
107
|
+
--workspace, -w TEXT # Filter by workspace name or ID
|
|
108
|
+
--summary # Show summary statistics
|
|
109
|
+
--take, -t INTEGER # Items per page (default 25)
|
|
110
|
+
-f [table|json]
|
|
111
|
+
|
|
112
|
+
# Get a single product
|
|
113
|
+
slcli testmonitor product get <PRODUCT_ID> [-f json]
|
|
114
|
+
|
|
115
|
+
# Create a product
|
|
116
|
+
slcli testmonitor product create --part-number TEXT [OPTIONS]
|
|
117
|
+
--part-number TEXT # Part number (required)
|
|
118
|
+
--name TEXT # Product name
|
|
119
|
+
--family TEXT # Product family
|
|
120
|
+
--workspace, -w TEXT # Workspace name or ID
|
|
121
|
+
--keyword TEXT # Keyword (repeatable)
|
|
122
|
+
--property KEY=VALUE # Key-value property (repeatable)
|
|
123
|
+
-f [table|json]
|
|
124
|
+
|
|
125
|
+
# Update a product
|
|
126
|
+
slcli testmonitor product update <PRODUCT_ID> [OPTIONS]
|
|
127
|
+
--name TEXT # New product name
|
|
128
|
+
--family TEXT # New product family
|
|
129
|
+
--workspace, -w TEXT # New workspace name or ID
|
|
130
|
+
--keyword TEXT # Keyword (repeatable; replaces all if --replace)
|
|
131
|
+
--property KEY=VALUE # Key-value property (repeatable; replaces all if --replace)
|
|
132
|
+
--replace # Replace fields instead of merging
|
|
133
|
+
-f [table|json]
|
|
134
|
+
|
|
135
|
+
# Delete products
|
|
136
|
+
slcli testmonitor product delete [--yes] <PRODUCT_ID>...
|
|
137
|
+
--yes, -y # Skip confirmation prompt
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### asset — Asset and calibration management
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# List assets with filters
|
|
144
|
+
slcli asset list [OPTIONS]
|
|
145
|
+
|
|
146
|
+
# Convenience filters
|
|
147
|
+
--model TEXT # Filter by model name (contains)
|
|
148
|
+
--serial-number TEXT # Filter by serial number (exact)
|
|
149
|
+
--bus-type CHOICE # BUILT_IN_SYSTEM, PCI_PXI, USB, GPIB, VXI, SERIAL, TCP_IP, CRIO
|
|
150
|
+
--asset-type CHOICE # GENERIC, DEVICE_UNDER_TEST, FIXTURE, SYSTEM
|
|
151
|
+
# FIXTURE assets are also called "slots" in scheduling context:
|
|
152
|
+
# a slot/fixture is a physical test station, chamber, rack, etc.
|
|
153
|
+
# that a work item is scheduled to run on.
|
|
154
|
+
# DEVICE_UNDER_TEST (DUT) assets are the units being tested.
|
|
155
|
+
# SYSTEM assets are registered SystemLink-managed systems.
|
|
156
|
+
--calibration-status CHOICE # OK, APPROACHING_RECOMMENDED_DUE_DATE,
|
|
157
|
+
# PAST_RECOMMENDED_DUE_DATE, OUT_FOR_CALIBRATION
|
|
158
|
+
--connected # Only assets in connected systems
|
|
159
|
+
--calibratable # Only calibratable assets
|
|
160
|
+
--workspace, -w TEXT # Filter by workspace name or ID
|
|
161
|
+
|
|
162
|
+
# Advanced filtering
|
|
163
|
+
--filter TEXT # Asset API expression (e.g., 'ModelName.Contains("PXI")')
|
|
164
|
+
|
|
165
|
+
# Sorting & output
|
|
166
|
+
--order-by CHOICE # Sort field
|
|
167
|
+
--descending / --ascending
|
|
168
|
+
--take, -t INTEGER # Default 25
|
|
169
|
+
-f [table|json]
|
|
170
|
+
|
|
171
|
+
# Other asset commands
|
|
172
|
+
slcli asset get <ASSET_ID> [-f json]
|
|
173
|
+
slcli asset summary [-f json] # Fleet-wide statistics
|
|
174
|
+
slcli asset calibration <ASSET_ID> [-f json] # Calibration history
|
|
175
|
+
slcli asset location-history <ASSET_ID> [-f json] # Location/connection history
|
|
176
|
+
slcli asset create --model-name TEXT [OPTIONS] # Create an asset
|
|
177
|
+
slcli asset update <ASSET_ID> [OPTIONS] # Update an asset
|
|
178
|
+
slcli asset delete <ASSET_ID> # Delete an asset
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### system — System fleet management
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# List systems with filters
|
|
185
|
+
slcli system list [OPTIONS]
|
|
186
|
+
|
|
187
|
+
# Convenience filters
|
|
188
|
+
--alias, -a TEXT # Filter by alias (contains)
|
|
189
|
+
--state CHOICE # CONNECTED, DISCONNECTED, VIRTUAL, APPROVED, etc.
|
|
190
|
+
--os TEXT # Filter by OS/kernel (contains)
|
|
191
|
+
--host TEXT # Filter by hostname (contains)
|
|
192
|
+
--has-package TEXT # Systems with installed package (contains, client-side)
|
|
193
|
+
--has-keyword TEXT # Systems with keyword (repeatable)
|
|
194
|
+
--property TEXT # Property key=value filter (repeatable)
|
|
195
|
+
--workspace, -w TEXT # Filter by workspace name or ID
|
|
196
|
+
|
|
197
|
+
# Advanced filtering
|
|
198
|
+
--filter TEXT # Systems Management filter expression
|
|
199
|
+
# e.g., 'connected.data.state = "CONNECTED"'
|
|
200
|
+
|
|
201
|
+
# Output
|
|
202
|
+
--take, -t INTEGER # Default 100
|
|
203
|
+
-f [table|json]
|
|
204
|
+
|
|
205
|
+
# Get detailed information about a single system
|
|
206
|
+
slcli system get <SYSTEM_ID> [-f json]
|
|
207
|
+
|
|
208
|
+
# Include related resources from other services (fetched in parallel):
|
|
209
|
+
slcli system get <SYSTEM_ID> --include-assets # Assets (niapm/v1)
|
|
210
|
+
slcli system get <SYSTEM_ID> --include-alarms # Active alarm instances
|
|
211
|
+
slcli system get <SYSTEM_ID> --include-jobs # Recent jobs
|
|
212
|
+
slcli system get <SYSTEM_ID> --include-results # Test results (nitestmonitor/v2)
|
|
213
|
+
slcli system get <SYSTEM_ID> --include-workitems # Scheduled test plan work items
|
|
214
|
+
|
|
215
|
+
# Convenience shorthand: enables all sections including packages and feeds
|
|
216
|
+
slcli system get <SYSTEM_ID> --include-all
|
|
217
|
+
|
|
218
|
+
# Options that apply to --include-* sections:
|
|
219
|
+
# --take/-t INTEGER Max rows per section (default: 10)
|
|
220
|
+
# --workitem-days INT Time window ±days for work items query (default: 30)
|
|
221
|
+
|
|
222
|
+
# JSON output embeds related resources under _assets, _alarms, _jobs, etc.
|
|
223
|
+
slcli system get <SYSTEM_ID> --include-all -f json | jq '._results.items'
|
|
224
|
+
|
|
225
|
+
slcli system summary [-f json] # Fleet-wide statistics
|
|
226
|
+
slcli system report --type [SOFTWARE|HARDWARE] -o FILE # Generate CSV report
|
|
227
|
+
slcli system update <SYSTEM_ID> [OPTIONS] # Update system metadata
|
|
228
|
+
slcli system remove <SYSTEM_ID> # Remove a system
|
|
229
|
+
|
|
230
|
+
# System jobs
|
|
231
|
+
slcli system job list [OPTIONS]
|
|
232
|
+
slcli system job get <JOB_ID>
|
|
233
|
+
slcli system job summary [-f json]
|
|
234
|
+
slcli system job cancel <JOB_ID>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### tag — Tag operations
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
slcli tag list [OPTIONS] # List tags (filter by path glob, workspace)
|
|
241
|
+
slcli tag get <TAG_PATH> [-f json] # Get tag metadata
|
|
242
|
+
slcli tag get-value <TAG_PATH> # Read current tag value
|
|
243
|
+
slcli tag set-value <TAG_PATH> <VALUE> # Write a tag value
|
|
244
|
+
slcli tag create --path <PATH> --data-type <TYPE> # Create a new tag
|
|
245
|
+
slcli tag update <TAG_PATH> [OPTIONS] # Update tag metadata
|
|
246
|
+
slcli tag delete <TAG_PATH> # Delete a tag
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### routine — Event-action and notebook routine management
|
|
250
|
+
|
|
251
|
+
Two API versions are supported:
|
|
252
|
+
- **v2** (default): General event-action routines — monitor tags, work-item changes, and more; trigger alarms, emails, or notebook executions.
|
|
253
|
+
- **v1**: Notebook-execution routines with SCHEDULED or TRIGGERED types.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# List routines
|
|
257
|
+
slcli routine list [OPTIONS]
|
|
258
|
+
|
|
259
|
+
--api-version [v1|v2] API version (default: v2)
|
|
260
|
+
--enabled Show only enabled routines
|
|
261
|
+
--disabled Show only disabled routines
|
|
262
|
+
--workspace, -w TEXT Filter by workspace name or ID
|
|
263
|
+
--filter TEXT Filter by routine name (case-insensitive substring)
|
|
264
|
+
--event-type TEXT Filter by event type (v2 only, e.g. TAG, WORKITEMCHANGED)
|
|
265
|
+
--type [TRIGGERED|SCHEDULED] Filter by routine type (v1 only)
|
|
266
|
+
--take, -t INTEGER Items per page / max results (default: 25)
|
|
267
|
+
-f [table|json] Output format (default: table)
|
|
268
|
+
|
|
269
|
+
# Get a single routine by ID
|
|
270
|
+
slcli routine get <ROUTINE_ID> [--api-version v1|v2] [-f json]
|
|
271
|
+
|
|
272
|
+
# Create a v2 event-action routine
|
|
273
|
+
# --event: JSON object with `type` and `triggers` array
|
|
274
|
+
# --actions: JSON array of action objects
|
|
275
|
+
slcli routine create \
|
|
276
|
+
--name "My Routine" \
|
|
277
|
+
--description "Description" \
|
|
278
|
+
--workspace <WORKSPACE_ID> \
|
|
279
|
+
--enabled \
|
|
280
|
+
--event '<event-json>' \
|
|
281
|
+
--actions '<actions-json>'
|
|
282
|
+
|
|
283
|
+
# Create a v1 notebook routine (SCHEDULED)
|
|
284
|
+
# IMPORTANT: startTime must be in the future (UTC). The API rejects past start times.
|
|
285
|
+
# Use ISO-8601 UTC format (e.g. 2026-03-03T09:00:00Z). Since the server operates in UTC,
|
|
286
|
+
# verify the current UTC time first if in doubt: date -u
|
|
287
|
+
slcli routine create --api-version v1 \
|
|
288
|
+
--name "Daily Notebook" \
|
|
289
|
+
--type SCHEDULED \
|
|
290
|
+
--notebook-id <NOTEBOOK_ID> \
|
|
291
|
+
--schedule '{"startTime":"2026-01-01T00:00:00Z","repeat":"DAY"}'
|
|
292
|
+
|
|
293
|
+
# Create a v1 notebook routine (TRIGGERED by file)
|
|
294
|
+
slcli routine create --api-version v1 \
|
|
295
|
+
--name "On Upload" \
|
|
296
|
+
--type TRIGGERED \
|
|
297
|
+
--notebook-id <NOTEBOOK_ID> \
|
|
298
|
+
--trigger '{"source":"FILES","events":["CREATED"],"filter":"extension=\".csv\""}'
|
|
299
|
+
|
|
300
|
+
# Update a routine (only supplied fields are changed)
|
|
301
|
+
slcli routine update <ROUTINE_ID> [--api-version v1|v2] \
|
|
302
|
+
[--name TEXT] [--description TEXT] [--workspace TEXT] \
|
|
303
|
+
[--enable|--disable] \
|
|
304
|
+
[--event '<event-json>'] [--actions '<actions-json>'] # v2
|
|
305
|
+
[--notebook-id TEXT] [--trigger JSON] [--schedule JSON] # v1
|
|
306
|
+
|
|
307
|
+
# Enable / disable a routine
|
|
308
|
+
slcli routine enable <ROUTINE_ID> [--api-version v1|v2]
|
|
309
|
+
slcli routine disable <ROUTINE_ID> [--api-version v1|v2]
|
|
310
|
+
|
|
311
|
+
# Delete a routine (prompts for confirmation unless -y)
|
|
312
|
+
slcli routine delete <ROUTINE_ID> [--api-version v1|v2] [-y]
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
#### v2 event JSON structure
|
|
316
|
+
|
|
317
|
+
```json
|
|
318
|
+
{
|
|
319
|
+
"type": "TAG",
|
|
320
|
+
"triggers": [
|
|
321
|
+
{
|
|
322
|
+
"name": "<uuid>",
|
|
323
|
+
"configuration": {
|
|
324
|
+
"comparator": "GREATER_THAN",
|
|
325
|
+
"path": "my.tag.path.*",
|
|
326
|
+
"thresholds": ["10.2"],
|
|
327
|
+
"type": "DOUBLE"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Supported TAG comparators: `GREATER_THAN`, `LESS_THAN`, `EQUAL`, `NOT_EQUAL`.
|
|
335
|
+
Tag data types: `DOUBLE`, `INT32`, `U_INT64`, `STRING`, `BOOLEAN`.
|
|
336
|
+
|
|
337
|
+
#### v2 actions JSON structure
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
[
|
|
341
|
+
{
|
|
342
|
+
"type": "ALARM",
|
|
343
|
+
"triggers": ["<same-uuid-as-event-trigger>"],
|
|
344
|
+
"configuration": {
|
|
345
|
+
"displayName": "Alarm display name",
|
|
346
|
+
"description": "Alarm description",
|
|
347
|
+
"severity": 4,
|
|
348
|
+
"condition": "Greater than: 10.2",
|
|
349
|
+
"dynamicRecipientList": ["user@example.com"]
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"type": "ALARM",
|
|
354
|
+
"triggers": ["nisystemlink_no_triggers_breached"],
|
|
355
|
+
"configuration": null
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
The second ALARM entry with trigger `nisystemlink_no_triggers_breached` is required by the API — it handles the alarm clear/reset state. Email notifications are delivered via `dynamicRecipientList` inside the ALARM action configuration. Severity levels: 1 (low) – 4 (critical).
|
|
361
|
+
|
|
362
|
+
#### Full example: tag threshold monitor with alarm + email
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
slcli routine create \
|
|
366
|
+
--name "Fred Tag Monitor" \
|
|
367
|
+
--description "Alert when fred.test.* exceeds 10.2" \
|
|
368
|
+
--enabled \
|
|
369
|
+
--event '{
|
|
370
|
+
"type": "TAG",
|
|
371
|
+
"triggers": [{
|
|
372
|
+
"name": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
373
|
+
"configuration": {
|
|
374
|
+
"comparator": "GREATER_THAN",
|
|
375
|
+
"path": "fred.test.*",
|
|
376
|
+
"thresholds": ["10.2"],
|
|
377
|
+
"type": "DOUBLE"
|
|
378
|
+
}
|
|
379
|
+
}]
|
|
380
|
+
}' \
|
|
381
|
+
--actions '[
|
|
382
|
+
{
|
|
383
|
+
"type": "ALARM",
|
|
384
|
+
"triggers": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
|
|
385
|
+
"configuration": {
|
|
386
|
+
"displayName": "Fred Test Tag Alarm",
|
|
387
|
+
"description": "Tag fred.test.* exceeded 10.2",
|
|
388
|
+
"severity": 4,
|
|
389
|
+
"condition": "Greater than: 10.2",
|
|
390
|
+
"dynamicRecipientList": ["fred.visser@emerson.com"]
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"type": "ALARM",
|
|
395
|
+
"triggers": ["nisystemlink_no_triggers_breached"],
|
|
396
|
+
"configuration": null
|
|
397
|
+
}
|
|
398
|
+
]'
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### comment — Resource comments
|
|
402
|
+
|
|
403
|
+
Attach, edit, and remove comments on any SystemLink resource. User IDs in responses
|
|
404
|
+
are automatically resolved to display names.
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# List comments for a resource (most recent 1000, ordered by creation time)
|
|
408
|
+
slcli comment list --resource-type <TYPE> --resource-id <ID> [-f json]
|
|
409
|
+
|
|
410
|
+
# Supported resource types
|
|
411
|
+
# testmonitor:Result Test Monitor results
|
|
412
|
+
# niapm:Asset Assets
|
|
413
|
+
# nisysmgmt:System Systems
|
|
414
|
+
# workorder:workorder Work Orders
|
|
415
|
+
# workitem:workitem Work Items
|
|
416
|
+
# DataSpace Data Spaces
|
|
417
|
+
|
|
418
|
+
# Short aliases: -r for --resource-type, -i for --resource-id
|
|
419
|
+
slcli comment list -r testmonitor:Result -i <RESULT_ID>
|
|
420
|
+
slcli comment list -r niapm:Asset -i <ASSET_ID> -f json
|
|
421
|
+
|
|
422
|
+
# Add a comment to a resource
|
|
423
|
+
slcli comment add \
|
|
424
|
+
--resource-type <TYPE> \
|
|
425
|
+
--resource-id <ID> \
|
|
426
|
+
--workspace <WORKSPACE_NAME_OR_ID> \
|
|
427
|
+
--message "Comment text (supports Markdown)"
|
|
428
|
+
|
|
429
|
+
# Optionally mention users in a comment.
|
|
430
|
+
# Mentions require ALL of the following:
|
|
431
|
+
# 1. A <user:USER_ID> tag embedded in the --message body for each mentioned user
|
|
432
|
+
# 2. The same user ID(s) passed to --mention (one flag per user)
|
|
433
|
+
# 3. --resource-name / -n human-readable resource name (for the email)
|
|
434
|
+
# 4. --resource-type / -r resource type (auto-mapped to display name for email)
|
|
435
|
+
# 5. --comment-url / -u URL to the comment in the UI (for the email)
|
|
436
|
+
slcli comment add -r testmonitor:Result -i <ID> -w default \
|
|
437
|
+
-n "Result #1234" \
|
|
438
|
+
-u "https://<server>/nitestmonitor/results/<ID>" \
|
|
439
|
+
-m "See findings: <user:f9d5c5c9-e098-4a82-8e55-fede326a4ec3>" \
|
|
440
|
+
--mention f9d5c5c9-e098-4a82-8e55-fede326a4ec3
|
|
441
|
+
|
|
442
|
+
# Update an existing comment (replaces message and mention list entirely)
|
|
443
|
+
# Same mention requirements apply
|
|
444
|
+
slcli comment update <COMMENT_ID> --message "Revised text"
|
|
445
|
+
slcli comment update <COMMENT_ID> \
|
|
446
|
+
-m "FYI: <user:f9d5c5c9-e098-4a82-8e55-fede326a4ec3>" \
|
|
447
|
+
-n "My Result" -r testmonitor:Result \
|
|
448
|
+
-u "https://<server>/nitestmonitor/results/<ID>" \
|
|
449
|
+
--mention f9d5c5c9-e098-4a82-8e55-fede326a4ec3
|
|
450
|
+
|
|
451
|
+
# Delete one or more comments by ID (up to 1000 per call)
|
|
452
|
+
slcli comment delete <COMMENT_ID>
|
|
453
|
+
slcli comment delete <ID1> <ID2> <ID3>
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
### workspace — Workspace management
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
slcli workspace list [-f json]
|
|
460
|
+
slcli workspace get <WORKSPACE_ID> [-f json]
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### config — Profile and credential management
|
|
464
|
+
|
|
465
|
+
Manage named connection profiles (dev, test, prod). Credentials are stored in
|
|
466
|
+
`~/.config/slcli/config.json`.
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
slcli login [--profile NAME] [--url URL] [--api-key KEY] [--web-url URL] [--workspace NAME]
|
|
470
|
+
slcli logout [--profile NAME] [--all] [--force]
|
|
471
|
+
slcli info [-f json] # Show active profile and feature availability
|
|
472
|
+
slcli completion [--shell SHELL] [--install] # Generate or install shell tab completion
|
|
473
|
+
|
|
474
|
+
slcli config list [-f json] # List all profiles
|
|
475
|
+
slcli config current # Show the active profile name
|
|
476
|
+
slcli config use <PROFILE> # Switch the active profile
|
|
477
|
+
slcli config view [--profile NAME] [-f json] # Show full profile details
|
|
478
|
+
slcli config add [--profile NAME] [OPTIONS] # Add or update a profile
|
|
479
|
+
slcli config delete <PROFILE> [--force] # Delete a profile
|
|
480
|
+
slcli config migrate # Migrate legacy keyring credentials
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### user — User management
|
|
484
|
+
|
|
485
|
+
```bash
|
|
486
|
+
slcli user list [--workspace NAME] [-t INT] [-f json]
|
|
487
|
+
slcli user get <USER_ID> [-f json]
|
|
488
|
+
slcli user create [OPTIONS] # Create a new user
|
|
489
|
+
slcli user update <USER_ID> [OPTIONS]
|
|
490
|
+
slcli user delete <USER_ID>
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
### auth — Authorization policies and templates
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
# Policies
|
|
497
|
+
slcli auth policy list [--type CHOICE] [--builtin] [-t INT] [-f json]
|
|
498
|
+
slcli auth policy get <POLICY_ID> [-f json]
|
|
499
|
+
slcli auth policy create --name TEXT [OPTIONS]
|
|
500
|
+
slcli auth policy update <POLICY_ID> [OPTIONS]
|
|
501
|
+
slcli auth policy delete <POLICY_ID>
|
|
502
|
+
slcli auth policy diff <POLICY_ID> # Show diff of a pending policy change
|
|
503
|
+
|
|
504
|
+
# Policy templates
|
|
505
|
+
slcli auth template list [-t INT] [-f json]
|
|
506
|
+
slcli auth template get <TEMPLATE_ID> [-f json]
|
|
507
|
+
slcli auth template delete <TEMPLATE_ID>
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### feed — NI Package Manager feed management
|
|
511
|
+
|
|
512
|
+
Manage package repository feeds used to install software on test systems.
|
|
513
|
+
Supports Windows (.nipkg) and NI Linux RT (.ipk/.deb).
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
slcli feed list [-w WORKSPACE] [-t INT] [-f json]
|
|
517
|
+
slcli feed get <FEED_ID> [-f json]
|
|
518
|
+
slcli feed create --name TEXT [--workspace NAME] [OPTIONS]
|
|
519
|
+
slcli feed delete <FEED_ID>
|
|
520
|
+
slcli feed replicate --source-id FEED_ID --target-workspace WORKSPACE [OPTIONS]
|
|
521
|
+
|
|
522
|
+
# Packages within a feed
|
|
523
|
+
slcli feed package list --feed-id FEED_ID [-f json]
|
|
524
|
+
slcli feed package upload --feed-id FEED_ID --file PATH
|
|
525
|
+
slcli feed package delete --feed-id FEED_ID --package-name NAME
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### file — File Service management
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
slcli file list [--workspace NAME] [--name TEXT] [-t INT] [-f json]
|
|
532
|
+
slcli file get <FILE_ID> [-f json]
|
|
533
|
+
slcli file upload --file PATH [--workspace NAME] [OPTIONS]
|
|
534
|
+
slcli file download <FILE_ID> -o OUTPUT_PATH
|
|
535
|
+
slcli file delete <FILE_ID>
|
|
536
|
+
slcli file query [--filter TEXT] [-t INT] [-f json] # Advanced filter query
|
|
537
|
+
slcli file update-metadata <FILE_ID> [OPTIONS]
|
|
538
|
+
slcli file watch [--workspace NAME] [--filter TEXT] # Stream new file events
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### notebook — Jupyter Notebook management and execution
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
# Local scaffolding
|
|
545
|
+
slcli notebook init [--name NAME] [--directory DIR] # Create a local .ipynb template
|
|
546
|
+
|
|
547
|
+
# Remote notebook management
|
|
548
|
+
slcli notebook manage list [-w WORKSPACE] [-t INT] [-f json]
|
|
549
|
+
slcli notebook manage get <NOTEBOOK_ID> [-f json]
|
|
550
|
+
slcli notebook manage create --file PATH [--workspace NAME]
|
|
551
|
+
slcli notebook manage update <NOTEBOOK_ID> --file PATH
|
|
552
|
+
slcli notebook manage set-interface <NOTEBOOK_ID> [OPTIONS] # Define parameter interface
|
|
553
|
+
slcli notebook manage download <NOTEBOOK_ID> -o PATH
|
|
554
|
+
slcli notebook manage delete <NOTEBOOK_ID>
|
|
555
|
+
|
|
556
|
+
# Notebook executions
|
|
557
|
+
slcli notebook execute list [-w WORKSPACE] [-t INT] [-f json]
|
|
558
|
+
slcli notebook execute get <EXECUTION_ID> [-f json]
|
|
559
|
+
slcli notebook execute start <NOTEBOOK_ID> [--params JSON] [--workspace NAME]
|
|
560
|
+
slcli notebook execute sync <EXECUTION_ID> # Wait for completion
|
|
561
|
+
slcli notebook execute cancel <EXECUTION_ID>
|
|
562
|
+
slcli notebook execute retry <EXECUTION_ID>
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
### customfield — Custom field (DFF) configuration
|
|
566
|
+
|
|
567
|
+
Manage Dynamic Form Field definitions used to attach custom metadata to resources.
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
slcli customfield list [-w WORKSPACE] [-t INT] [-f json]
|
|
571
|
+
slcli customfield get <FIELD_ID> [-f json]
|
|
572
|
+
slcli customfield create --name TEXT --entity-type TYPE [OPTIONS]
|
|
573
|
+
slcli customfield update <FIELD_ID> [OPTIONS]
|
|
574
|
+
slcli customfield delete <FIELD_ID>
|
|
575
|
+
slcli customfield export [-o FILE] # Export all custom fields to JSON
|
|
576
|
+
slcli customfield init [--directory DIR] # Scaffold a local config template
|
|
577
|
+
slcli customfield edit [--directory DIR] # Interactively edit + push config
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### template — Test plan template management
|
|
581
|
+
|
|
582
|
+
> **Note:** Work item templates are managed separately via `slcli workitem template`.
|
|
583
|
+
> The `slcli template` command manages test plan *configuration* templates used
|
|
584
|
+
> when provisioning new test plan instances.
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
slcli template init [--name TEXT] [--directory DIR] # Scaffold a local template file
|
|
588
|
+
slcli template list [-w WORKSPACE] [-t INT] [-f json]
|
|
589
|
+
slcli template get <TEMPLATE_ID> [-f json]
|
|
590
|
+
slcli template export [-o FILE] [-w WORKSPACE] # Export all templates to JSON
|
|
591
|
+
slcli template import --file PATH [--workspace NAME] # Import templates from JSON
|
|
592
|
+
slcli template delete <TEMPLATE_ID>
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### workitem — Work item, template, and workflow management
|
|
596
|
+
|
|
597
|
+
Unified command group for managing work items, work item templates, and workflows.
|
|
598
|
+
|
|
599
|
+
```bash
|
|
600
|
+
# Work item commands
|
|
601
|
+
slcli workitem list [-w WORKSPACE] [--filter TEXT] [--state TEXT] [-t INT] [-f json]
|
|
602
|
+
slcli workitem get <WORK_ITEM_ID> [-f json]
|
|
603
|
+
slcli workitem create --name TEXT --type TEXT --state TEXT --part-number TEXT [-w WORKSPACE]
|
|
604
|
+
slcli workitem create-from-template <TEMPLATE_ID> [--name TEXT] [--state TEXT] [--description TEXT]
|
|
605
|
+
[--assigned-to TEXT] [--workflow-id TEXT] [-w WORKSPACE]
|
|
606
|
+
[--part-number TEXT] [-f json]
|
|
607
|
+
slcli workitem update <WORK_ITEM_ID> [--name TEXT] [--state TEXT] [--description TEXT] [--assigned-to TEXT]
|
|
608
|
+
slcli workitem delete <WORK_ITEM_ID> [--yes] # Prompts for confirmation without --yes
|
|
609
|
+
slcli workitem execute <WORK_ITEM_ID> --action TEXT # Execute an action on a work item
|
|
610
|
+
|
|
611
|
+
# Schedule a work item: set planned time and/or assign resources.
|
|
612
|
+
# Resources map to the work item's resource requirement slots defined in the template:
|
|
613
|
+
# --system SYSTEM_ID Assign a system (by minion/system ID). Repeatable.
|
|
614
|
+
# --fixture ASSET_ID Assign a fixture/slot (by asset ID, asset type FIXTURE). Repeatable.
|
|
615
|
+
# --dut ASSET_ID Assign a DUT (by asset ID, asset type DEVICE_UNDER_TEST). Repeatable.
|
|
616
|
+
# Use `slcli asset list --asset-type FIXTURE` to find fixture IDs.
|
|
617
|
+
# Use `slcli system list` to find system IDs.
|
|
618
|
+
# At least one option must be provided; time and resource options can be combined freely.
|
|
619
|
+
slcli workitem schedule <WORK_ITEM_ID> \
|
|
620
|
+
[--start ISO8601] [--end ISO8601] [--duration SECONDS] \
|
|
621
|
+
[--assigned-to USER_ID] \
|
|
622
|
+
[--system SYSTEM_ID]... [--fixture ASSET_ID]... [--dut ASSET_ID]...
|
|
623
|
+
|
|
624
|
+
# Work item template subgroup
|
|
625
|
+
slcli workitem template list [-w WORKSPACE] [--filter TEXT] [-t INT] [-f json]
|
|
626
|
+
slcli workitem template get <TEMPLATE_ID> [-f json]
|
|
627
|
+
slcli workitem template create --name TEXT --type TEXT --template-group TEXT [-w WORKSPACE] [OPTIONS]
|
|
628
|
+
slcli workitem template update <TEMPLATE_ID> [--name TEXT] [--description TEXT] [--summary TEXT]
|
|
629
|
+
slcli workitem template delete <TEMPLATE_ID>... [--yes]
|
|
630
|
+
|
|
631
|
+
# Workflow subgroup
|
|
632
|
+
slcli workitem workflow list [-w WORKSPACE] [-t INT] [-f json]
|
|
633
|
+
slcli workitem workflow get [--id WORKFLOW_ID] [--name NAME] [-f json]
|
|
634
|
+
slcli workitem workflow init [--name TEXT] [--directory DIR] # Scaffold a local workflow file
|
|
635
|
+
slcli workitem workflow create --file PATH [-w WORKSPACE] # Create from JSON file
|
|
636
|
+
slcli workitem workflow import --file PATH [-w WORKSPACE] # Import workflow from JSON
|
|
637
|
+
slcli workitem workflow export [--id WORKFLOW_ID] [--name NAME] [-o FILE] # Export to JSON
|
|
638
|
+
slcli workitem workflow update --id WORKFLOW_ID --file PATH # Update from JSON file
|
|
639
|
+
slcli workitem workflow delete --id WORKFLOW_ID [--yes]
|
|
640
|
+
slcli workitem workflow preview [--file PATH] [--id WORKFLOW_ID] [--html] [--no-open] [-o FILE]
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
**Create work item options:**
|
|
644
|
+
```bash
|
|
645
|
+
slcli workitem create \
|
|
646
|
+
--name "Battery Cycle Test" \
|
|
647
|
+
--type testplan \
|
|
648
|
+
--state NEW \
|
|
649
|
+
--part-number "P-BAT-001" \
|
|
650
|
+
--description "Battery capacity test" \
|
|
651
|
+
--assigned-to <user-id> \
|
|
652
|
+
--workflow-id <workflow-id> \
|
|
653
|
+
--workspace Default \
|
|
654
|
+
--format json
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### workflow — Workflow management
|
|
658
|
+
|
|
659
|
+
> **Note:** The standalone `slcli workflow` command group has been replaced by
|
|
660
|
+
> `slcli workitem workflow`. Use `slcli workitem workflow` for all workflow operations.
|
|
661
|
+
> See the **workitem** section above.
|
|
662
|
+
|
|
663
|
+
### webapp — Web application management
|
|
664
|
+
|
|
665
|
+
Scaffold, package, and publish custom web applications to SystemLink.
|
|
666
|
+
|
|
667
|
+
```bash
|
|
668
|
+
slcli webapp init [--template html|angular] [--directory DIR] # Scaffold a new project
|
|
669
|
+
slcli webapp pack [--directory DIR] [-o OUTPUT_FILE] # Package webapp into a .zip
|
|
670
|
+
slcli webapp list [-w WORKSPACE] [-t INT] [-f json]
|
|
671
|
+
slcli webapp get <WEBAPP_ID> [-f json]
|
|
672
|
+
slcli webapp publish --file PATH [--workspace NAME] # Upload and publish a webapp
|
|
673
|
+
slcli webapp delete <WEBAPP_ID>
|
|
674
|
+
slcli webapp open <WEBAPP_ID> # Open webapp URL in browser
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Templates:
|
|
678
|
+
- `html` (default) — minimal index.html
|
|
679
|
+
- `angular` — Nimble Angular project with PROMPTS.md (AI-ready prompts) and README.md
|
|
680
|
+
|
|
681
|
+
### example — Built-in example resource provisioning
|
|
682
|
+
|
|
683
|
+
Install pre-built demo configurations (systems, assets, DUTs, templates, etc.)
|
|
684
|
+
for training, testing, or evaluation.
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
slcli example list [-f json] # List available examples
|
|
688
|
+
slcli example info <EXAMPLE_ID> # Show example details
|
|
689
|
+
slcli example install <EXAMPLE_ID> [--workspace NAME] # Provision example resources
|
|
690
|
+
slcli example delete <EXAMPLE_ID> [--workspace NAME] # Remove provisioned resources
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
## Recipes: answering analysis questions
|
|
694
|
+
|
|
695
|
+
See [references/analysis-recipes.md](references/analysis-recipes.md) for detailed
|
|
696
|
+
multi-step recipes covering operator performance, calibration tracking, capacity
|
|
697
|
+
planning, yield analysis, and failure pattern investigation.
|
|
698
|
+
|
|
699
|
+
## Filtering guide
|
|
700
|
+
|
|
701
|
+
See [references/filtering.md](references/filtering.md) for detailed filtering
|
|
702
|
+
syntax, advanced LINQ expressions, and parameterized query examples.
|
|
703
|
+
|
|
704
|
+
## Key rules
|
|
705
|
+
|
|
706
|
+
1. **Always use `-f json`** when piping output to `jq` or doing programmatic analysis.
|
|
707
|
+
2. **Use `--summary --group-by`** for aggregation instead of fetching all records and counting.
|
|
708
|
+
3. **Use convenience filters first** (e.g., `--status FAILED`), fall back to `--filter` for complex queries.
|
|
709
|
+
4. **Parameterize `--filter` queries** — use `--substitution` instead of string interpolation.
|
|
710
|
+
5. **Combine filters** — convenience filters are ANDed together automatically.
|
|
711
|
+
6. **Use `--take`** to control result volume; JSON returns all matching up to `--take`.
|
|
712
|
+
7. **Status enum values**: `PASSED`, `FAILED`, `RUNNING`, `ERRORED`, `TERMINATED`, `TIMEDOUT`, `WAITING`, `SKIPPED`, `CUSTOM`.
|
|
713
|
+
8. **Exit codes**: 0 = success, 1 = general error, 2 = invalid input, 3 = not found, 4 = permission denied, 5 = network error.
|