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.
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]
| Flag | Description |
|---|---|
--url-template string | URL 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]
| Flag | Description |
|---|---|
-m, --match string | Expression 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]
| Flag | Description |
|---|---|
-m, --match string | Expression to match |
--remote | Show 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]
| Flag | Description |
|---|---|
-m, --match string | Expression 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
- Global flags —
-f/--rsh-filterand the rest of the--rsh-*family - CLI overview