getResolvingThreadEntries
A Graze API GET request that returns thread entries for a specified Situation that have been marked as resolving steps. Threads are comments or 'story activity' on Situations. Operators can mark one or more thread entries as steps that were used to resolve a Situation.
You can select specific thread entries to return using start
and limit
values. If not, their default values return the first 100 thread entries. The thread entries returned are ordered by most recent first.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getResolvingThreadEntries
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
| Number | No | Number of the first resolving thread entry to return. Default is 0. |
| Number | No | Maximum number of resolving thread entries to return. Default is 100. |
Response
Endpoint getResolvingThreadEntries
returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
| Number | Situation ID. |
| Array | A list of resolving thread entries in the Situation. See below. |
The resolving_entries
list contains the following:
Name | Type | Description |
---|---|---|
| String | Text of the resolving entry. Reserved characters are converted to HTML entities, for example, |
| Number | ID of the user that created the resolving entry. |
| String | Name of the thread that the resolving entry is in. |
| Number | Timestamp (in Unix epoch time) of when the resolving entry was created. |
| Number | ID of the resolving thread entry. |
Examples
The following examples demonstrate typical use of endpoint getResolvingThreadEntries
:
Request example
Example cURL request to return the first 100 resolving thread entries in Situation 358:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getResolvingThreadEntries" \ --data-urlencode "sitn_id=358"
Example cURL request to return the first 10 resolving thread entries in Situation 358:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getResolvingThreadEntries" \ --data-urlencode "sitn_id=358" \ --data-urlencode "start=0" \ --data-urlencode "limit=10"
Response example
Example response showing the three resolving thread entries in Situation 358:
{ "sitn_id":358, "resolving_entries": [ { "entry_text":"hah","user_id":3,"thread_name":"Support","time":1549387456,"entry_id":1722 }, { "entry_text":"asdfdsf","user_id":3,"thread_name":"Support","time":1549385762,"entry_id":1721 }, { "entry_text":"sdfsdf\n","user_id":3,"thread_name":"Support","time":1549385747,"entry_id":1720 } ] }