Project

General

Profile

Actions

Defect #14685

closed

REST queries.xml does not accept KEY authentication

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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

Actions #1

Updated by Matthew Houston over 10 years ago

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

Actions #2

Updated by Etienne Massip over 10 years ago

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

Actions #3

Updated by Matthew Houston over 10 years ago

Etienne Massip wrote:

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

Etienne E 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

Actions #4

Updated by Matthew Houston over 10 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.

Actions #5

Updated by Toshi MARUYAMA over 10 years ago

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

Thank you for your feedback.

Actions

Also available in: Atom PDF