tickets #157867
closed
[redmine] Some issues cannot be retrieved via REST API
Added by tinita 9 months ago.
Updated 9 months ago.
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?
This resulted in a private ticket accidentally. Now I can't make it public.
I found 4 issues in our backlog of 47 tickets that are showing this behaviour.
All other issues work fine.
- 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
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)
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.
:-) 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?
Yes, all good now, thanks :)
- Status changed from Feedback to Closed
Also available in: Atom
PDF