Coder Social home page Coder Social logo

api-samples's Introduction

api-samples

Sample code using the NetCloud Manager API for key use cases

How To Try

Setup a python virtual environment

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

Setup your keys in your environment

You need to create API keys in NCM to use these scripts so they can access your NCM account. To make them available to the script, set them in the environment, for example:

export X_CP_API_ID=b89a24a3
export X_CP_API_KEY=4b1d77fe271241b1cfafab993ef0891d
export X_ECM_API_ID=c71b3e68-33f5-4e69-9853-14989700f204
export X_ECM_API_KEY=f1ca6cd41f326c00e23322795c063068274caa30

(These are not valid keys, get your own from the NCM site!)

Running the examples

Remember to enter your virtual environment again if you are in a new terminal and to export your keys (see above).

. .venv/bin/activate

Enter the examples directory:

cd examples

Run the example scripts. They will provide usage information if you use the --help option. For instance:

./location_tracking.py --help

Specific examples are described below.

Getting GPS data for a router for the last day

Getting GPS data for all routers in your account for the last day

api-samples's People

Contributors

amickel avatar ctrlaltelite2012 avatar gmcnutt avatar hbreauxv avatar jmbelt avatar mattmessinger avatar mjourdenais-cradlepoint avatar nathanwiens avatar phate999 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.