sebarmeli / bamboo-api

Node.js module wrapping the Atlassian Bamboo REST API
MIT License
40 stars 20 forks source link

Can this be used with Bamboo OnDemand/Cloud #7

Open thenikso opened 9 years ago

thenikso commented 9 years ago

Hello!

Can this library be used with Bamboo OnDemand? If so which URL should be used?

Thanks!

pvoznenko commented 9 years ago

Hi @thenikso,

This library is a wrapper for Bamboo RESP API and so if to believe this thread: https://answers.atlassian.com/questions/14211112/using-the-rest-api-from-bamboo-on-demand it should work with following URL: https://[MYCOMPANY].atlassian.net/builds

But I never tried with Bamboo OnDemand

ericfrancis commented 8 years ago

I've got a little script I've written that is getting this error:

$ node app.js
error
[Error: Unreachable endpoint! Response status code: 401]
null

The script is:

#!/usr/bin/env node

var Bamboo = require('bamboo-api');
var bamboo = new Bamboo("https://mycompany.atlassian.net/builds", 
        'my bamboo username',
        'my bamboo password');
bamboo.getLatestBuildStatus("MY_PLAN_KEY", function(error, result) {
    if(error) {
        console.log('error');
        console.log(error);
    }
    console.log(result);
});

Is there any way to further debug what is going on?

ericfrancis commented 8 years ago

Ignore my last comment. My username is not my email address, my mistake.

And yes, confirmed that this will work for Bamboo cloud.