appdynamics-analytics-events-api v0.1.0
AppDynamics Analytics Events API
A javascript wrapper for the AppDynamics Analytics Events API.
Introduction
This wrapper allows you to create, retrieve or delete schemas in the AppDynamics Analytics Events Service, as well as publishing and querying events in those schemas.
Usage
Install this package with npm and import the connectAnalyticsAPI
function:
const { connectAnalyticsAPI } = require('./index.js')
With this function you can prepare a connection to the AppDynamics Analytics Events Service, e.g.
const api = connectAnalyticsAPI('https://analytics.api.appdynamics.com
', 'example', 'dfe8afac-b1ef-4ecd-bde1-c9bdce052e85');
With this api
object you can retrieve or create schemas:
api.retrieveSchema('example_schema').then(schema => {
...
}).catch(error => {
...
})
/* or */
api.createSchema('example_schema', { field1: 'string', field2: 'integer' }).then(schema => {
...
}).catch(error => {
...
})
For convenience there is a retrieveOrCreateSchema
(short: with
) method, that checks if a schema exists and creates it if not:
api.with('example_schema', { field1: 'string', field2: 'integer' }).then(schema => {
...
}).catch(error => {
...
})
License
Copyright 2020 Severin Neumann
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5 years ago