Project

General

Profile

Actions

tickets #157867

closed

[redmine] Some issues cannot be retrieved via REST API

Added by tinita about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Redmine
Target version:
-
Start date:
2024-03-25
Due date:
% Done:

0%

Estimated time:

Description

Observation

See https://progress.opensuse.org/issues/157858#note-7
For example

curl https://progress.opensuse.org/issues/157360.json
<html><body>You are being <a href="https://progress.opensuse.org/oic/login">redirected</a>.</body></html>

I don't see a pattern yet.

Is there anything in the errorlog maybe?

Actions #1

Updated by tinita about 1 month ago

This resulted in a private ticket accidentally. Now I can't make it public.

Actions #2

Updated by tinita about 1 month ago

I found 4 issues in our backlog of 47 tickets that are showing this behaviour.
All other issues work fine.

Actions #3

Updated by crameleon about 1 month ago

  • Tracker changed from communication to tickets
  • Category set to Redmine
  • Status changed from New to Feedback
  • Assignee set to crameleon
  • Private changed from Yes to No

Hi,

I do not think there is an issue specific to the API.

One of your example tickets (https://progress.opensuse.org/issues/157462) is marked as "Private", it is hence explicitly set to not be accessible publicly.

The three other tickets are in the "SUSE QA" project.
Testing in a browser session in which I am not logged in:

I can't find the respective setting on the spot, but it looks like the whole "SUSE QA" project was intentionally configured in a way that all tickets are implicitly considered "Private".

In order to access private tickets (whether explicit or implicit ones) you need to authenticate. To authenticate for programmatic access, you can use an API access key configurable in https://progress.opensuse.org/my/account. Note these keys are tied to your user and should not be placed on shared systems.

That being said, I deem the expected behavior working as expected, please clarify if I am missing something.

Best,
Georg

Actions #4

Updated by tinita about 1 month ago

Sorry to not mention it, but I am authenticated.
I did

% export REDMINE_API_KEY=...
% curl https://progress.opensuse.org/issues/157861.json
<html><body>You are being <a href="https://progress.opensuse.org/oic/login">redirected</a>.</body></html>

I got the key from the "My account" page where it says:

API access key
Show
...
API access key created ... (Reset)
Actions #5

Updated by tinita about 1 month ago ยท Edited

Sorry, I was being stupid :(
I need to specify -H X-Redmine-API-Key: ...
I mixed curl up with the script I was working on that was reading REDMINE_API_KEY from the environment automatically.
Please close.

Actions #6

Updated by crameleon about 1 month ago

:-) I was about to say, I'm pretty sure curl does not contain any code to read a REDMINE_API_KEY variable.

No problem! So, everything is working fine?

Actions #7

Updated by tinita about 1 month ago

Yes, all good now, thanks :)

Actions #8

Updated by crameleon about 1 month ago

  • Status changed from Feedback to Closed

Glad to hear. :)

Actions

Also available in: Atom PDF