{"id":34567800,"url":"https://github.com/arithran/apicmp","last_synced_at":"2026-05-24T20:32:23.357Z","repository":{"id":57596360,"uuid":"289999608","full_name":"arithran/apicmp","owner":"arithran","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-19T18:30:50.000Z","size":62,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-25T20:15:22.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arithran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-24T17:52:31.000Z","updated_at":"2021-12-13T16:52:12.000Z","dependencies_parsed_at":"2022-09-26T20:01:36.355Z","dependency_job_id":null,"html_url":"https://github.com/arithran/apicmp","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/arithran/apicmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arithran%2Fapicmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arithran%2Fapicmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arithran%2Fapicmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arithran%2Fapicmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arithran","download_url":"https://codeload.github.com/arithran/apicmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arithran%2Fapicmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33450397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T19:21:36.376Z","status":"ssl_error","status_checked_at":"2026-05-24T19:21:10.562Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T09:12:00.730Z","updated_at":"2026-05-24T20:32:23.319Z","avatar_url":"https://github.com/arithran.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apicmp\nA command-line utility that compares **Before** and **After** JSON responses of an API. This tool is ideal for regression testing between Production and QA environments or comparing before and after when rewriting a legacy system using newer technology.\n\n\n## Usage\n```bash\n$ apicmp help diff\nNAME:\n   apicmp diff - apicmp diff\n\nUSAGE:\n   apicmp diff [command options] [arguments...]\n\nOPTIONS:\n   --before value, -B value  https://api.example.com\n   --after value, -A value   https://qa-api.example.com\n   --file value, -F value    ~/Downloads/fixtures.csv\n   --header value, -H value  'Cache-Control: no-cache'\n   --ignore value, -I value  createdAt,modifiedAt\n   --rows value, -R value    1,7,12 (Rerun failed or specific tests from file)\n   --retry value             424,500 (HTTP status codes)\n   --match value             exact|superset (default: \"exact\")\n   --threads value           10 (default: \"4\")\n   --loglevel value          info (default: \"debug\")\n   --jq value                jq expression executed in compared data\n```\n\n## CSV File \n\n#### Why?\n- CSV files can be imported into any spreadsheet application and be easily edited, sorted \u0026 filtered.\n- Tools like Splunk \u0026 Kibana can easily export log data as CSV. This is useful for regression testing live data.\n  - For example: You can search last month's logs on Splunk with a sampling rate of 1:10000, export as CSV,  and regression test that sample data\n\n#### Format\n- The CSV file's first line must be a header column (ordering doesn't matter.).\n- The following columns have special meaning.\n   - `method`: This will be the HTTP Method and will default to `GET` if ommited.\n   - `path`: The value is required and is appended to the `--before` \u0026 `--after` options provided to the command. Double quotes maybe used if there are any spaces.\n   - `body`: If provided, the value is used for the request body\n   - All other fields will forwarded as headers.\n \nExample File:\n```\npath,X-Forwarded-For,X-Api-Key\n/users/1,192.168.1.1,abcd\n/users/2,192.168.1.2,abcd\n```\n\n## Examples\n```bash\n$ apicmp diff \\\n-B https://api.example.com \\\n-A https://qa-api.example.com \\\n-F ~/Documents/regression_test1.csv \\\n-H 'Authorization: Bearer \u003cMY_TOKEN\u003e' \\\n-H 'Cache-Control: no-cache' \\\n-I createdAt,modifiedAt \\\n--retry 500 \\\n--threads 10\n\n```\n\nOutput:\n\u003e Tip: 'Failed Rows' can be retried with the `--rows` cli option\n\n```bash\n$ Summary:\n  Total Tests : 273\n  Passed      : 263\n  Failed      : 10\n  Failed Rows : 33,51,102,107,109,152,170,173,239,260\n  Time        : 19.990216937s\n\nIssues Found:\n       Field       | Issues |          Rows\n-------------------+--------+-------------------------\n  _http.StatusCode |      6 | 33,102,107,109,239,260\n  field1           |      2 |                152,173\n  field2           |      2 |                 51,170\n\n```\n\n## Installation\n- Download the latest binary for your OS release from the [releases page](https://github.com/arithran/apicmp/releases)\n- Rename the file to `apicmp`\n- Make the file executable (`chmod +x apicmp`)\n- Checkout the help menu for usage instructions `apicmp help`\n- (Optional Step) Move it to a folder in your PATH variable. (`mv apicmp /usr/local/bin/`)\n\n\n\n## Features\n- [x] Print Test Summary\n- [x] Trace HTTP Requests and Responses (`--loglevel trace`)\n- [x] Multithreading (`--threads 20`)\n- [x] Ctrl-C in the middle of a long test run and Print Summary summary of tests that were run\n- [x] Support GET, DELETE methods\n- [x] Support POST, PUT methods\n\n\n## Contributing\nPull requests are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farithran%2Fapicmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farithran%2Fapicmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farithran%2Fapicmp/lists"}