This project is a simple wrapper to help sending JSON payloads using Coveo Cloud V2 PushAPI.
The code in this project uses the Push API from the Coveo Cloud V2 Platform. You can use the following resource for more information and get started:
- Push API documentation: https://docs.coveo.com/en/68/cloud-v2-developers/push-api
- Branch or Fork
- Pull Request
- And... that's pretty much it!
git clonethis project.
npm installto get the dependencies (request, fs).
Install it with NPM:
npm i coveo-pushapi-cli --global
The first time you run in one folder, it will help you to set up your config
.pushapi-config.json by asking about your
sourceId and your
Note For a source in a Coveo Cloud HIPAA org, you need to manually add the following line to the
Push one JSON payload file:
file.jsonis a the path to a Push API payload (JSON) file. Don't forget to set
DocumentIdin the payloads.
Push one JSON payload file, but delete source item older than 24 hours:
pushapi file.json -d 24
to use typically when you create/update all valid items, you want to delete all othere items that are older.
Push all JSON payload files from one folder:
folderis teh path to a folder containing multiple Push API JSON payload files.
What does it do?
The helper does a minimal validation on the payload, then executes these API calls:
- Change source state to REBUILD
- Get a File container
- Upload the payload to the File container
- Sends the batch command to process the File container
- Change the source state back to IDLE
Note You can add this attribute
"debug": truein your
.pushapi-config.jsonto see these requests and their response code.
- Node modules:
- Jérôme Devost (https://github.com/jdevost)