Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
microstrategy
Advanced tools
Readme
A light npm wrapper around some of the MicroStrategy REST API endpoints.
HTTP requests are handled by axios, the promise based HTTP client for the browser and node.js.
npm i microstrategy --save
yarn add microstrategy
This module can be used on any HTML page using the bundled dist/mstrapi.min.js
file. Simply include this script tag on any page:
<script src="https://cdn.jsdelivr.net/npm/microstrategy/dist/mstrapi.min.js" crossorigin="anonymous"></script>
See ./webpack for documentation on the bundling process.
Once loaded via the script tag, this API module can be accessed via a global object called mstrapi
:
const baseUrl = 'http://aps-tsiebler-vm:8080/2020u1Library/api';
const mstrClient = new mstrapi.REST({
baseUrl: baseUrl
});
See ./samples/html/cdn-login.html for an example.
const mstr = require('microstrategy');
(async () => {
const baseUrl = 'http://aps-tsiebler-vm:8080/2020u1Library/api';
const mstrClient = new mstr.REST({
baseUrl: baseUrl
});
await mstrClient.login({
username: 'Administrator',
password: '',
loginMode: 1
});
// MicroStrategy Tutorial
const projectId = 'B19DEDCC11D4E0EFC000EB9495D0F44F';
mstrClient.setProjectId(projectId);
const dossierId = 'C103CFA847057FC9FCF772ADF9092BD9';
// APIs are grouped by topic
const DossierAPI = mstrClient.dossiersAndDocuments;
const dossierDefn = await DossierAPI.getDossierDefinition(dossierId);
})();
These methods are simpler wrappers around the APIs exposed by the MicroStrategy Library REST API server. For full documentation, refer to your MicroStrategy Library's api-docs
endpoint.
For example, if your MicroStrategy Library environment has the following URL:
http://example.com/MicroStrategyLibrary/
Your API documentation can be found here:
http://example.com/MicroStrategyLibrary/api-docs
For public REST API documentation from the MicroStrategy demo environment, refer to the following URL: https://demo.microstrategy.com/MicroStrategyLibrary/api-docs
Refer to the samples folder for more samples tested in node.js. These can be directly executed using the node command:
node samples/getDossier.js
If you notice any missing endpoints, please contribute with a PR to enhance this module.
This module includes a minimal wrapper to execute tasks via the Task API.
executeTask()
method.const mstr = require('microstrategy');
(async () => {
const taskApi = new mstr.TaskAPI({
taskProcUrl: 'http://aps-tsiebler-vm:8080/2020u1/servlet/taskProc'
});
const taskId = 'login';
// Collect these from the task builder page
const taskParameters = {
server: 'aps-tsiebler-vm',
project: 'MicroStrategy Tutorial',
userid: 'administrator',
password: ''
};
// The response includes { body, headers, status, statusText }
try {
const res = await taskApi.executeTask(taskId, taskParameters);
console.log('task response: ', res.body);
} catch (e) {
console.error(e);
}
})();
FAQs
A node.js wrapper for the MicroStrategy REST API & Task API
The npm package microstrategy receives a total of 1 weekly downloads. As such, microstrategy popularity was classified as not popular.
We found that microstrategy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.