chef-import-cli reference
chef-import-cli
Chef Utility - Import Service API
Options
-h--helphelp for chef-import-cli
Default value:
false
chef-import-cli completion
Generate the autocompletion script for the specified shell
Synopsis
Generate the autocompletion script for chef-import-cli for the specified shell. See each sub-command’s help for details on how to use the generated script.
Options
-h--helphelp for completion
Default value:
false
See also
- chef-import-cli completion bash
- chef-import-cli completion fish
- chef-import-cli completion powershell
- chef-import-cli completion zsh
chef-import-cli completion bash
Generate the autocompletion script for bash
Synopsis
Generate the autocompletion script for the bash shell.
This script depends on the ‘bash-completion’ package. If it is not installed already, you can install it via your OS’s package manager.
To load completions in your current shell session:
source <(chef-import-cli completion bash)
To load completions for every new session, execute once:
Linux:
chef-import-cli completion bash > /etc/bash_completion.d/chef-import-cli
macOS:
chef-import-cli completion bash > $(brew --prefix)/etc/bash_completion.d/chef-import-cli
You will need to start a new shell for this setup to take effect.
completion-bash package
You must have the bash-completion package installed on your computer to run the completion bash subcommand.
To install and configure the package, see the Chef 360 Platform CLI documentation.
Usage
chef-import-cli completion bashOptions
-h--helphelp for bash
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-import-cli completion fish
Generate the autocompletion script for fish
Synopsis
Generate the autocompletion script for the fish shell.
To load completions in your current shell session:
chef-import-cli completion fish | source
To load completions for every new session, execute once:
chef-import-cli completion fish > ~/.config/fish/completions/chef-import-cli.fish
You will need to start a new shell for this setup to take effect.
Usage
chef-import-cli completion fish [flags]Options
-h--helphelp for fish
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-import-cli completion powershell
Generate the autocompletion script for powershell
Synopsis
Generate the autocompletion script for powershell.
To load completions in your current shell session:
chef-import-cli completion powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command to your powershell profile.
Usage
chef-import-cli completion powershell [flags]Options
-h--helphelp for powershell
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-import-cli completion zsh
Generate the autocompletion script for zsh
Synopsis
Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions in your current shell session:
source <(chef-import-cli completion zsh)
To load completions for every new session, execute once:
Linux:
chef-import-cli completion zsh > "${fpath[1]}/_chef-import-cli"
macOS:
chef-import-cli completion zsh > $(brew --prefix)/share/zsh/site-functions/_chef-import-cli
You will need to start a new shell for this setup to take effect.
Usage
chef-import-cli completion zsh [flags]Options
-h--helphelp for zsh
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-import-cli deregister-device
De-register a device
Synopsis
Use this operation to de-register a device
Usage
chef-import-cli deregister-device [flags]Options
--forceforce remove profile from local list of profiles, even on error from server
Default value:
false-f--formatto print response in format
Default value:
json-h--helphelp for deregister-device
Default value:
false--profilename for the profile of the new api-token
Default value:
default-v--verboseto show debug logs
Default value:
false
See also
chef-import-cli get-default-profile
Get default profile for request
Usage
chef-import-cli get-default-profile [flags]Options
-h--helphelp for get-default-profile
Default value:
false
See also
chef-import-cli importservice
Commands related to importservice
Options
-h--helphelp for importservice
Default value:
false
See also
- chef-import-cli importservice complete-import-process
- chef-import-cli importservice create-import-process
- chef-import-cli importservice generate-sha256
- chef-import-cli importservice get-import-process-status
- chef-import-cli importservice update-import-process-stage
chef-import-cli importservice complete-import-process
Complete import process
Synopsis
Summary
Marks an import process as complete with either a success or failure result. This endpoint should be called after all import stages have been processed.
Note
When the result is ‘failure’, the errors array should contain details about what went wrong during the import process.
Errors
400 (Bad Request)
The request payload is malformed or missing required fields
401 (Unauthorized)
Authentication credentials are missing or invalid
403 (Forbidden)
The user does not have permission to complete import processes
404 (Not Found)
The specified import process does not exist
422 (Unprocessable Content)
The request payload does not meet validation requirements (e.g., invalid result value)
Usage
chef-import-cli importservice complete-import-process [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json-e--exampleto show example request body
Default value:
false-f--example-formatFormat of the --example, options: json, yaml, toml
Default value:
json-n--example-numberExample number ranges from 1 to the number of examples present. If value is 0, it will show all examples
Default value:
0--formatto print response in format
Default value:
json-h--helphelp for complete-import-process
Default value:
false--importIdThe unique identifier for the import process. This is returned when initiating an import via the POST /process/{importType} endpoint.
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
Examples
The following examples show request bodies that you can submit with this command.
- Failure
{ "errors": [ "Failed to restore organization: invalid org structure", "User data validation failed: missing required fields" ], "result": "failure" } - Success
{ "errors": [], "result": "success" }
See also
chef-import-cli importservice create-import-process
Initiate data import process
Synopsis
Summary
Initiates a data import process for the specified import type. Returns a signed upload URL that can be used to upload the import tarball to the platform’s storage.
Note
The upload URL is time-limited based on the ‘durationSeconds’ parameter. If the URL expires before the upload is complete, you can request a new URL by providing the same ‘filename’ parameter.
Errors
400 (Bad Request)
The request payload is malformed or missing required fields
401 (Unauthorized)
Authentication credentials are missing or invalid
403 (Forbidden)
The user does not have permission to perform import operations
422 (Unprocessable Content)
The request payload does not meet validation requirements (e.g., invalid sha256sum format)
Usage
chef-import-cli importservice create-import-process [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json-e--exampleto show example request body
Default value:
false-f--example-formatFormat of the --example, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-import-process
Default value:
false--importTypeThe type of import to process. This determines how the uploaded data will be handled by the platform. Supported import types: - 'dsm-import': Declarative State Management import for migrating DSM data into Chef 360
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
Examples
The following examples show request bodies that you can submit with this command.
- Default example
{ "durationSeconds": 3600, "filename": "dsm-backup-2024-12-17.tar.gz", "sha256sum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }
See also
chef-import-cli importservice generate-sha256
Generate SHA256 checksum for a backup file
Synopsis
Generate SHA256 checksum for a .tar.gz backup file. This command reads the file in chunks to avoid loading the entire file into memory. The generated checksum can be used with the create-import-process command.
Example: chef-import-cli importservice generate-sha256 –file /path/to/backup.tar.gz
Usage
chef-import-cli importservice generate-sha256 [flags]Options
--filePath to the .tar.gz file (required)
--formatOutput format: text, json, or yaml
Default value:
text-h--helphelp for generate-sha256
Default value:
false
See also
chef-import-cli importservice get-import-process-status
Get import process status
Synopsis
Summary
Retrieves the current status of an import process by its unique identifier.
Note
Use this endpoint to monitor the progress of an import operation after initiating it via the POST /process/{importType} endpoint.
Errors
401 (Unauthorized)
Authentication credentials are missing or invalid
403 (Forbidden)
The user does not have permission to view import process status
404 (Not Found)
The specified import process does not exist
Usage
chef-import-cli importservice get-import-process-status [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-import-process-status
Default value:
false--importIdThe unique identifier for the import process. This is returned when initiating an import via the POST /process/{importType} endpoint.
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-import-cli importservice update-import-process-stage
Update import process stage
Synopsis
Summary
Updates the current stage of an import process. This endpoint is used to track the progress of an import operation through its various stages.
Note
The stage should be updated sequentially as the import process progresses through each phase of the import workflow.
Errors
400 (Bad Request)
The request payload is malformed or missing required fields
401 (Unauthorized)
Authentication credentials are missing or invalid
403 (Forbidden)
The user does not have permission to update import process stage
404 (Not Found)
The specified import process does not exist
422 (Unprocessable Content)
The request payload does not meet validation requirements (e.g., invalid stage value)
Usage
chef-import-cli importservice update-import-process-stage [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json-e--exampleto show example request body
Default value:
false-f--example-formatFormat of the --example, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for update-import-process-stage
Default value:
false--importIdThe unique identifier for the import process. This is returned when initiating an import via the POST /process/{importType} endpoint.
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
Examples
The following examples show request bodies that you can submit with this command.
- Default example
{ "stage": "extracting" }
See also
chef-import-cli list-profile-names
Get the list of profile names available
Usage
chef-import-cli list-profile-names [flags]Options
-h--helphelp for list-profile-names
Default value:
false
See also
chef-import-cli register-device
register a device and get api-token for device login
Usage
chef-import-cli register-device [flags]Options
--cafilepath to ca file
--device-namename of the device
Default value:
device-f--formatto print response in format
Default value:
json-h--helphelp for register-device
Default value:
false-i--insecureinsecure skip verify
Default value:
false--overwritethis flag is used to overwrite the old profile if the profile for profile name provided already exists
Default value:
false--profile-namename for the profile of the new api-token
--urltenant url
-v--verboseto show debug logs
Default value:
false
See also
chef-import-cli set-default-profile
Set default profile for request
Usage
chef-import-cli set-default-profile [flags]Options
-h--helphelp for set-default-profile
Default value:
false
See also
chef-import-cli version
Chef Import CLI version
Usage
chef-import-cli version [flags]Options
-h--helphelp for version
Default value:
false