Skip to main content

Bulk

Client-side bulk resource management. The bulk group lets you check out a set of resources locally, edit them as files, and sync changes back to the server — a Git-like workflow for API resources.

note

The bulk group is hidden from the root --help listing, but it is fully available. Run apimetrics bulk --help to see it.

apimetrics bulk [command]

Each subcommand has a short alias (shown below). Several accept -m/--match to operate on a subset of files using a match expression.

bulk init (alias i)

Initialize a new bulk checkout from a URL that returns a list of resources (each with a link and a version). Use -f/--rsh-filter to reshape the response and --url-template to build links from item IDs when no link is present.

apimetrics bulk init URL [-f filter] [--url-template tmpl]
FlagDescription
--url-template stringURL template to build links (e.g. from item IDs)
apimetrics bulk init api.example.com/users -f 'body.{url, version: last_login}'
apimetrics bulk init api.example.com/users -f 'body.{id, version: last_login}' --url-template='/users/{id}'

bulk list (alias ls)

List checked-out files.

apimetrics bulk list [--match expr] [-f filter]
FlagDescription
-m, --match stringExpression to match
apimetrics bulk list -m 'id contains abc'
apimetrics bulk list -m 'reviews where rating > 4'

bulk pull (alias pl)

Pull remote updates. Does not overwrite local changes.

apimetrics bulk pull

bulk status (alias st)

Show the local and remote added/changed/removed files.

apimetrics bulk status

bulk diff (alias di)

Show a diff of local or remote changed files.

apimetrics bulk diff [file... | --match expr | --remote]
FlagDescription
-m, --match stringExpression to match
--remoteShow remote diffs instead of local
apimetrics bulk diff
apimetrics bulk diff --remote

bulk reset (alias re)

Undo local changes to files.

apimetrics bulk reset [file... | --match expr]
FlagDescription
-m, --match stringExpression to match
apimetrics bulk reset -m 'id contains abc'

bulk push (alias ps)

Upload local changes to the remote server.

apimetrics bulk push

See also