Registry

GetPackageExamples

Returns code examples aggregated across the package's resources and functions. Each example carries its 'typeToken' and 'kind'. Use 'q' for case-insensitive substring search on title and type token. Results are sorted by type token, then by example position within each type token. Use 'limit' (default 20, max 100) to cap returned examples; 'totalCount' reports the unfiltered count. Supports JSON or markdown via Accept. Returns 404 if the package version does not exist.

get/api/registry/packages/{source}/{publisher}/{name}/versions/{version}/examples

Request

  • Base URL: https://api.pulumi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pulumi.com/api/registry/packages/{source}/{publisher}/{name}/versions/{version}/examples
  • Auth: none declared

Path parameters

sourcestring required

The package source: 'pulumi', 'opentofu', or 'private'

publisherstring required

Organization that owns the package

namestring required

The package name

versionstring required

Semantic version string or 'latest'

Query parameters

lang'typescript' | 'python' | 'go' | 'csharp' | 'java' | 'yaml' | 'hcl' | 'all'

Snippet language. Defaults to 'go'. Pass 'all' to keep every chooser option.

limitinteger

Maximum examples to return. Default 20; clamped to 100.

qstring

URL-encoded case-insensitive substring filter on title and type token

Response

OK

languagestring required

Resolved snippet language.

navUrlstring required

Path to the package navigation endpoint.

totalCountinteger required

Total examples matching the query before 'limit' was applied.

versionstring required

Resolved semantic version.

Changes

No recorded changes to this operation across all 1 revision of this API.