{"_id":"57fcc4870312b20e00ac6512","parentDoc":null,"project":"5435687035740020002a1c04","version":{"_id":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","__v":1,"createdAt":"2016-10-11T10:52:54.637Z","releaseDate":"2016-10-11T10:52:54.637Z","categories":["57fcc4860312b20e00ac64c1","57fcc4860312b20e00ac64c2","57fcc4860312b20e00ac64c3","57fcc4860312b20e00ac64c4","57fcc4860312b20e00ac64c5","57fcc4860312b20e00ac64c6","57fcc4860312b20e00ac64c7","57fcc4860312b20e00ac64c8","57fcc4860312b20e00ac64c9","57fcc4860312b20e00ac64ca","57fcc4860312b20e00ac64cb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"[APP-1265], [APP-1035]","version_clean":"5.2.0","version":"5.2"},"__v":0,"category":{"_id":"57fcc4860312b20e00ac64ca","version":"57fcc4860312b20e00ac64c0","__v":0,"project":"5435687035740020002a1c04","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-30T22:39:02.374Z","from_sync":false,"order":9,"slug":"flow-data-structures","title":"Flow Data Structures"},"user":"54497cce27b7fc140078d9a5","updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-31T23:02:13.047Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"lua","name":"Agent Lua","code":"output.message = \"Party Time\"\noutput.time = 1450907653"}]},"method":"post","results":{"codes":[{"name":"","code":"{\n    \"errors\": [\n    ],\n    \"skipped\": [\n    ],\n    \"updated\": [\n    \t\"your_flow_tag\"\n    ]\n}","language":"json","status":200},{"name":"","code":"{\n    \"errors\": [\n        \"error description\"\n    ],\n    \"skipped\": [\n    \t\"your_flow_tag\"\n    ],\n    \"updated\": [\n    ]\n}","language":"json","status":400}]},"settings":"","auth":"required","params":[{"_id":"567b165d93919f0d00c97a9a","ref":"","in":"path","required":true,"desc":"The flow tag","default":"","type":"string","name":"countdown_flow_tag"},{"_id":"567b181b93919f0d00c97aa6","ref":"","in":"body","required":true,"desc":"The message to display above the countdown time. Message color inherits label colour in board properties.","default":"","type":"string","name":"message"},{"_id":"567b181b93919f0d00c97aa5","ref":"","in":"body","required":true,"desc":"The UNIX seconds since epoch representing the time.","default":"","type":"timestamp","name":"time"},{"_id":"567b181b93919f0d00c97aa4","ref":"","in":"body","required":false,"desc":"When counting down, the color of the time display before time_breakpoint_2. When counting up, the color of the display before time_breakpoint_1.","default":"","type":"string","name":"time_color_1"},{"_id":"567b181b93919f0d00c97aa3","ref":"","in":"body","required":false,"desc":"When counting down, the color of the time display after time_breakpoint_2 but before time_breakpoint_1. When counting up, the color of the display after time_breakpoint_1 but before time_breakpoint_2.","default":"","type":"string","name":"time_color_2"},{"_id":"567b181b93919f0d00c97aa2","ref":"","in":"body","required":false,"desc":"When counting down, the color of the time display after time_breakpoint_1. When counting up, the color of the display after time_breakpoint_2.","default":"","type":"string","name":"time_color_3"},{"_id":"567b181b93919f0d00c97aa1","ref":"","in":"body","required":false,"desc":"The color of the time display will change color when passing time_breakpoint_1 or time_breakpoint_2. It's in seconds relative to the event. The default is 0.","default":"","type":"int","name":"time_breakpoint_1"},{"_id":"567b181b93919f0d00c97aa0","ref":"","in":"body","required":false,"desc":"The color of the time display will change color when passing time_breakpoint_1 or time_breakpoint_2. It's in seconds relative to the event. The default is 86400 (24 hours).","default":"","type":"int","name":"time_breakpoint_2"},{"_id":"567b181b93919f0d00c97a9f","ref":"","in":"body","required":false,"desc":"Whether to count up or down","default":"","type":"string","name":"direction"}],"url":"/flows/:countdown_flow_tag/metrics"},"isReference":false,"order":3,"body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/xpUStBloRbyWkSU9eH6D_countdown.png\",\n        \"countdown.png\",\n        \"800\",\n        \"140\",\n        \"#508882\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"message\\\": \\\"Something happened\\\",\\n    \\\"time\\\": 1431102409\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Countdown flows will display a time that counts down until a zero time where it will start to count up from. They also contain a message that can be used to show what the time represents. Send data with a hash containing a time and a message. The countdown will count down to the TIME and count up afterwards. It will show the MESSAGE below the time.","slug":"countdown","type":"endpoint","title":"Countdown"}

postCountdown

Countdown flows will display a time that counts down until a zero time where it will start to count up from. They also contain a message that can be used to show what the time represents. Send data with a hash containing a time and a message. The countdown will count down to the TIME and count up afterwards. It will show the MESSAGE below the time.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

countdown_flow_tag:
required
string
The flow tag

Body Params

message:
required
string
The message to display above the countdown time. Message color inherits label colour in board properties.
time:
required
timestamp
The UNIX seconds since epoch representing the time.
time_color_1:
string
When counting down, the color of the time display before time_breakpoint_2. When counting up, the color of the display before time_breakpoint_1.
time_color_2:
string
When counting down, the color of the time display after time_breakpoint_2 but before time_breakpoint_1. When counting up, the color of the display after time_breakpoint_1 but before time_breakpoint_2.
time_color_3:
string
When counting down, the color of the time display after time_breakpoint_1. When counting up, the color of the display after time_breakpoint_2.
time_breakpoint_1:
integer
The color of the time display will change color when passing time_breakpoint_1 or time_breakpoint_2. It's in seconds relative to the event. The default is 0.
time_breakpoint_2:
integer
The color of the time display will change color when passing time_breakpoint_1 or time_breakpoint_2. It's in seconds relative to the event. The default is 86400 (24 hours).
direction:
string
Whether to count up or down

Examples


Result Format


Documentation

[block:image] { "images": [ { "image": [ "https://files.readme.io/xpUStBloRbyWkSU9eH6D_countdown.png", "countdown.png", "800", "140", "#508882", "" ] } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"message\": \"Something happened\",\n \"time\": 1431102409\n} ", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}