プロジェクト

全般

プロフィール

Vote #67710

未完了

"check status" feature to verify validity of Redmine installation and API access key

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
-
開始日:
2010/07/27
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
0
issue_org_id:
5977
author_id:
7834
assigned_to_id:
0
comments:
4
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

I suggest adding "check status" feature to Redmine REST API so I could verify:
1) the host name is valid and there's Redmine with REST API enabled at that location
2) the API access key is valid
Response from the server can include some info about the Redmine installation (e.g. Redmine version, some server health check/status, maybe the user name for the given Access Key, ...)

I tried getting list of projects to achieve goals 1 and 2, but the problem is that in some cases this request can timeout, e.g. this is what happens with demo.redmine.org site with plenty of projects (thousands?):

java.io.IOException: Server returned HTTP response code: 502 for URL: http://demo.redmine.org/projects.xml

My guess is that projects list is too long and demo.redmine.org server is too slow. Retrieving list of projects can potentially be a long-running operation, while "check status" can be completed in O(1) time.


journals

would doing a HTTP HEAD request on any resource that the API provides not accomplish what you're after?
--------------------------------------------------------------------------------
I see task #5901 describes similar feature.
HTTP HEAD on some random resource does not help with goal 2 I listed above
--------------------------------------------------------------------------------
AFAICT the Redmine API has no way of validating whether a given API key is valid, short of actually attempting a write operation (POST, PUT, DELETE).

With the GitHub API, you can do:

<pre>
curl --silent https://api.github.com/repos/myuser/myrepo/pulls/19999?access_token=invalid
{
"message": "Bad credentials",
"documentation_url": "https://developer.github.com/v3"
}
</pre>

Would be great to have something like this in the Redmine API as well! Thanks for the cool software.
--------------------------------------------------------------------------------
Related ticket: #32315
--------------------------------------------------------------------------------


related_issues

relates,New,5901,REST API to expose the Redmine version

Admin Redmine さんが約2年前に更新

  • カテゴリREST API_32 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0