Skip to main content

createThreadEntry

Note

This endpoint has been superseded. Use addThreadEntry instead. All new functionality will be delivered in addThreadEntry.

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

This endpoint returns a Boolean indicating whether or not the thread entry was created successfully.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint createThreadEntry 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 creating is a resolving step.

Response

Endpoint createThreadEntry returns the following response:

Successful requests return a JSON object containing the following:

Type

Description

Boolean

Whether or not the new thread entry was created successfully.

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 createThreadEntry:

Request example

Example cURL request to create a new entry in thread "Support" in Situation 3:

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

Response example

Example response showing that the new thread entry was successfully created::

true