1
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?

More than 5 years have passed since last update.

bashのcurlで簡単にBacklogにAPI起票する

Last updated at Posted at 2020-03-05

目的

BashスクリプトやCrontab,LogrotateでエラーなどをトリガーにBacklog起票する。

どうやるか

bashのcurlコマンドでBacklog APIを叩いて起票。特に凝ったことはしない。

コマンド

Backlog 課題起票API

Backlog ユーザー一覧取得API

ユーザー一覧取得コマンド(管理者じゃないと無理)

※スペースIDは起票するプロジェクトのドメイン部分 -> https://〇〇〇.backlog.jp/

curl -X GET https://${スペースID}.backlog.jp/api/v2/users?apiKey=${APIキーは管理者ユーザーの個人設定ページから適宜発行してください}

起票コマンド

curl -X POST -d "projectId=${画面右上ユーザーアイコン→プロジェクト設定のURLにある}&summary=${課題チケットのタイトル}&description=${課題チケットを開いた際に表示される詳細}&startDate=${yyyy-mm-dd}&dueDate=${yyyy-mm-dd}&issueTypeId=${画面右上ユーザーアイコン→プロジェクト設定→種別の一覧→選択した種別のURLにある}&priorityId=3&assigneeId=${上記ユーザー一覧のAPIから取得(管理者にAPI叩いてもらうしかない)}" https://${スペースID}.backlog.jp/api/v2/issues?apiKey=${APIキーは起票するユーザーの個人設定ページから適宜発行してください}
1
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
1
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?