Skip to main content
The CLI provides commands for interacting with your data sources in WireMock Cloud.

Listing Data Sources

You can list your data sources using:
This displays your data sources in a human-readable text format, showing up to 20 results on the first page.

Options

  • --limit=<int> - Set the maximum number of data sources to return (default: 20)
  • --page=<int> - Select which page of results to show (default: 1)
  • --query=<text> - Filter data sources using a search query
  • -o, --output=(text|json) - Choose between text or JSON output format (default: text)

Examples

List your data sources:
Search for data sources containing “customer”:
Get results in JSON format:

Pushing data to a data source

You can upload CSV data to an existing CSV data source using:
This replaces the contents of the data source with the CSV data provided. Only CSV data sources are supported.

Options

  • -f, --file=<path> - The filename to read the CSV data from. If omitted, the CLI reads from stdin (interactively, it will prompt you to enter CSV data and finish with Ctrl+D)

Examples

Push CSV data from a file:
Pipe CSV data from another command:

Pulling data from a data source

You can download the CSV data from an existing CSV data source using:
If no file is specified, the CSV data is printed to stdout. Only CSV data sources are supported.

Options

  • -f, --file=<path> - The filename to save the CSV data to. If omitted, the CSV data is printed to stdout

Examples

Pull data to a local file:
Pull data and print it to the console:

See also