tfctl api schema get
The tfctl api schema get command shows a trimmed OpenAPI document for a single operation or all operations on an exact API path.
Usage
$ tfctl api schema get OPERATION_ID_OR_PATH [options]
Description
The tfctl api schema get command displays the OpenAPI schema for a specific API operation or path. You can provide either an operation ID, such as getWorkspace or an exact API path, such as /organizations/{organization}/workspaces.
When you provide an operation ID, the command shows the schema for that specific operation. When you provide a path, it shows all operations available on that path. Paths can include path parameters denoted with curly braces, for example {organization} or {workspace_id}.
The command outputs a trimmed OpenAPI document in JSON format that includes details about the operation, request parameters, request body schema if applicable, and response schemas.
Arguments
OPERATION_ID_OR_PATH: (Required) An exact OpenAPI operation ID or an API path starting with/to inspect.
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.
Examples
The following examples demonstrate how to get OpenAPI schema for operations by path and operation ID.
Inspect the getWorkspace operation by operation ID
The following example prints the OpenAPI schema for the getWorkspace operation.
$ tfctl api schema get getWorkspace
Inspect the getWorkspace operation by path
The following example prints the OpenAPI schema for the getWorkspace operation by referencing its path.
$ tfctl api schema get /workspaces/{workspace_id}
Show all operations on a path
The following example prints the OpenAPI schema for operations on workspaces.
$ tfctl api schema get /organizations/{organization}/workspaces
Related
tfctl api schema search- Search for API operations by keywordstfctl api- Perform API requests