跳转到内容
Docs Try Aspire
Docs Try

aspire docs api get command

此内容尚不支持你的语言。

aspire docs api get - Get the full content of an API reference entry by identifier.

Aspire CLI
aspire docs api get <id> [options]

The aspire docs api get command retrieves and displays the full API reference content for a specific entry from aspire.dev. The content is rendered as Markdown in the terminal.

Use the aspire docs api list command to browse available scopes and discover identifiers, or use the aspire docs api search command to find identifiers by keyword.

  • <id>

    The identifier of the API reference entry to retrieve. Identifiers are path-based strings derived from the API route structure on aspire.dev, for example csharp/aspire.hosting/iresourcebuilder or typescript/aspire.hosting/addredis.

    Use aspire docs api list or aspire docs api search to discover valid identifiers.

The following options are available:

  • --format <Table|Json>

    Output format. Choose Table for a human-readable table or Json for machine-readable JSON output. Defaults to Table.

  • -?, -h, --help

    Prints help and usage documentation for the available commands and options.

  • -l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>

    Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.

  • --non-interactive

    Run the command in non-interactive mode, disabling all interactive prompts and spinners.

  • --nologo

    Suppress the startup banner and telemetry notice.

  • --banner

    Display the animated Aspire CLI welcome banner.

  • --wait-for-debugger

    Wait for a debugger to attach before running a command.

  • Get the API reference for a C# package:

    Aspire CLI
    aspire docs api get csharp/aspire.hosting
  • Get the API reference for a specific C# type:

    Aspire CLI
    aspire docs api get csharp/aspire.hosting/iresourcebuilder
  • Get the API reference for a TypeScript module symbol:

    Aspire CLI
    aspire docs api get typescript/aspire.hosting/addredis
  • Get API content in JSON format:

    Aspire CLI
    aspire docs api get csharp/aspire.hosting/iresourcebuilder --format Json