1.0.0 • Published 4 years ago

datto-api v1.0.0

Weekly downloads
-
License
©Autotask Corpora...
Repository
-
Last release
4 years ago

datto-api

datto - JavaScript client for 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 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 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('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

ClassMethodHTTP requestDescription
datto.AccountControllerApigetComponentsUsingGETGET /v2/account/componentsFetches the components records of the authenticated user's account.
datto.AccountControllerApigetSitesUsingGETGET /v2/account/sitesFetches the site records of the authenticated user's account.
datto.AccountControllerApigetUserAccountClosedAlertsUsingGETGET /v2/account/alerts/resolvedFetches resolved alerts of the authenticated user's account.
datto.AccountControllerApigetUserAccountDevicesUsingGETGET /v2/account/devicesFetches the devices of the authenticated user's account.
datto.AccountControllerApigetUserAccountOpenAlertsUsingGETGET /v2/account/alerts/openFetches open alerts of the authenticated user's account.
datto.AccountControllerApigetUserAccountUsingGETGET /v2/accountFetches the authenticated user's account data.
datto.AccountControllerApigetUsersUsingGETGET /v2/account/usersFetches the authentication users records of the authenticated user's account.
datto.AlertsControllerApigetAlertUsingGETGET /v2/alert/{alertUid}Fetches data of the alert identified by the given alert Uid.
datto.AlertsControllerApimuteAlertUsingPOSTPOST /v2/alert/{alertUid}/muteMutes the alert identified by the given alert Uid.
datto.AlertsControllerApiresolveAlertUsingPOSTPOST /v2/alert/{alertUid}/resolveResolves the alert identified by the given alert Uid.
datto.AlertsControllerApiunmuteAlertUsingPOSTPOST /v2/alert/{alertUid}/unmuteUnmutes the alert identified by the given alert Uid.
datto.AuditControllerApigetDeviceAuditSoftwareUsingGETGET /v2/audit/device/{deviceUid}/softwareFetches audited software of the generic device identified the given device Uid.
datto.AuditControllerApigetDeviceAuditUsingGETGET /v2/audit/device/{deviceUid}Fetches audit data of the generic device identified the given device Uid.
datto.AuditControllerApigetEsxiHostAuditUsingGETGET /v2/audit/esxihost/{deviceUid}Fetches audit data of the ESXi host identified the given device Uid.
datto.AuditControllerApigetPrinterAuditUsingGETGET /v2/audit/printer/{deviceUid}Fetches audit data of the printer identified the given device Uid.
datto.DeviceControllerApicreateQuickJobUsingPUTPUT /v2/device/{deviceUid}/quickjobCreates a quick job on the device identified by the given device Uid.
datto.DeviceControllerApigetByIdUsingGETGET /v2/device/id/{deviceId}Fetches data of the device identified by the given device Id.
datto.DeviceControllerApigetByUidUsingGETGET /v2/device/{deviceUid}Fetches data of the device identified by the given device Uid.
datto.DeviceControllerApigetDeviceOpenAlertsUsingGETGET /v2/device/{deviceUid}/alerts/openFetches the open alerts of the device identified by the given device Uid.
datto.DeviceControllerApigetDeviceResolvedAlertsUsingGETGET /v2/device/{deviceUid}/alerts/resolvedFetches the resolved alerts of the device identified by the given device Uid.
datto.DeviceControllerApimoveDeviceUsingPUTPUT /v2/device/{deviceUid}/site/{siteUid}Moves a device from one site to another site.
datto.DeviceControllerApisetUdfFieldsUsingPOSTPOST /v2/device/{deviceUid}/udfSets the user defined fields of a device identified by the given device Uid.
datto.DeviceControllerApisetWarrantyDataUsingPOSTPOST /v2/device/{deviceUid}/warrantySets the warranty of a device identified by the given device Uid.
datto.JobControllerApigetJobComponentsUsingGETGET /v2/job/{jobUid}/componentsFetches components of the job identified by the given job Uid.
datto.JobControllerApigetUsingGETGET /v2/job/{jobUid}Fetches data of the job identified by the given job Uid.
datto.SitesControllerApicreateUsingPUTPUT /v2/siteCreates a new site in the authenticated user's account.
datto.SitesControllerApideleteProxyUsingDELETEDELETE /v2/site/{siteUid}/settings/proxyDeletes site proxy settings for the site identified by the given site Uid.
datto.SitesControllerApigetSiteDevicesUsingGETGET /v2/site/{siteUid}/devicesFetches the devices records of the site identified by the given site Uid.
datto.SitesControllerApigetSiteOpenAlertsUsingGETGET /v2/site/{siteUid}/alerts/openFetches the open alerts of the site identified by the given site Uid.
datto.SitesControllerApigetSiteResolvedAlertsUsingGETGET /v2/site/{siteUid}/alerts/resolvedFetches the resolved alerts of the site identified by the given site Uid.
datto.SitesControllerApigetSiteSettingsUsingGETGET /v2/site/{siteUid}/settingsFetches settings of the site identified by the given site Uid.
datto.SitesControllerApigetSiteUsingGETGET /v2/site/{siteUid}Fetches data of the site (including total number of devices) identified by the given site Uid.
datto.SitesControllerApiupdateProxyUsingPOSTPOST /v2/site/{siteUid}/settings/proxyCreates/updates the proxy settings for the site identified by the given site Uid.
datto.SitesControllerApiupdateUsingPOSTPOST /v2/site/{siteUid}Updates the site identified by the given site Uid.
datto.SystemControllerApigetPaginationConfigurationsUsingGETGET /v2/system/paginationFetches the pagination configurations.
datto.SystemControllerApigetStatusUsingGETGET /v2/system/statusFetches the system status (start date, status and version).
datto.SystemControllerApigetUsingGET1GET /v2/system/request_rateFetches the request rate status for the authenticated user's account.
datto.UserControllerApiresetApiKeysUsingPOSTPOST /v2/user/resetApiKeysResets the authenticated user's API access and secret keys.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.0.0

4 years ago