Obtaining CLI Examples on API Explorer
API Explorer supports online API debugging and generates Cloud CLI examples for cloud service APIs. After configuring the parameters of an API on API Explorer, you can copy and use the relevant CLI Example.
The following figure shows the IMS API for creating an image on API Explorer. After you set the request parameters, the CLI example will be updated accordingly. You can save the command with the set request parameters. Later, you can directly invoke this command in Cloud CLI or integrate it into a script.
Figure 1 Obtaining a CLI example on API Explorer

Note
- On the API Explorer console, only the parameters with values specified are displayed in the CLI example.
- A CLI example carries information such as a project ID and region. To use the example in another project or region, replace the project ID and region with the corresponding values.