NS1 JS API
This is a high level JS client for NS1.com's REST API. Works as a Node.js module, tested on Node v 5+. Requires an NS1 account w/ an API key.
Using Gitflow so most up-to-date version will be in the develop branch.
Check out our API documentation at http://ns1.github.io/ns1-js
All method signatures reflect endpoints from the NS1 REST API, documentation available at https://ns1.com/api
$ npm install -s ns1
TLDR Example Usage
All methods return A+ style promises.
var NS1 =NS1NS1ZoneNS1ZoneNS1Zonezone: 'yourzone.com'
All objects (with the exception of
RestResource) follow the resource concept and have static
create methods for retrieving and creating objects of those types, respectively. For some objects,
find can be passed with no arguments to get all objects of that data type, e.g.
Once you've retrieved an object from the server, you can use
update and pass an object of values you'd like to update, or you can adjust the variables on the object's
attributes object, and then call
All method signatures follow the NS1 API, so whatever is passed to "find" a record via GET requests listed on the api is the required argument for a
find method call.
var NS1 =NS1// find a record, records require zone + type info in stringNS1Record// adding an email to a notification listNS1NotificationList// manually send a request to the API'get' '/zones/zone.com/www.zone.com/A'