YouTrack Request Headers
I am looking to implement a public service that utilizes the YouTrack issuesCount api.
At https://www.jetbrains.com/help/youtrack/devportal/yt-api-headers.html you specify that the authorization header is mandatory.
But if I do:
curl --header "Content-Type: application/json" -X POST --data "{\"query\":\"project: RIDER #Unresolved\"}" "https://youtrack.jetbrains.com/api/issuesGetter/count?fields=count"
in bash, I get a `{"count":8869,"$type":"IssueCountResponse"}` response which is correct. But I did not send a header for authorization as you can clearly see.
Is this a Bug in YouTrack or an error in your documentation?
Please sign in to leave a comment.
Hello,
I'm Lena from the YouTrack Team.
When you don't use the token, you act on behalf of the guest user: https://www.jetbrains.com/help/youtrack/cloud/managing-guest-users.html
In youtrack.jetbrains.com the guest user can access the issues (you don't need to log in to read the public issues).
We also ask you not to use our cooperative YouTrack (youtrack.jetbrains.com) for testing purposes. Please create your own cloud instance and perform testing there. It's free: https://www.jetbrains.com/youtrack/download/get_youtrack.html#section=cloud
Hi Lena,
Thanks for the response. Using `youtrack.jetbrains.com` was just for the example for here as you would not have been able to access our own firewall restricted self-hosted instance of youtrack. Stanislav explained about the guest user also.
Regards
Hi,
Happy to hear that. Note that we at JetBrains don't need access to your instance. However, you can use this self-hosted instance of YouTrack to test REST API as well.