Skip to main content

Create

Description

Use a HTTP POST request to create a story.

Request

HTTP Method: POST

Query ParameterDescription
nameOptional The story name.
descriptionOptional A user-defined description of the story.
keep_events_forOptional 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_idOptional ID of team to which the story should be added.
folder_idOptional ID of folder to which the story should be added.
disabledOptional Boolean flag indicating whether the story is disabled (default: false)
priorityOptional Boolean flag indicating if this is a high priority story (default: false).
published_stateOptional Indicates the published state of the story. Takes PUBLISHED or UNPUBLISHED. The story must be in a team and not user drafts to be published.
Path ParameterDescription
N/A

Sample request

curl -X POST \
https://<tenant-domain>/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",
"team_id": 1,
"folder_id": 1
}'

Response

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

Field description

ParameterDescription
idThe story ID.
nameThe story name.
user_idID of story owner.
descriptionA user-defined description of the story.
created_atISO 8601 Timestamp representing date and time the story was created.
updated_atISO 8601 Timestamp representing date and time the story was last updated.
keep_events_forDefined event retention period in seconds.
disabledBoolean flag indicating whether story is disabled.
priorityBoolean flag indicating whether story is hight priority story.
guidUnique identifier of the story.
team_idID of team to which the story belongs.
folder_idID of folder to which the story belongs.
send_to_story_enabledBoolean flag indicating if Send to Story is enabled.
send_to_story_accessControls who is allowed to send to this story.
entry_agent_idThe ID of the entry action for this story.
exit_agentsAn Array of objects describing exit actions for this story.
slugAn underscored representation of the story name.
publishedBoolean flag indicating the published state of the story.

Sample response

{
"id": 7981,
"name": "Simple story",
"user_id": 167,
"description": "In the simple story we will create a fictional situation where a detection system is configured to send alerts to our Tines tenant",
"keep_events_for": 604800,
"disabled": false,
"priority": false,
"send_to_story_enabled": false,
"send_to_story_access": null,
"entry_agent_id": null,
"exit_agents": [],
"team_id": 1,
"folder_id": 1,
"guid": "df1e838a18d20696120b41516497b017",
"slug": "simple_story",
"created_at": "2021-05-10T08:56:50Z",
"updated_at": "2021-05-10T08:56:50Z",
"published": false
}