systemlink-cli 1.13.6__tar.gz → 1.13.7__tar.gz

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.
Files changed (93) hide show
  1. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/PKG-INFO +1 -1
  2. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/pyproject.toml +1 -1
  3. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/_version.py +1 -1
  4. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-notebook/SKILL.md +7 -1
  5. systemlink_cli-1.13.7/slcli/skills/systemlink-notebook/references/interfaces.md +185 -0
  6. systemlink_cli-1.13.6/slcli/skills/systemlink-notebook/references/interfaces.md +0 -172
  7. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/LICENSE +0 -0
  8. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/dff-editor/editor.js +0 -0
  9. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/dff-editor/index.html +0 -0
  10. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/__init__.py +0 -0
  11. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/__main__.py +0 -0
  12. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/asset_click.py +0 -0
  13. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/cli_formatters.py +0 -0
  14. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/cli_utils.py +0 -0
  15. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/comment_click.py +0 -0
  16. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/completion_click.py +0 -0
  17. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/config.py +0 -0
  18. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/config_click.py +0 -0
  19. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/dataframe_click.py +0 -0
  20. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/dff_click.py +0 -0
  21. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/dff_decorators.py +0 -0
  22. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/example_click.py +0 -0
  23. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/example_loader.py +0 -0
  24. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/example_provisioner.py +0 -0
  25. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/README.md +0 -0
  26. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/_schema/schema-v1.0.json +0 -0
  27. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/demo-complete-workflow/README.md +0 -0
  28. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/demo-complete-workflow/config.yaml +0 -0
  29. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/demo-test-plans/README.md +0 -0
  30. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/demo-test-plans/config.yaml +0 -0
  31. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
  32. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
  33. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
  34. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
  35. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
  36. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
  37. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
  38. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
  39. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
  40. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
  41. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/feed_click.py +0 -0
  42. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/file_click.py +0 -0
  43. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/function_click.py +0 -0
  44. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/function_templates.py +0 -0
  45. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/main.py +0 -0
  46. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/mcp_click.py +0 -0
  47. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/mcp_reachability.py +0 -0
  48. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/mcp_server.py +0 -0
  49. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/notebook_click.py +0 -0
  50. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/platform.py +0 -0
  51. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/policy_click.py +0 -0
  52. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/policy_utils.py +0 -0
  53. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/profiles.py +0 -0
  54. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/response_handlers.py +0 -0
  55. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/rich_output.py +0 -0
  56. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/routine_click.py +0 -0
  57. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skill_click.py +0 -0
  58. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/nipkg-file-package/SKILL.md +0 -0
  59. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/SKILL.md +0 -0
  60. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
  61. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/commands.md +0 -0
  62. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
  63. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/filtering.md +0 -0
  64. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/troubleshooting.md +0 -0
  65. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-job-debugging/SKILL.md +0 -0
  66. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-notebook/references/notebook-patterns.md +0 -0
  67. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-python-test/SKILL.md +0 -0
  68. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/SKILL.md +0 -0
  69. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/angular-ui-packages.md +0 -0
  70. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/deployment.md +0 -0
  71. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/layout-patterns.md +0 -0
  72. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/nimble-angular.md +0 -0
  73. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/systemlink-services.md +0 -0
  74. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/troubleshooting.md +0 -0
  75. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/spec_click.py +0 -0
  76. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/ssl_trust.py +0 -0
  77. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/state_click.py +0 -0
  78. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/system_click.py +0 -0
  79. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/system_query_utils.py +0 -0
  80. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/table_utils.py +0 -0
  81. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/tag_click.py +0 -0
  82. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/templates_click.py +0 -0
  83. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/testmonitor_click.py +0 -0
  84. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/universal_handlers.py +0 -0
  85. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/user_click.py +0 -0
  86. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/utils.py +0 -0
  87. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/web_editor.py +0 -0
  88. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/webapp_click.py +0 -0
  89. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/workflow_preview.py +0 -0
  90. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/workflows_click.py +0 -0
  91. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/workitem_click.py +0 -0
  92. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/workspace_click.py +0 -0
  93. {systemlink_cli-1.13.6 → systemlink_cli-1.13.7}/slcli/workspace_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: systemlink-cli
