Add a pack

Imports a pack into the city by source (a remote git URL or registry ref), resolving + installing it so its templates compose into the city.

post/v0/city/{cityName}/packs

Request

  • The document declares no server URL.
  • Auth: none declared. Required headers: X-GC-Request

Path parameters

cityNamestring required

City name.

Headers

X-GC-Requeststring required

Anti-CSRF header required on mutation requests. Any non-empty value is accepted; the header's presence is what the server checks.

Idempotency-Keystring

Idempotency key for safe retries.

Request body

namestring

Optional local binding name override; derived from the source when omitted.

sourcestring required

Pack source: a remote git URL or registry ref (a sub-path of a repo is allowed).

versionstring

Optional semver constraint for a git-backed pack.

Example request

{
  "source": "https://github.com/org/repo/tree/main/packs/review",
  "version": "^1.2.0"
}

Response

Created

git_backedboolean required

Whether the resolved source is git-backed (has a lock entry).

namestring required

The local binding name written to [imports.<name>].

sourcestring required

The canonical source string written to the manifest.

versionstring

The version constraint written, if any.

Changes

No recorded changes to this operation across all 50 revisions of this API.