Not really a question, but more like a warning for other users of JIRA-Client-Automated. If this notification doesn't belong here, then please let me know. It's been too long ago since I last visited perlmonks.org, sorry!

I'm using all_search_results in JIRA-Client-Automated to filter out all issues that are assigned to me. The code is here below. The call doesn't work anymore.

I already logged bug https://rt.cpan.org/Public/Bug/Display.html?id=170062

my @open_issues = $jira->all_search_results( "(((assignee = " . $accountId . " or assignee = 557058:03251bcc-c6a3-4137-a7f0-d5c63be68d1d9 +)" . " and project != \"ST - Dev Support\")" . " or ((assignee is empty or assignee =" . " 557058:03251bcc-c6a3-4137-a7f0-d5c63be68d1d9 or assignee = + " . $accountId . ") AND project = \"ST - Dev Support\")) AND status != Done" . " and status != Cancelled order by created DESC");

This is the error I am getting:

Unable to POST /rest/api/latest/search/: 410 Gone{ errorMessages => [ "The requested API has been removed. Please migrate to the /rest/a +pi/3/search/jql API. A full migration guideline is available at https +://developer.atlassian.com/changelog/#CHANGE-2046", ], errors => {}, } for request: { fields => ["*navigable"], jql => "(((assignee = 557058:488e7764-b837-4c11-974d-ec9115f47e26 or + assignee = 557058:03251bcc-c6a3-4137-a7f0-d5c63be68d1d9) and project + != \"ST - Dev Support\") or ((assignee is empty or assignee = 557058 +:03251bcc-c6a3-4137-a7f0-d5c63be68d1d9 or assignee = 557058:488e7764- +b837-4c11-974d-ec9115f47e26) AND project = \"ST - Dev Support\")) AND + status != Done and status != Cancelled order by created DESC", maxResults => 100, startAt => 0, } at ./checkJiraIssues.pl line 57.
--
if ( 1 ) { $postman->ring() for (1..2); }
  • Comment on JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed.
  • Select or Download Code

Replies are listed 'Best First'.
Re: JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed.
by Corion (Patriarch) on Sep 18, 2025 at 07:27 UTC

    Parsing the JIRA openapi description and generating a Perl client from it is part of the test suite for my module OpenAPI::PerlGenerator. I'm happy to be no current user of JIRA, so I can't test the generated code.

    If that code works for you, I'm happy to release it as a stand-alone (generated) distribution. If there are changes you need to make to the OpenAPI specification, the openapi.json in the parent directory contains the specification for the generated code.

    I fear you will have to restructure your current program though, because my code simply translates the JIRA openapi spec and has no thoughts about making JIRA easy to use.

Re: JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed.
by gargle (Chaplain) on Sep 18, 2025 at 08:20 UTC

    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); }
Re: JIRA-Client-Automated stopped working for me, Atlassian modified the API's. The requested API for searching issues has been removed.
by kcott (Archbishop) on Sep 18, 2025 at 07:18 UTC

    G'day gargle,

    "Not really a question, ...

    I've moved it to Meditations; approved it; and given it an upvote. Thanks for posting.

    — Ken

      Thank you so much, and sorry for posting in the wrong group.
      --
      if ( 1 ) { $postman->ring() for (1..2); }