tfctl api schema search
The tfctl api schema search command searches API operations by keywords.
Usage
$ tfctl api schema search QUERY [QUERY ...] [options]
Description
The tfctl api schema search command searches the HCP Terraform API operations by keywords. Use this command to discover available API endpoints when you don't know the exact operation ID or path.
The search finds the top ten case-insensitive matches against operation IDs, paths, summaries, and tags in the OpenAPI specification. The command outputs a list of matching operations, including the operation ID, HTTP method, API path, and a summary.
Use tfctl api schema get to view details for a specific result.
Arguments
QUERY [QUERY ...]: (Required) The search query to match against API operations. You can provide multiple keywords rank search results.
Global flags
All tfctl commands support options that control output formatting and CLI behavior. Refer to Global flags reference for the complete list of available options.
Output
Use the operation ID from the results with tfctl api schema get to view the full schema for a specific operation.
Examples
The following examples demonstrate how to search for API operations by keyword.
Search for workspace operations
The following example searches for API operations that mention the term workspace.
$ tfctl api schema search workspace
tfctl outputs the following information:
Search with multiple keywords
The following example searches for API operations that mention the terms workspace and create.
$ tfctl api schema search workspace create
Search for run-related operations
The following example searches for API operations related to runs.
$ tfctl api schema search run
Search for variable operations
The following example searches for API operations related to variables.
$ tfctl api schema search variable
Related
tfctl api schema get- View detailed schema for a specific operationtfctl api- Perform API requests