Defect #14685

REST queries.xml does not accept KEY authentication

Added by Matthew Houston over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Invalid Affected version:2.3.2

Description

Using the REST API will return a (401) if key authentication is used. If I send the request through a browser with an open session it works, or use basic authentication it will work.

Example URL sent:

http://server:3000/redmine/queries.xml (from script returns (401) from browser works)
http://server:3000/redmine/queries.xml&key=3e3ab1b07278a365d1435a39748760bf175b4724 (Doesn't work anywhere)

I'm almost positive I saw a report of this previously though no amount of searching on Redmine or Google has found any results.

Redmine : 2.3.2

History

#1 Updated by Matthew Houston over 4 years ago

Should have put this in above but all other REST API calls are working correctly with the same key.

#2 Updated by Etienne Massip over 4 years ago

Are you sure the user the key belongs to has the right permission?

#3 Updated by Matthew Houston over 4 years ago

Etienne Massip wrote:

Are you sure the user the key belongs to has the right permission?

@Etienne Thanks for the response!

The user key I'm using is the built in administrator user, but I have also tried with my own account key with the same result. All other REST calls are working perfectly (Projects, users, issues etc), even the actual call that runs the queries on the issues is working also.

A bit of background, I'm writing a custom notification script that is very generic, the users can create a custom query in Redmine and then schedule the script to run however often they like. Everything is working except I need to get the query name to put into the email subject and header.

As bloody usual this is the last thing I had to do and it broke ha ha

#4 Updated by Matthew Houston over 4 years ago

  • Status changed from New to Resolved

I'm an idiot.. the string I had put together was missing a '?' in it. I've now got it working.

#5 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Thank you for your feedback.

Also available in: Atom PDF