tickets #157867
closed[redmine] Some issues cannot be retrieved via REST API
0%
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?
Updated by tinita about 1 month ago
This resulted in a private ticket accidentally. Now I can't make it public.
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.
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 open the example tickets (with or without
.json
) and get redirected to id.o.o - the "SUSE QA" project does not show up in https://progress.opensuse.org/projects
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
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)
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.
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?