3
- Version: 1.13.6
3
+ Version: 1.13.7
4
4
  Summary: SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates.
5
5
  License-File: LICENSE
6
6
  Author: Fred Visser
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "systemlink-cli"
3
- version = "1.13.6"
3
+ version = "1.13.7"
4
4
  description = "SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates."
5
5
  authors = ["Fred Visser <fred.visser@emerson.com>"]
6
6
  packages = [{ include = "slcli" }]
@@ -1,4 +1,4 @@
1
1
  """Version information for slcli."""
2
2
 
3
3
  # This file is auto-generated. Do not edit manually.
4
- __version__ = "1.13.6"
4
+ __version__ = "1.13.7"
@@ -154,7 +154,13 @@ in the cell's `.metadata` field for SystemLink to recognize the parameters and o
154
154
  - `tags: ["parameters"]` is **required** — this is how papermill identifies the cell
155
155
  - `systemlink.version` must be `2` for most notebooks, or `1` for **Work Item Automations**
156
156
  - Supported parameter types: `string`, `integer`, `float`, `boolean`, `string[]`
157
- - Supported output types: `data_frame`, `scalar`, `string`, `string[]`
157
+ - Supported scrapbook output types: `data_frame`, `scalar`, `string`, `string[]`
158
+ - Some interfaces define additional descriptor values outside the standard scrapbook output
159
+ types. For example, Data Space Analysis returns analysis option descriptors whose
160
+ `type` can be `scalar` or `vector`.
161
+ - **Grafana restriction:** Notebooks intended for use in Grafana dashboards can only
162
+ output `data_frame` and `scalar` types. The `string` and `string[]` output types
163
+ are not supported by the Grafana plugin.
158
164
 
159
165
  ### Work Item Automations pattern
160
166
 
