Run the REST API local installation example
With everything in place, you can now issue the command within a Command Prompt to run the example.
In the Command Prompt window, type node rest-client-example.js and press Enter.
The scenario is loaded, executed, and closed. The output displayed in the Command Prompt window will resemble:
Logging in... Logged in Getting current user info... Current user admin Getting all apps... Creating scenario... Created scenario [ '954c473a-08c5-45a4-aea6-6b3c8147f588', 'Auto scenario 1500454451981', 'Campaign Conversion' ] Setting NC parameter to 1500... Requesting scenario execution... Executing... Job still executing, currently EXECUTING Job still executing, currently COMPLETING Job completed 404 Execution completed Getting scenario to verify it completed successfully... Scenario executed successfully OK Setting Budget to 1200... Requesting scenario execution... Executing... Job still executing, currently EXECUTING Job still executing, currently EXECUTING Job still executing, currently COMPLETING Job completed 404 Execution completed Fetching profit... Scenario executed successfully OK Profit is 435521.5842564791 Logging out... Logged out