Moogsoft Docs

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

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

sitn_id

Number

Yes

Situation ID.

start

Number

No

Number of the first resolving thread entry to return. Default is 0.

limit

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

sitn_id

Number

Situation ID.

resolving_entries

Array

A list of resolving thread entries in the Situation. See below.

The resolving_entries list contains the following:

Name

Type

Description

entry_text

String

Text of the resolving entry. Reserved characters are converted to HTML entities, for example, & is converted to &.

user_id

Number

ID of the user that created the resolving entry.

thread_name

String

Name of the thread that the resolving entry is in.

time

Number

Timestamp (in Unix epoch time) of when the resolving entry was created.

entry_id

Number

ID of the resolving thread entry.

API behavior in active and historic databases

The behavior of this endpoint depends on whether the relevant Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the Situation as follows:

See API Update Behavior for more information on Situation statuses.

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}
]
}