locally apim

Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

locally apim

This page is part of the CLI Reference and is generated from the CLI's own help output, so it matches what locally apim --help prints.

For more information see API Management Emulator.

locally apim

Inspect and call API Management APIs.

Usage

locally apim [flags]
  locally apim [command]

Flags

-h, --help[=true|false]   help for apim

Subcommands

locally apim api

Inspect a service's APIs.

Usage

locally apim api [flags]
  locally apim api [command]

Flags

-h, --help[=true|false]   help for api

Subcommands

locally apim api list

List the APIs for a service.

Usage

locally apim api list <service> [flags]

Flags

-h, --help[=true|false]   help for list
      --json[=true|false]   Output as JSON

locally apim api show

Show an API and its operations.

Usage

locally apim api show <service> <apiId> [flags]

Flags

-h, --help[=true|false]   help for show
      --json[=true|false]   Output as JSON

locally apim curl

Call a service's gateway (auto-injects an active subscription key).

Usage

locally apim curl <service> <METHOD> <path> [flags]

Flags

-d, --data string            Request body (inline, @file, or - for stdin)
  -H, --header stringArray     Add a request header (repeatable)
  -h, --help[=true|false]      help for curl
      --key string             Send this literal subscription key
      --no-key[=true|false]    Send no subscription key
      --subscription string    Use this subscription's primary key
      --trace[=true|false]     Send X-Apim-Trace: 1 and point at the request log
  -v, --verbose[=true|false]   Print request/response metadata to stderr

locally apim export

Export an API in the specified format (json, yaml, swagger, or tsp).

Export an API Management API definition to stdout or a file.

Supported formats:
  json     OpenAPI 3 document in JSON (default)
  yaml     OpenAPI 3 document in YAML
  swagger  OpenAPI 2.0 (Swagger) document in JSON
  tsp      TypeSpec (.tsp) source

Usage

locally apim export <service> <apiId> [flags]

Flags

--format string       output format: json, yaml, swagger, or tsp (default "json")
  -h, --help[=true|false]   help for export
  -o, --output string       Write output to file (default is stdout)

locally apim import

Import an OpenAPI/Swagger spec into an APIM service.

Usage

locally apim import <service> <spec-file> [flags]

Flags

-h, --help[=true|false]   help for import
  -y, --yes[=true|false]    Skip confirmation prompt

locally apim product

Inspect a service's products.

Usage

locally apim product [flags]
  locally apim product [command]

Flags

-h, --help[=true|false]   help for product

Subcommands

locally apim product apis

List the APIs linked to a product.

Usage

locally apim product apis <service> <productId> [flags]

Flags

-h, --help[=true|false]   help for apis
      --json[=true|false]   Output as JSON

locally apim product list

List the products for a service.

Usage

locally apim product list <service> [flags]

Flags

-h, --help[=true|false]   help for list
      --json[=true|false]   Output as JSON

locally apim reset

Reset a service's emulator-local state.

Usage

locally apim reset [flags]
  locally apim reset [command]

Flags

-h, --help[=true|false]   help for reset

Subcommands

locally apim reset cache

Reset the service's policy cache.

Usage

locally apim reset cache <service> [flags]

Flags

-h, --help[=true|false]   help for cache

locally apim reset rate-limits

Reset the service's rate-limit buckets.

Usage

locally apim reset rate-limits <service> [flags]

Flags

-h, --help[=true|false]   help for rate-limits

locally apim service

Inspect API Management services.

Usage

locally apim service [flags]
  locally apim service [command]

Flags

-h, --help[=true|false]   help for service

Subcommands

locally apim service list

List API Management services in the current subscription.

Usage

locally apim service list [flags]

Flags

-h, --help[=true|false]          help for list
      --json[=true|false]          Output as JSON
      --subscription-uuid string   Azure subscription UUID (defaults to the configured default)

locally apim service portal

Open the service's developer portal in your browser.

Usage

locally apim service portal <name> [flags]

Flags

-h, --help[=true|false]   help for portal

locally apim service show

Show an API Management service's detail and emulator URLs.

Usage

locally apim service show <name> [flags]

Flags

-h, --help[=true|false]   help for show
      --json[=true|false]   Output as JSON

locally apim subscription

Inspect a service's subscriptions.

Usage

locally apim subscription [flags]
  locally apim subscription [command]

Flags

-h, --help[=true|false]   help for subscription

Subcommands

locally apim subscription key

Print a subscription's primary key (use --secondary for the other).

Usage

locally apim subscription key <service> <subscriptionId> [flags]

Flags

-h, --help[=true|false]        help for key
      --secondary[=true|false]   Print the secondary key

locally apim subscription list

List the subscriptions for a service.

Usage

locally apim subscription list <service> [flags]

Flags

-h, --help[=true|false]   help for list
      --json[=true|false]   Output as JSON
Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

A local cloud for you and your AI agents.

Your Azure infrastructure, running on your machine. Deploy in seconds, break things freely, and ship to Azure when you're ready.