Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require("path");
- const os = require("os");
- const o = require('odata');
- function createApplication(applicationName) {
- o().config({
- endpoint: `https://devportalu34f5b50f-p2000082306trial.hanatrial.ondemand.com/odata/1.0/data.svc/`,
- username: '',
- password: ''
- });
- return o('APIMgmt.Applications')
- .filter(`title eq '${applicationName}'`).get()
- .then(function (ans) {
- if (ans.data.d.results.length > 0)
- throw new Error(`${applicationName} already exists!`)
- console.log(ans.data);
- }, function(msg) {
- winston.error(msg);
- })
- }
- createApplication('Tést')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement