通过REST API 2.0更新RT Ticket的Owner字段

时间:2018-04-07 18:29:09

标签: rt

                              +-------+
                              |       |
                              |  A    |
                              |       |
                              +---+---+
                                  |
                                  |
                                  |
                                  |
                                  |
                                  | HAS
                                  |
                                  |
                                  |
                                  |
                             +----+-----+
                             |          |
                             |    Z     |
                             |          |
                             |          |
                             +----------+
                             |          |
                             |          |
                             |          |              +-----------+
+----------+                 |          |              |           |
|          |                 |          |              |           |
|          |                 |          |              |           |
|   B      +-----------------+          +--------------+    C      |
|          |        SENT                      RECV'D   |           |
|          |                                           |           |
|          |                                           |           |
+----------+                                           +-----------+

此命令用于更新JSON顶级票证的值,但“所有者”等值失败。该文档未表示更新这些特定字段的任何方法。通过Request Tracker REST API 2.0(rt-extension-rest2)更新故障单所有者字段的推荐方法是什么?

1 个答案:

答案 0 :(得分:1)

尝试使用用户名作为值:

curl -X PUT 
  -H "Content-Type: application/json" 
  -d 
  '{ “Owner”: "root" }' 
  -H 'Authorization: token XXX_Token_XXX'
  'http://XXX_RT_URL_XXX/REST/2.0/ticket/6'

这应该接受用户名或用户ID。