Skip to main content

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. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

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 update behavior

The behavior of this endpoint depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the alert or 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}