note: there is no need to install the mp-cli manually and configure, this abstracts all of that
- Install dependencies
npm i
- Copy
.env.template
to.env
and populate it with your mParticle Data Plan API credentials and dataplan details (these can be overridded in http request) - Start in dev using
npm run debug
or run in docker container,npm run build && npm start
- The server runs at http://localhost:3000 by default (if using docker, modify port-mapping to expose an alternate port).
- Point an http client (ie Postman) at your server
- Optionally, set http request headers
MP-DataplanVersion
&MP-DataplanId
to override env variables - Send an mParticle event batch to your validation server!
Running integration tests will simulate sending data to mParticle's server will can catch and flag malformed events locally without having to provision additional developer mP accounts, educate developers on mP dataplans & dashboard, and manually configure and integrate mP-CLI tools. Simply mock the mParticle client's dispatch method (upload_events <Py>
, uploadEvents <node>
, UploadEvents
, etc. depending on your environment) to send requests to the local validation server. To test this out, run the docker validation server and then npm test
.
![]() |
This shows basic usage: first a valid request followed by a request that doesn't match the mParticle data plan schema |
![]() |
This shows the ability to specify the dataplan and version in the request headers |