{"_id":"@azure/applicationinsights-query","_rev":"10-b14a261acdabe76ef5a31cf5cbeff79a","name":"@azure/applicationinsights-query","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"@azure/applicationinsights-query","version":"0.1.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/applicationinsights-query@0.1.0","maintainers":[{"name":"amarzavery","email":"amarzavery@gmail.com"},{"name":"billytrend","email":"billy.trend@gmail.com"},{"name":"sergeyshandar","email":"sergey.shandar@gmail.com"},{"name":"veronicagg","email":"bggve@outlook.com"},{"name":"vladbarosan","email":"vlad.barosan@gmail.com"}],"homepage":"https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/applicationinsights-query","bugs":{"url":"https://github.com/azure/azure-sdk-for-js/issues"},"dist":{"shasum":"9f6e693f7c1ed3681bc7a7cf2d4961ceca1723a0","tarball":"https://registry.npmjs.org/@azure/applicationinsights-query/-/applicationinsights-query-0.1.0.tgz","fileCount":69,"integrity":"sha512-sGefh/XfDm0NM3EufQI12cV26BHFpnyKS6bHUyK0Jywss+6X9rubYyL9gEgFMZKMOOLJa0K4IyQ0XD/UVlK7GQ==","signatures":[{"sig":"MEQCIDNDO5bAZryntSt5YrMKy5shRmqiIxIYlJTFa3nU30WaAiBKn4bUCG7kj6MWZrCQwFWavYj4OV3ELj+QQJl8ZUYGiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":608870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7FsZCRA9TVsSAnZWagAAaCMP/2IMw32G5ZU3kZxjdZDw\nHXcIsAIvcsMMz158DH+7YNdKIWQX01teW1Q1xRoFsQVI2HDh1NTJISkt0KqN\nv4nWbH+1u9U6QtG6y8KXBNsfAUWRHE8r4DJ6EKtO052KKlQDR2rUJnUJnGet\nyW38vgwip3jSYtqq1mB0N7zmUt/sFnjr7e6rb0XD8pLSolms3CoFEkz7DB/k\nQn6oAl5FqCF5j0OQt95pyU/n2+duwvfZ1qMQbFwQ7iNIoTfs3zjd2GJdfHDR\ng7zTwaJyJQa7dFYTsIRrTLnnk1U1593qEeWAoEydxz2Ibor95sN1J17LQGwy\n0K1kAQ++KW5JTAKgaSBd6sdWXuVMw+D2f3msH5jknvao+rZpSAva/GAJUvTM\nP8fJnJz1weRKjqB+Hw2F8gu0qbnboHleEv2hxPre1dkgDAqWEFCkLoss1Euj\nGb+lBLvpJYeYNJg5I3R6MMFkp4CLMLaAhk5ryMcNJWQFMbzjRwehMmRCsu5e\nMXKaA+j67U5VrbdhYAv5lFpozMstwpIqsj2dSzxQdVUg1mjLkz8qUKqkoOor\n937Ug97iZz7Pb6D6071PPhIQxxgL2u1HHm1jo0kgfu1K4jD6ao2M7cy193tc\n1btTg3exvsDUMedOq9I0EPdl59DX6jetL2k9pgY5UyZpoxnCZzB+H5wLDJ1h\nDTgU\r\n=EUGF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/applicationinsights-query.js","_from":"file:..\\_public.Azure.azure-sdk-for-js\\drop\\azure-applicationinsights-query-0.1.0.tgz","types":"./esm/applicationInsightsDataClient.d.ts","module":"./esm/applicationInsightsDataClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/applicationinsights-query.js.map'\" -o ./dist/applicationinsights-query.min.js ./dist/applicationinsights-query.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"sergeyshandar","email":"sergey.shandar@gmail.com"},"_resolved":"","_integrity":"","deprecated":"This package is deprecated in favor of @azure/monitor-query which works both on node.js and browsers","repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.4.1","description":"ApplicationInsightsDataClient Library with typescript type definitions for node.js and browser.","directories":{},"sideEffects":false,"_nodeVersion":"10.13.0","dependencies":{"tslib":"^1.9.3","@azure/ms-rest-js":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^0.66.2","uglify-js":"^3.4.9","typescript":"^3.1.1","rollup-plugin-node-resolve":"^3.4.0"},"_npmOperationalInternal":{"tmp":"tmp/applicationinsights-query_0.1.0_1542216473019_0.9633706521847456","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@azure/applicationinsights-query","version":"1.1.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/applicationinsights-query@1.1.0","maintainers":[{"name":"amarzavery","email":"amarzavery@gmail.com"},{"name":"azure-sdk","email":"azuresdkengsysadmins@microsoft.com"},{"name":"billytrend","email":"billy.trend@gmail.com"},{"name":"sergeyshandar","email":"sergey.shandar@gmail.com"},{"name":"veronicagg","email":"bggve@outlook.com"},{"name":"vladbarosan","email":"vlad.barosan@gmail.com"}],"homepage":"https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/applicationinsights-query","bugs":{"url":"https://github.com/azure/azure-sdk-for-js/issues"},"dist":{"shasum":"eedc62b243484d73f35bedd5f25c902b31142b5f","tarball":"https://registry.npmjs.org/@azure/applicationinsights-query/-/applicationinsights-query-1.1.0.tgz","fileCount":69,"integrity":"sha512-3AuO1XdctCU4xjrA/Ze/3mLxFzLcz9ntCn5FBgC/EPoiHleI8LX2KDp7Fq5+x62dnnxxnnxfb6TmxLBgrEXaPg==","signatures":[{"sig":"MEYCIQD2tcOI+ZLjvDdpawqrQyyqgaibZ+ie/S9U3E5U8SzL0gIhANpmCb4d1QsOa0IioinEUecPWCjeZLTg38kiRISUZgHw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":608893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUjbZCRA9TVsSAnZWagAAlcsP/01DrkfkSZRTqFgSS6ue\ntALu41bx2q7Eygbve3LbDoHZZNWTIgTMtMZSMWrwBUz1bVLjiddB57DjPlse\nilC1N/pcat+lQFWZdoTAAtujHzfIZMFa2txGoNKf6u6cp/jP+Ij60BcD1xcl\nNRwaGWKNataiGtkPgbvGR+Uv4zqU1wMeNvJEsWEapsDHY2tKx8Pj5ykXx+Ov\nzif8SGrfu7g86k0DPBVfBi5WRxsA/B6E/4xCG/KMGgwjxG3sKMC6DicMgypo\nfO9mRkDvQxyP+RzZkPVZQaoE/wKrfa+Xm4Swxz7EO8Pfh10PT4PSA36kdCXn\nvUF/U2nBnemalALfwOLReKpguX7KZL39QB0ak04kwEuDQ4eKGlzuy72QgYYm\nCZ//UDqbrMiTLBgMYfDPd5o2E1r3ycgqwhkCyBJ6eKdhJh0m7u80/ms6DxiR\nPYPhsTyvMKLHfwDWFcGJl9Q2/4kqRICxkpTHNzx8xgsByd36QpgZUkW5eAvj\n04Pi0rNt3KSg6+bMROWo6cL8Abjf6ZvTIQyS4lFgiecsiVKCbsgJKayjvng9\n3TFehinGlEJzXzQ8hoFV4jNL1xtiYirCwxtbyd8IprZxXLYPUKZGGHa1i1Ei\nW3jLtugnckOhDi48Qt3yj3RCoJVBzzrGZQM7xxkK4K7UBijKMUiz7uT+sCEJ\nMLqN\r\n=edBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/applicationinsights-query.js","_from":"file:..\\_public.Azure.azure-sdk-for-js\\drop\\azure-applicationinsights-query-1.1.0.tgz","types":"./esm/applicationInsightsDataClient.d.ts","module":"./esm/applicationInsightsDataClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/applicationinsights-query.js.map'\" -o ./dist/applicationinsights-query.min.js ./dist/applicationinsights-query.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azuresdkengsysadmins@microsoft.com"},"_resolved":"","_integrity":"","deprecated":"This package is deprecated in favor of @azure/monitor-query which works both on node.js and browsers","repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.4.1","authPublish":true,"description":"ApplicationInsightsDataClient Library with typescript type definitions for node.js and browser.","directories":{},"sideEffects":false,"_nodeVersion":"10.15.1","dependencies":{"tslib":"^1.9.3","@azure/ms-rest-js":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^0.66.2","uglify-js":"^3.4.9","typescript":"^3.1.1","rollup-plugin-node-resolve":"^3.4.0"},"_npmOperationalInternal":{"tmp":"tmp/applicationinsights-query_1.1.0_1548891864806_0.49982767316610555","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-11-14T17:27:52.858Z","modified":"2026-03-19T20:31:03.356Z","0.1.0":"2018-11-14T17:27:53.102Z","1.1.0":"2019-01-30T23:44:24.952Z"},"bugs":{"url":"https://github.com/azure/azure-sdk-for-js/issues"},"author":{"name":"Microsoft Corporation"},"license":"MIT","homepage":"https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/applicationinsights-query","keywords":["node","azure","typescript","browser","isomorphic"],"repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"description":"ApplicationInsightsDataClient Library with typescript type definitions for node.js and browser.","maintainers":[{"email":"amarzavery@gmail.com","name":"amarzavery"},{"email":"vlad.barosan@gmail.com","name":"vladbarosan"},{"email":"bggve@outlook.com","name":"veronicagg"},{"email":"azure-sdk-npmjs@microsoft.com","name":"azure-sdk"},{"email":"npmjs@microsoft.com","name":"microsoft1es"},{"email":"microsoft-oss-publishing@microsoft.com","name":"microsoft-oss-releases"}],"readme":"## An isomorphic javascript sdk for - ApplicationInsightsDataClient\r\n\r\nThis package contains an isomorphic SDK for ApplicationInsightsDataClient.\r\n\r\n### Currently supported environments\r\n\r\n- Node.js version 6.x.x or higher\r\n- Browser JavaScript\r\n\r\n### How to Install\r\n\r\n```\r\nnpm install @azure/applicationinsights-query\r\n```\r\n\r\n### How to use\r\n\r\n#### nodejs - Authentication, client creation and get metrics as an example written in TypeScript.\r\n\r\n##### Install @azure/ms-rest-nodeauth\r\n\r\n```\r\nnpm install @azure/ms-rest-nodeauth\r\n```\r\n\r\n##### Sample code\r\n\r\n```ts\r\nimport * as msRest from \"@azure/ms-rest-js\";\r\nimport * as msRestNodeAuth from \"@azure/ms-rest-nodeauth\";\r\nimport { ApplicationInsightsDataClient, ApplicationInsightsDataModels, ApplicationInsightsDataMappers } from \"@azure/applicationinsights-query\";\r\nconst subscriptionId = process.env[\"AZURE_SUBSCRIPTION_ID\"];\r\n\r\nmsRestNodeAuth.interactiveLogin().then((creds) => {\r\n  const client = new ApplicationInsightsDataClient(creds, subscriptionId);\r\n  const appId = \"testappId\";\r\n  const metricId = \"requests/count\";\r\n  const timespan = \"testtimespan\";\r\n  const interval = \"P1Y2M3DT4H5M6S\";\r\n  const aggregation = [\"min\"];\r\n  const segment = [\"applicationBuild\"];\r\n  const top = 1;\r\n  const orderby = \"testorderby\";\r\n  const filter = \"testfilter\";\r\n  client.metrics.get(appId, metricId, timespan, interval, aggregation, segment, top, orderby, filter).then((result) => {\r\n    console.log(\"The result is:\");\r\n    console.log(result);\r\n  });\r\n}).catch((err) => {\r\n  console.error(err);\r\n});\r\n```\r\n\r\n#### browser - Authentication, client creation and get metrics as an example written in JavaScript.\r\n\r\n##### Install @azure/ms-rest-browserauth\r\n\r\n```\r\nnpm install @azure/ms-rest-browserauth\r\n```\r\n\r\n##### Sample code\r\n\r\nSee https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.\r\n\r\n- index.html\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n  <head>\r\n    <title>@azure/applicationinsights-query sample</title>\r\n    <script src=\"node_modules/@azure/ms-rest-js/dist/msRest.browser.js\"></script>\r\n    <script src=\"node_modules/@azure/ms-rest-browserauth/dist/msAuth.js\"></script>\r\n    <script src=\"node_modules/@azure/applicationinsights-query/dist/applicationinsights-query.js\"></script>\r\n    <script type=\"text/javascript\">\r\n      const subscriptionId = \"<Subscription_Id>\";\r\n      const authManager = new msAuth.AuthManager({\r\n        clientId: \"<client id for your Azure AD app>\",\r\n        tenant: \"<optional tenant for your organization>\"\r\n      });\r\n      authManager.finalizeLogin().then((res) => {\r\n        if (!res.isLoggedIn) {\r\n          // may cause redirects\r\n          authManager.login();\r\n        }\r\n        const client = new Azure.ApplicationinsightsQuery.ApplicationInsightsDataClient(res.creds, subscriptionId);\r\n        const appId = \"testappId\";\r\n        const metricId = \"requests/count\";\r\n        const timespan = \"testtimespan\";\r\n        const interval = \"P1Y2M3DT4H5M6S\";\r\n        const aggregation = [\"min\"];\r\n        const segment = [\"applicationBuild\"];\r\n        const top = 1;\r\n        const orderby = \"testorderby\";\r\n        const filter = \"testfilter\";\r\n        client.metrics.get(appId, metricId, timespan, interval, aggregation, segment, top, orderby, filter).then((result) => {\r\n          console.log(\"The result is:\");\r\n          console.log(result);\r\n        }).catch((err) => {\r\n          console.log(\"An error occurred:\");\r\n          console.error(err);\r\n        });\r\n      });\r\n    </script>\r\n  </head>\r\n  <body></body>\r\n</html>\r\n```\r\n\r\n## Related projects\r\n\r\n- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)\r\n","readmeFilename":"README.md"}