A possible brute force solution, because it turns out you only have to add "jql/" to the $uri. You better also remove startAt because of https://community.atlassian.com/forums/Jira-questions/POST-rest-api-3-search-jql-returns-400-quot-Invalid-request/qaq-p/3111234.

Oh, and by the way, search_accountId works differently. I logged https://rt.cpan.org/Public/Bug/Display.html?id=131856 for this. JIRA-Client-Automated is without a maintainer it seems.

#!/usr/bin/perl use JIRA::Client::Automated; package JIRA::Client::Automated; sub search_accountId { my ($self, $emailAddress) = @_; my $uri = $self->{auth_url} . 'user/search?query=' . $emailAddress . '&fields=accountId'; my $request = GET $uri, Content_Type => 'application/json'; my $response = $self->_perform_request($request); my $results = $self->{_json}->decode($response->decoded_content()) +; my $data_ref = @{$results}[0]; die "something went wrong while searching for $emailAddress" if ($data_ref->{emailAddress} ne $emailAddress); return $data_ref->{accountId}; } sub search_issues { my ($self, $jql, $start, $max, $fields) = @_; $fields ||= ['*navigable']; my $query = { jql => $jql, # startAt => $start, # https://community.atlassian.c +om/forums/Jira-questions/POST-rest-api-3-search-jql-returns-400-quot- +Invalid-request/qaq-p/3111234 maxResults => $max, fields => $fields, }; my $query_json = $self->{_json}->encode($query); my $uri = "$self->{auth_url}search/jql/"; my $request = POST $uri, Content_Type => 'application/json', Content => $query_json; my $response = $self->_perform_request($request, { 400 => sub { # pass-thru 400 responses for us to deal with bel +ow my ($response, $request, $self) = @_; return $response; }, }); if ($response->code == 400) { my $error_msg = $self->{_json}->decode($response->decoded_cont +ent()); return { total => 0, errors => $error_msg->{errorMessages} }; } my $results = $self->{_json}->decode($response->decoded_content()) +; return { total => $$results{total}, start => $$results{startAt}, max => $$results{maxResults}, issues => $$results{issues} }; } package main; ...

Greetings, I hope someone might find this useful,

Thanks,

Johan

--
if ( 1 ) { $postman->ring() for (1..2); }

In reply to Re: JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed. by gargle
in thread JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed. by gargle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.