Get Inventory Job
cnc_get_inventory_jobRetrieve an inventory job by ID to check its state, type, timestamps, impacted objects, and error. Verify the outcome of device/credential/provider write operations.
Instructions
Get one inventory job by id: its state, type, timestamps, the objects it touched and the error text when it failed.
Read-only. Use it to check the outcome of a device/credential/provider write. For a job that may still be running prefer cnc_wait_for_inventory_job, which polls until it finishes. The lookup scans the newest few hundred jobs (newest first), so a very old job may not be found even though cnc_list_inventory_jobs can still page to it.
Returns: str: JSON of the job: {"job_id", "state", "type", "creation_time", "completion_time", "created_by", "impacted": [" []"], "impacted_objects": [{"uuid", "name", "ip"}], "error"}. A state of JOB_COMPLETED_WITH_WARNING is a success whose advisory is in "error". "Error: No inventory job with id ..." when the id matches nothing; other failures: "Error: ".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Inventory job id as returned by a write tool or cnc_list_inventory_jobs (e.g. '0f6c1a2e-...'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |