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 |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
| String | Yes | Name of the existing thread. |
| 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, |
| 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 |
---|---|---|
| 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}