misterperl has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks Brave and True.

I started a new endeavor today to use JIRA::REST to pull back info from our issue-tracker. It seemed to install ok. My little example is something like:

use JIRA::REST; my $J = JIRA::REST->new( { url => 'myurl', user=>'me', pass='secret' } ); my $issue = $J->GET( 'issue/ZZ-1234');

It seems to get past "new" OK, although I'm not really sure how to tell if it actually logged in. I tried both valid, and invalid credentials and it didn't seem to matter. But an invalid URL throws an error,. So question #1 is "how can I tell if I authenticated?" . I'm not as concerned with this as question #2 however..

I checked and "url/issue/ZZ-1234" is a valid URL in Moz.

Then the GET() errors, saying "rest/api/latestissue/ZZ-1234" ... is not a valid resource. The module put those extra dirs into the URL itself. I stepped through it and I saw where it added them. Question #2- would these resources just BE THERE on a JIRA server? Or would the administrator need to somehow enable them? Is there a way (for a non-JIRA admin Perl programmer) to find them? We don't really have a JIRA admin here anymore.

This seems to be a minimally documented , and used module , so I'm struggling ..

TY and stay safe my friends!

Replies are listed 'Best First'.
Re: JIRA::REST docs and help
by bliako (Abbot) on Apr 24, 2020 at 21:19 UTC

    try and supply an absolute URL to the constructor, from the source code of JIRA::REST :

    # Prefix $path with the default API prefix unless it already speci +fies # one or it's an absolute URL. $path = $self->{api} . $path unless $path =~ m@^(?:/rest/|(?i)http +s?:)@;
Re: JIRA::REST docs and help
by Fletch (Bishop) on Apr 24, 2020 at 20:13 UTC

    Searching for "JIRA REST API curl" found this page which has lots of samples for driving the API with curl. You might try some of those to see if your server has whatever API enabled (and/or that your credentials are working).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: JIRA::REST docs and help
by jcb (Parson) on Apr 28, 2020 at 01:25 UTC

    That error looks like you are missing a "/". Try changing the argument in line 4 to '/issue/ZZ-1234' and see if that helps.