@@ -0,0 +1,185 @@
1
+ # Notebook Interfaces
2
+
3
+ When deploying a notebook to SystemLink, you can assign an **interface** that tells
4
+ SystemLink how the notebook will be used. This affects how parameters are presented
5
+ and how the notebook is triggered.
6
+
7
+ Set the interface during creation or update:
8
+
9
+ ```bash
10
+ slcli notebook manage update --id <ID> --interface "Systems Grid"
11
+ ```
12
+
13
+ Prefer `create --interface ...` when you are creating a new notebook. Use
14
+ `update --interface ...` for in-place interface changes on an existing notebook.
15
+ Delete and re-create only if the server rejects the update.
16
+
17
+ ## Service Availability Note
18
+
19
+ The Python client does not cover every SystemLink service. Key gaps that affect
20
+ automation interfaces (see the `nisystemlink-clients` repository for the current
21
+ service list):
22
+
23
+ - ❌ **Notebook Execution** — No Python client for checking execution status or logs
24
+ - ❌ **Routines v1/v2** — No Python client for scheduling; use REST directly or `slcli routine` in scheduled shells
25
+ - ❌ **Comments** — No Python client for adding resource annotations
26
+ - ❌ **User** — No Python client for querying users/workspaces (use REST directly)
27
+
28
+ For these services in notebooks, call the REST API directly via the `requests`
29
+ library and the service-specific SystemLink OpenAPI docs.
30
+
31
+ ## Available Interfaces
32
+
33
+ Reference: [Publishing a Jupyter Notebook (NI Docs)](https://www.ni.com/docs/en-US/bundle/systemlink-enterprise/page/publishing-a-jupyter-notebook.html)
34
+
35
+ > **Note:** SystemLink Enterprise does not strictly enforce the selected interface name.
36
+ > The service can still execute a notebook even if the interface-specific metadata is
37
+ > incomplete. However, parameter injection, UI rendering, and output handling still depend
38
+ > on the appropriate papermill and `systemlink` metadata being present.
39
+
40
+ | Interface | Use Case | Required Inputs | Required Outputs |
41
+ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
42
+ | **Assets Grid** | Not currently in use | — | — |
43
+ | **Data Table Analysis** | Analyze data table contents. Detailed input and output requirements are not yet documented in this reference. | See NI docs | See NI docs |
44
+ | **Data Space Analysis** | Analyze parametric data in a data space and calculate statistics | `trace_data`: `dict[str, str]` (artifact reference, for example `{"artifact_id": "..."}`)<br>`analysis_options`: `string[]`<br>`workspace_id`: `string` | List of analysis options: `[{display_name, id, type: scalar/vector}]` |
45
+ | **File Analysis** | Analyze a file or create a routine with a file change trigger | `file_ids`: string[] | No output required |
46
+ | **Periodic Execution** | Scheduled recurring notebook (e.g. daily/hourly reports) | No input required | No output required |
47
+ | **Resource Changed Routine** | Triggered when a resource changes (via v1 routines) | `context`: `dict` containing `routine_id`, `correlation_id`, `triggered_at`, `resource_type`, `before` (snapshot before change), and `after` (snapshot after change) | No output required |
48
+ | **Specification Analysis** | Analyze chosen specifications | `spec_ids`: `string[]`<br>`product_id`: `string` | No output required |
49
+ | **Systems Grid** | Report that adds a column to the Systems management grid | No input required | `data_frame` with `minion id` as the first column. Example: `[{"display_name": "Package Version", "id": "package_version", "type": "data_frame", "data": {"columns": ["minion id", "package version"], "values": [["minion-id-1", "23.5"], ["minion-id-2", "24.0"]]}}]` |
50
+ | **Test Data Analysis** | Analyze chosen test results | `result_ids`: string[] | No output required |
51
+ | **Test Data Extraction** | Extract parametric data from files (BDC, STDF) and transform into test results, steps, and measurements | `file_id`: `string`<br>`part_number`: `string`<br>`notebook_id`: `string` | No output required |
52
+ | **Work Item Automations** | Perform automated actions on one or more work items for customer-specific use cases. Notebooks appear in the work items UI and can be manually triggered on selected items. | `work_item_ids`: string[] | No output required |
53
+ | **Work Item Operations** | Invoked by the system through the action of a work item execution | `workItemId`: `string`<br>`systemId`: `string`<br>May also receive user-defined parameters | No output required |
54
+ | **Work Item Scheduler** | Schedule work items using a custom algorithm | `work_item_ids`: string[] | No output required |
55
+
56
+ ### Grafana Compatibility
57
+
58
+ Notebooks whose outputs are consumed by the SystemLink Grafana plugin can only use
59
+ `data_frame` and `scalar` output types. The `string` and `string[]` types are not
60
+ supported by Grafana.
61
+
62
+ ## Common Interface Patterns
63
+
64
+ ### Systems Grid
65
+
66
+ Parameters typically include:
67
+
68
+ - `group_by` (string) — always support "System"
69
+ - `systems_filter` (string) — filter expression for which systems
70
+ - Domain-specific params (e.g. `package` for package version)
71
+
72
+ Output must be `data_frame` with `minion id` as the first column.
73
+
74
+ ### Test Data Analysis
75
+
76
+ Parameters typically include:
77
+
78
+ - `group_by` (string)
79
+ - `program_name` (string)
80
+ - `status_filter` (string)
81
+ - `systems_filter` (string)
82
+
83
+ ### Periodic Execution
84
+
85
+ No special parameter requirements. Typically uses fixed configuration
86
+ or reads from tags/files. Can be scheduled via routines (no Python client available).
87
+
88
+ **Note:** The Python client does not have a Routines service. Use `slcli routine` to
89
+ schedule notebooks, or call the Routines REST API directly.
90
+
91
+ Create a scheduled routine via CLI:
92
+
93
+ ```bash
94
+ slcli routine create --api-version v1 \
95
+ --name "Daily Report" \
96
+ --type SCHEDULED \
97
+ --notebook-id <NOTEBOOK_ID> \
98
+ --schedule '{"startTime":"2026-01-01T00:00:00Z","repeat":"DAY"}'
99
+ ```
100
+
101
+ Or create a scheduled routine via REST using `HttpConfigurationManager` and `requests`:
102
+
103
+ ```python
104
+ import requests
105
+ from nisystemlink.clients.core import HttpConfigurationManager
106
+
107
+ config = HttpConfigurationManager.get_configuration()
108
+ base_url = config.server_uri.rstrip("/")
109
+ api_keys = getattr(config, "api_keys", {})
110
+ api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
111
+ if not api_key:
112
+ raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
113
+ headers = {"x-ni-api-key": api_key}
114
+
115
+ payload = {
116
+ "name": "Daily Report",
117
+ "type": "SCHEDULED",
118
+ "notebookId": "<NOTEBOOK_ID>",
119
+ "schedule": {"startTime": "<START_TIME_ISO8601>", "repeat": "DAY"}
120
+ }
121
+
122
+ resp = requests.post(f"{base_url}/niroutine/v1/routines", json=payload, headers=headers)
123
+ resp.raise_for_status()
124
+ ```
125
+
126
+ ### Work Item Automations
127
+
128
+ Use this interface for notebooks that act on selected work items (close, update,
129
+ assign, etc.). The notebook appears in the work items UI and can be manually
130
+ triggered on one or more selected work items.
131
+
132
+ Parameters are injected by the work item system:
133
+
134
+ - `work_item_ids` (string[]) — list of selected work item IDs. Default: `[]`
135
+ - `workspace` (string) — workspace context (optional)
136
+
137
+ **Critical:** `work_item_ids` must be typed as `"string[]"` (not `"string"`),
138
+ default to `[]` in both papermill and the code cell, and `systemlink.version`
139
+ must be `1`. See the systemlink-notebook skill for the full metadata example.
140
+
141
+ **Service note:** The Python client has `work_item` service for querying and updating
142
+ work items, but does not have a `comments` service. If your automation needs to add
143
+ comments or notes, call the Comments REST API directly via `requests` library.
144
+
145
+ ## Using REST When Python Clients Are Missing
146
+
147
+ If a notebook needs a service without a Python client, use `requests` and the OpenAPI docs:
148
+
149
+ ```python
150
+ import requests
151
+ from nisystemlink.clients.core import HttpConfigurationManager
152
+
153
+ config = HttpConfigurationManager.get_configuration()
154
+ base_url = config.server_uri.rstrip("/")
155
+ api_keys = getattr(config, "api_keys", {})
156
+ api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
157
+ if not api_key:
158
+ raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
159
+ headers = {"x-ni-api-key": api_key}
160
+
161
+ # Example: Add a comment to a work item (Comments service not available in Python)
162
+ comment_payload = {
163
+ "resourceId": work_item_id,
164
+ "resourceType": "WorkItem",
165
+ "content": "Automated note from notebook"
166
+ }
167
+
168
+ resp = requests.post(
169
+ f"{base_url}/nicomments/v1/comments",
170
+ json=comment_payload,
171
+ headers=headers
172
+ )
173
+ resp.raise_for_status()
174
+ comment = resp.json()
175
+ ```
176
+
177
+ Common missing services you might need:
178
+
179
+ - **Comments** — `/nicomments/v1/comments`
180
+ - **Routines v1/v2** — `/niroutine/v1/routines` or `/niroutine/v2/routines`
181
+ - **User** — `/niuser/v1/users` or `/niuser/v1/users/query`
182
+ - **Systems State** — `/nisystemsstate/v1/states`
183
+ - **Tag Historian** — check the service-specific OpenAPI docs instead of assuming `/niapis/...`
184
+
185
+ Always check the OpenAPI docs to confirm the correct endpoint path and request schema before implementing REST calls.
@@ -1,172 +0,0 @@
1
- # Notebook Interfaces
2
-
3
- When deploying a notebook to SystemLink, you can assign an **interface** that tells
4
- SystemLink how the notebook will be used. This affects how parameters are presented
5
- and how the notebook is triggered.
6
-
7
- Set the interface during creation or update:
8
-
9
- ```bash
10
- slcli notebook manage update --id <ID> --interface "Systems Grid"
11
- ```
12
-
13
- Prefer `create --interface ...` when you are creating a new notebook. Use
14
- `update --interface ...` for in-place interface changes on an existing notebook.
15
- Delete and re-create only if the server rejects the update.
16
-
17
- ## Service Availability Note
18
-
19
- The Python client does not cover every SystemLink service. Key gaps that affect
20
- automation interfaces (see the `nisystemlink-clients` repository for the current
21
- service list):
22
-
23
- - ❌ **Notebook Execution** — No Python client for checking execution status or logs
24
- - ❌ **Routines v1/v2** — No Python client for scheduling; use REST directly or `slcli routine` in scheduled shells
25
- - ❌ **Comments** — No Python client for adding resource annotations
26
- - ❌ **User** — No Python client for querying users/workspaces (use REST directly)
27
-
28
- For these services in notebooks, call the REST API directly via the `requests`
29
- library and the service-specific SystemLink OpenAPI docs.
30
-
31
- ## Available Interfaces
32
-
33
- | Interface | Use Case |
34
- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
35
- | **Assets Grid** | Report that adds a column to the Assets management grid |
36
- | **Data Table Analysis** | Analysis of data table contents |
37
- | **Data Space Analysis** | Analysis of data space contents |
38
- | **File Analysis** | Analysis of uploaded files |
39
- | **Periodic Execution** | Scheduled recurring notebook (e.g. daily/hourly reports) |
40
- | **Resource Changed Routine** | Triggered when a resource changes (via v1 routines) |
41
- | **Specification Analysis** | Analysis against specifications/limits |
42
- | **Systems Grid** | Report that adds a column to the Systems management grid |
43
- | **Test Data Analysis** | Analysis of test monitor results |
44
- | **Test Data Extraction** | Extract and transform test data |
45
- | **Work Item Automations** | Notebooks that can be manually executed on selected work items, or triggered by work item lifecycle events. **Use this for any notebook that acts on work items** (e.g. close, update status, assign). |
46
- | **Work Item Operations** | Internal operations performed on work items by the system |
47
- | **Work Item Scheduler** | Scheduling logic for work items |
48
-
49
- ## Common Interface Patterns
50
-
51
- ### Systems Grid
52
-
53
- Parameters typically include:
54
-
55
- - `group_by` (string) — always support "System"
56
- - `systems_filter` (string) — filter expression for which systems
57
- - Domain-specific params (e.g. `package` for package version)
58
-
59
- Output must be `data_frame` with `minion id` as the first column.
60
-
61
- ### Test Data Analysis
62
-
63
- Parameters typically include:
64
-
65
- - `group_by` (string)
66
- - `program_name` (string)
67
- - `status_filter` (string)
68
- - `systems_filter` (string)
69
-
70
- ### Periodic Execution
71
-
72
- No special parameter requirements. Typically uses fixed configuration
73
- or reads from tags/files. Can be scheduled via routines (no Python client available).
74
-
75
- **Note:** The Python client does not have a Routines service. Use `slcli routine` to
76
- schedule notebooks, or call the Routines REST API directly.
77
-
78
- Create a scheduled routine via CLI:
79
-
80
- ```bash
81
- slcli routine create --api-version v1 \
82
- --name "Daily Report" \
83
- --type SCHEDULED \
84
- --notebook-id <NOTEBOOK_ID> \
85
- --schedule '{"startTime":"2026-01-01T00:00:00Z","repeat":"DAY"}'
86
- ```
87
-
88
- Or create a scheduled routine via REST using `HttpConfigurationManager` and `requests`:
89
-
90
- ```python
91
- import requests
92
- from nisystemlink.clients.core import HttpConfigurationManager
93
-
94
- config = HttpConfigurationManager.get_configuration()
95
- base_url = config.server_uri.rstrip("/")
96
- api_keys = getattr(config, "api_keys", {})
97
- api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
98
- if not api_key:
99
- raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
100
- headers = {"x-ni-api-key": api_key}
101
-
102
- payload = {
103
- "name": "Daily Report",
104
- "type": "SCHEDULED",
105
- "notebookId": "<NOTEBOOK_ID>",
106
- "schedule": {"startTime": "<START_TIME_ISO8601>", "repeat": "DAY"}
107
- }
108
-
109
- resp = requests.post(f"{base_url}/niroutine/v1/routines", json=payload, headers=headers)
110
- resp.raise_for_status()
111
- ```
112
-
113
- ### Work Item Automations
114
-
115
- Use this interface for notebooks that act on selected work items (close, update,
116
- assign, etc.). The notebook appears in the work items UI and can be manually
117
- triggered on one or more selected work items.
118
-
119
- Parameters are injected by the work item system:
120
-
121
- - `work_item_ids` (string[]) — list of selected work item IDs. Default: `[]`
122
- - `workspace` (string) — workspace context (optional)
123
-
124
- **Critical:** `work_item_ids` must be typed as `"string[]"` (not `"string"`),
125
- default to `[]` in both papermill and the code cell, and `systemlink.version`
126
- must be `1`. See the systemlink-notebook skill for the full metadata example.
127
-
128
- **Service note:** The Python client has `work_item` service for querying and updating
129
- work items, but does not have a `comments` service. If your automation needs to add
130
- comments or notes, call the Comments REST API directly via `requests` library.
131
-
132
- ## Using REST When Python Clients Are Missing
133
-
134
- If a notebook needs a service without a Python client, use `requests` and the OpenAPI docs:
135
-
136
- ```python
137
- import requests
138
- from nisystemlink.clients.core import HttpConfigurationManager
139
-
140
- config = HttpConfigurationManager.get_configuration()
141
- base_url = config.server_uri.rstrip("/")
142
- api_keys = getattr(config, "api_keys", {})
143
- api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
144
- if not api_key:
145
- raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
146
- headers = {"x-ni-api-key": api_key}
147
-
148
- # Example: Add a comment to a work item (Comments service not available in Python)
149
- comment_payload = {
150
- "resourceId": work_item_id,
151
- "resourceType": "WorkItem",
152
- "content": "Automated note from notebook"
153
- }
154
-
155
- resp = requests.post(
156
- f"{base_url}/nicomments/v1/comments",
157
- json=comment_payload,
158
- headers=headers
159
- )
160
- resp.raise_for_status()
161
- comment = resp.json()
162
- ```
163
-
164
- Common missing services you might need:
165
-
166
- - **Comments** — `/nicomments/v1/comments`
167
- - **Routines v1/v2** — `/niroutine/v1/routines` or `/niroutine/v2/routines`
168
- - **User** — `/niuser/v1/users` or `/niuser/v1/users/query`
169
- - **Systems State** — `/nisystemsstate/v1/states`
170
- - **Tag Historian** — check the service-specific OpenAPI docs instead of assuming `/niapis/...`
171
-
172
- Always check the OpenAPI docs to confirm the correct endpoint path and request schema before implementing REST calls.
File without changes