Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daipresents/bc5b98d192f2092fa785b17fc51fccf1 to your computer and use it in GitHub Desktop.
Save daipresents/bc5b98d192f2092fa785b17fc51fccf1 to your computer and use it in GitHub Desktop.
RedmineのREST APIを使ってみる
At the time of writing, the API is only available in trunk (see r3310, r3313).
accept_key_auth :index, :show, :changes, :new, :update, :destroy
Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json).
<issue>
<project_id>rest</project_id>
<tracker_id>3</tracker_id>
<status_id>2</status_id>
<priority_id>5</priority_id>
<assigned_to_id>1</assigned_to_id>
<subject>こんにちは世界</subject>
<description>ありがとう世界</description>
<start_date>2010-03-01</start_date>
<due_date>2010-03-02</due_date>
<done_ratio>10</done_ratio>
<estimated_hours>10.5</estimated_hours>
<custom_field_values>
<1>カスタムなテキストフィールド</1>
<2>11111</2>
<3>0.33</3>
<4>ううう</4>
<5>1978-05-08</5>
<6>1</6>
</custom_field_values>
</issue>
<issue>
<project_id>rest</project_id>
<tracker_id>2</tracker_id>
<status_id>3</status_id>
<priority_id>7</priority_id>
<assigned_to_id>3</assigned_to_id>
<subject>こんにちは世界2</subject>
<description>ありがとう世界2</description>
<start_date>2010-03-03</start_date>
<due_date>2010-03-04</due_date>
<done_ratio>20</done_ratio>
<estimated_hours>20.5</estimated_hours>
<custom_field_values>
<1>カスタムなテキストフィールド2</1>
<2>111112</2>
<3>0.332</3>
<4>いいい</4>
<5>1978-05-09</5>
<6>0</6>
</custom_field_values>
</issue>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>&#20778;&#20808;&#24230; &#12434;&#20837;&#21147;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;&#12290;</error>
<error>&#12459;&#12473;&#12479;&#12512;&#12394;&#12522;&#12473;&#12488;&#12501;&#12451;&#12540;&#12523;&#12489; &#12399;&#19968;&#35239;&#12395;&#12354;&#12426;&#12414;&#12379;&#12435;&#12290;</error>
</errors>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment