Moogsoft Docs

addThreadEntry

A Graze API POST request that adds a new entry to an existing thread in a Situation. Threads are comments or 'story activity' on Situations.

This endpoint returns the entry ID of the newly created thread entry.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint addThreadEntry 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.

thread_name

String

Yes

Name of the existing thread.

entry

String

Yes

Description of the new entry you want to create in the thread. For example, "And another thing...". HTML and XML tags are stripped from the thread entry text. Reserved characters are converted to HTML entities, for example, & is converted to &.

resolving_step

Boolean

No

Whether or not the thread entry you are adding is a resolving step.

Response

Endpoint addThreadEntry returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

entry_id

Number

ID of the new 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 addThreadEntry:

Request example

Example cURL request to add a new entry "Test Entry" to thread "Support" in Situation 3:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/addThreadEntry" -H "Content-Type: application/json; charset=UTF-8" -d '{"sitn_id" : 3, "thread_name" : "Support", "entry" : "Test Entry", "resolving_step" : true}'

Response example

Successful response providing the ID of the thread entry that has been created:

{"entry_id":27}