@addosolutions/datto-api

1.0.0 • Public • Published

@addosolutions/datto-api

datto - JavaScript client for @addosolutions/datto-api Autotask Advanced Endpoint Management REST API This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0 (Build 23)
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @addosolutions/datto-api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @addosolutions/datto-api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var datto = require('@addosolutions/datto-api');


var api = new datto.AccountControllerApi()
var opts = {
  'page': 56, // {Number} page
  'max': 56 // {Number} max
};
api.getComponentsUsingGET(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to http://concord-api.centrastage.net/api

Class Method HTTP request Description
datto.AccountControllerApi getComponentsUsingGET GET /v2/account/components Fetches the components records of the authenticated user's account.
datto.AccountControllerApi getSitesUsingGET GET /v2/account/sites Fetches the site records of the authenticated user's account.
datto.AccountControllerApi getUserAccountClosedAlertsUsingGET GET /v2/account/alerts/resolved Fetches resolved alerts of the authenticated user's account.
datto.AccountControllerApi getUserAccountDevicesUsingGET GET /v2/account/devices Fetches the devices of the authenticated user's account.
datto.AccountControllerApi getUserAccountOpenAlertsUsingGET GET /v2/account/alerts/open Fetches open alerts of the authenticated user's account.
datto.AccountControllerApi getUserAccountUsingGET GET /v2/account Fetches the authenticated user's account data.
datto.AccountControllerApi getUsersUsingGET GET /v2/account/users Fetches the authentication users records of the authenticated user's account.
datto.AlertsControllerApi getAlertUsingGET GET /v2/alert/{alertUid} Fetches data of the alert identified by the given alert Uid.
datto.AlertsControllerApi muteAlertUsingPOST POST /v2/alert/{alertUid}/mute Mutes the alert identified by the given alert Uid.
datto.AlertsControllerApi resolveAlertUsingPOST POST /v2/alert/{alertUid}/resolve Resolves the alert identified by the given alert Uid.
datto.AlertsControllerApi unmuteAlertUsingPOST POST /v2/alert/{alertUid}/unmute Unmutes the alert identified by the given alert Uid.
datto.AuditControllerApi getDeviceAuditSoftwareUsingGET GET /v2/audit/device/{deviceUid}/software Fetches audited software of the generic device identified the given device Uid.
datto.AuditControllerApi getDeviceAuditUsingGET GET /v2/audit/device/{deviceUid} Fetches audit data of the generic device identified the given device Uid.
datto.AuditControllerApi getEsxiHostAuditUsingGET GET /v2/audit/esxihost/{deviceUid} Fetches audit data of the ESXi host identified the given device Uid.
datto.AuditControllerApi getPrinterAuditUsingGET GET /v2/audit/printer/{deviceUid} Fetches audit data of the printer identified the given device Uid.
datto.DeviceControllerApi createQuickJobUsingPUT PUT /v2/device/{deviceUid}/quickjob Creates a quick job on the device identified by the given device Uid.
datto.DeviceControllerApi getByIdUsingGET GET /v2/device/id/{deviceId} Fetches data of the device identified by the given device Id.
datto.DeviceControllerApi getByUidUsingGET GET /v2/device/{deviceUid} Fetches data of the device identified by the given device Uid.
datto.DeviceControllerApi getDeviceOpenAlertsUsingGET GET /v2/device/{deviceUid}/alerts/open Fetches the open alerts of the device identified by the given device Uid.
datto.DeviceControllerApi getDeviceResolvedAlertsUsingGET GET /v2/device/{deviceUid}/alerts/resolved Fetches the resolved alerts of the device identified by the given device Uid.
datto.DeviceControllerApi moveDeviceUsingPUT PUT /v2/device/{deviceUid}/site/{siteUid} Moves a device from one site to another site.
datto.DeviceControllerApi setUdfFieldsUsingPOST POST /v2/device/{deviceUid}/udf Sets the user defined fields of a device identified by the given device Uid.
datto.DeviceControllerApi setWarrantyDataUsingPOST POST /v2/device/{deviceUid}/warranty Sets the warranty of a device identified by the given device Uid.
datto.JobControllerApi getJobComponentsUsingGET GET /v2/job/{jobUid}/components Fetches components of the job identified by the given job Uid.
datto.JobControllerApi getUsingGET GET /v2/job/{jobUid} Fetches data of the job identified by the given job Uid.
datto.SitesControllerApi createUsingPUT PUT /v2/site Creates a new site in the authenticated user's account.
datto.SitesControllerApi deleteProxyUsingDELETE DELETE /v2/site/{siteUid}/settings/proxy Deletes site proxy settings for the site identified by the given site Uid.
datto.SitesControllerApi getSiteDevicesUsingGET GET /v2/site/{siteUid}/devices Fetches the devices records of the site identified by the given site Uid.
datto.SitesControllerApi getSiteOpenAlertsUsingGET GET /v2/site/{siteUid}/alerts/open Fetches the open alerts of the site identified by the given site Uid.
datto.SitesControllerApi getSiteResolvedAlertsUsingGET GET /v2/site/{siteUid}/alerts/resolved Fetches the resolved alerts of the site identified by the given site Uid.
datto.SitesControllerApi getSiteSettingsUsingGET GET /v2/site/{siteUid}/settings Fetches settings of the site identified by the given site Uid.
datto.SitesControllerApi getSiteUsingGET GET /v2/site/{siteUid} Fetches data of the site (including total number of devices) identified by the given site Uid.
datto.SitesControllerApi updateProxyUsingPOST POST /v2/site/{siteUid}/settings/proxy Creates/updates the proxy settings for the site identified by the given site Uid.
datto.SitesControllerApi updateUsingPOST POST /v2/site/{siteUid} Updates the site identified by the given site Uid.
datto.SystemControllerApi getPaginationConfigurationsUsingGET GET /v2/system/pagination Fetches the pagination configurations.
datto.SystemControllerApi getStatusUsingGET GET /v2/system/status Fetches the system status (start date, status and version).
datto.SystemControllerApi getUsingGET1 GET /v2/system/request_rate Fetches the request rate status for the authenticated user's account.
datto.UserControllerApi resetApiKeysUsingPOST POST /v2/user/resetApiKeys Resets the authenticated user's API access and secret keys.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Dependencies (2)

Dev Dependencies (22)

Package Sidebar

Install

npm i @addosolutions/datto-api

Weekly Downloads

0

Version

1.0.0

License

©Autotask Corporation. All rights reserved.

Unpacked Size

399 kB

Total Files

80

Last publish

Collaborators

  • nickartman
  • nickartman-addosolutions