Description

Use a HTTP POST request to create a story.

Request

HTTP Method: POST

Query Parameter Description
name The story name.
description A user-defined description of the story.
keep_events_for Optional Event retention period in seconds:
1 hour: 3600
6 hours: 21600
1 day: 86400
3 days: 259200
7 days: 604800
30 days: 2592000
365 days: 31536000
team_id Optional ID of team to which the story should be added.
folder_id Optional ID of folder to which the story should be added.
disabled Optional Boolean flag indicating whether the story is disabled (default: false)
priority Optional Boolean flag indicating if this is a high priority story (default: false).
Path Parameter Description
N/A  

Sample request

curl -X POST \
  https://<tenant-name>.tines.io/api/v1/stories/ \
  -H 'content-type: application/json' \
  -H 'x-user-email: <email-address>' \
  -H 'x-user-token: <api-token>'
  -d '{
        "name": "Simple story",
        "description": "In the simple story we will create a fictional situation where a detection system is configured to send alerts to our Tines tenant. The alert will contain the type of alert (infection, ddos, credential stuffing, etc.) and details on any users affected. If the alert is related to an infection, based on the users job title, we will take a specific action.\r\n\r\nThe simple story is described in detail in the <a href=\"https://docs.tines.io/tines_quickstart_simple_story.html\">Tines Docs</a>.\r\n\r\nUse the following URL command (replace $webhook-url with the webhook URL in the ''Summary\" tab of the 'Receive events' action) to send events to this story:\r\n\r\n<pre>curl $webhook-url -X POST -H \"Content-Type: application/json\" -d '{\"event_name\":\"My first event\",\"type\":\"infection\",\"users\":[{\"name\":\"alice\",\"age\":25,\"country\":\"US\",\"job\":\"Engineer\"},{\"name\":\"bob\",\"age\":20,\"country\":\"UK\",\"job\":\"Student\"},{\"name\":\"carol\",\"age\":61,\"country\":\"Ireland\",\"job\":\"CEO\"}]}'</pre>",
        "keep_events_for": 604800,
        "team_id": 1,
        "folder_id": 1,
        "disabled": false,
        "priority": false,
      }'

Response

A successful request will return a JSON object describing the created story

Field description

Parameter Description
id The story ID.
name The story name.
user_id ID of story owner.
description A user-defined description of the story.
created_at ISO 8601 Timestamp representing date and time the story was created.
updated_at ISO 8601 Timestamp representing date and time the story was last updated.
keep_events_for Defined event retention period in seconds.
disabled Boolean flag indicating whether story is disabled.
priority Boolean flag indicating whether story is hight priority story.
guid Unique identifier of the story.
team_id ID of team to which the story belongs.
folder_id ID of folder to which the story belongs.

Sample response

{
  "id": 1,
  "name": "Simple story",
  "user_id": 1,
  "created_at": "2021-03-105T20:06:14.825Z",
  "updated_at": "2021-03-10T20:06:14.825Z",
  "description": "In the simple story we will create a fictional situation where a detection system is configured to send alerts to our Tines tenant. The alert will contain the type of alert (infection, ddos, credential stuffing, etc.) and details on any users affected. If the alert is related to an infection, based on the users job title, we will take a specific action.\r\n\r\nThe simple story is described in detail in the <a href=\"https://docs.tines.io/tines_quickstart_simple_story.html\">Tines Docs</a>.\r\n\r\nUse the following URL command (replace $webhook-url with the webhook URL in the ''Summary\" tab of the 'Receive events' action) to send events to this story:\r\n\r\n<pre>curl $webhook-url -X POST -H \"Content-Type: application/json\" -d '{\"event_name\":\"My first event\",\"type\":\"infection\",\"users\":[{\"name\":\"alice\",\"age\":25,\"country\":\"US\",\"job\":\"Engineer\"},{\"name\":\"bob\",\"age\":20,\"country\":\"UK\",\"job\":\"Student\"},{\"name\":\"carol\",\"age\":61,\"country\":\"Ireland\",\"job\":\"CEO\"}]}'</pre>",
  "guid": "b7c81e0cb416ae8f4c00874ca7b1cdf8",
  "keep_events_for": 604800,
  "disabled": false,
  "priority": false,
  "team_id": 1,
  "folder_id": 1
}