summaryrefslogtreecommitdiffstats
path: root/docs/en/rst/api/core/v1/bug-user-last-visit.rst
blob: 91974496807f6155d2545861f383fe815cad44c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Bug User Last Visited
=====================

.. _rest-bug-user-last-visit-update:

Update Last Visited
-------------------

Update the last-visited time for the specified bug and current user.

**Request**

To update the time for a single bug id:

.. code-block:: text

   POST /rest/bug_user_last_visit/(id)

To update one or more bug ids at once:

.. code-block:: text

   POST /rest/bug_user_last_visit

.. code-block:: js

   {
     "ids" : [35,36,37]
   }

=======  =====  ==============================
name     type   description
=======  =====  ==============================
**id**   int    An integer bug id.
**ids**  array  One or more bug ids to update.
=======  =====  ==============================

**Response**

.. code-block:: js

   [
     {
       "id" : 100,
       "last_visit_ts" : "2014-10-16T17:38:24Z"
     }
   ]

An array of objects containing the items:

=============  ========  ============================================
name           type      description
=============  ========  ============================================
id             int       The bug id.
last_visit_ts  datetime  The timestamp the user last visited the bug.
=============  ========  ============================================

.. _rest-bug-user-last-visit-get:

Get Last Visited
----------------

**Request**

Get the last-visited timestamp for one or more specified bug ids or get a
list of the last 20 visited bugs and their timestamps.

To return the last-visited timestamp for a single bug id:

.. code-block:: text

   GET /rest/bug_user_last_visit/(id)

To return more than one specific bug timestamps:

.. code-block:: text

   GET /rest/bug_user_last_visit/123?ids=234&ids=456

To return just the most recent 20 timestamps:

.. code-block:: text

   GET /rest/bug_user_last_visit

=======  =====  ============================================
name     type   description
=======  =====  ============================================
**id**   int    An integer bug id.
**ids**  array  One or more optional bug ids to get.
=======  =====  ============================================

**Response**

.. code-block:: js

   [
     {
       "id" : 100,
       "last_visit_ts" : "2014-10-16T17:38:24Z"
     }
   ]

An array of objects containing the following items:

=============  ========  ============================================
name           type      description
=============  ========  ============================================
id             int       The bug id.
last_visit_ts  datetime  The timestamp the user last visited the bug.
=============  ========  ============================================