0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【curl】Redmine APIを実行してチケット情報を取得する

Last updated at Posted at 2024-06-10

はじめに

Redmineのチケット自動作成ツールを開発している際に、チケットのデータ構造やプルダウンのkey valueの値を知りたいタイミングがありました。
そこで、Redmine APIをcurlで実行して確認したので備忘録です。

チケット番号を指定してチケットのデータを取得

curl -H "X-Redmine-API-Key: {APIkey}" -X GET "https://{RedmineURL}/issues/{チケット番号}.json"

json形式でチケットのデータが出力されます。

プルダウン項目(トラッカーなど)のIDを確認する

curl -H "X-Redmine-API-Key: {APIkey}" -X GET "https:/{RedmineURL}/{項目名}.json"

項目名の部分に確認したい項目名を指定してください。

例)トラッカー:tracker
  ステータス:status
  優先度:priority

カスタムフィールドのIDを確認する

curl -H "X-Redmine-API-Key: {APIkey}" -X GET "https://{RedmineURL}/custom_fields.json"

カスタムフィールドの一覧を取得します。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?