Sample scripts for Cisco's NxOS REST API (NXAPI) - object model version
Those scripts are meant to be executed off the box (on a Linux machine, PC, MAC, etc.) and assume you have enabled feature nxapi on the NxOS target device
The scripts also assume you have NxOS 6.2 or higher (Nexus 9000) as they make object-model requests, not CLi/JSON-RPC requests.