Get run window
curl --request GET \
--url https://api.cloudcruise.com/workflows/{workflow_id}/run-window \
--header 'cc-key: <api-key>'import requests
url = "https://api.cloudcruise.com/workflows/{workflow_id}/run-window"
headers = {"cc-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'cc-key': '<api-key>'}};
fetch('https://api.cloudcruise.com/workflows/{workflow_id}/run-window', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudcruise.com/workflows/{workflow_id}/run-window",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"cc-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/workflows/{workflow_id}/run-window"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cc-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cloudcruise.com/workflows/{workflow_id}/run-window")
.header("cc-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/workflows/{workflow_id}/run-window")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cc-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run_window": {
"time_zone": "America/Chicago",
"regular_hours": [
{
"active_start_day": "MONDAY",
"active_start_time": {
"hours": 11,
"minutes": 29
},
"active_end_day": "MONDAY",
"active_end_time": {
"hours": 11,
"minutes": 29
}
}
],
"special_hours": [
{
"active": true,
"label": "Thanksgiving",
"start_date": {
"year": 123,
"month": 6,
"day": 16
},
"end_date": {
"year": 123,
"month": 6,
"day": 16
},
"recurrence": "FREQ=MONTHLY;BYDAY=1SA",
"recurrence_start": {
"year": 123,
"month": 6,
"day": 16
},
"active_start_time": {
"hours": 11,
"minutes": 29
},
"active_end_time": {
"hours": 11,
"minutes": 29
}
}
]
},
"state": {
"open": true,
"nextOpenAt": "2023-11-07T05:31:56Z"
}
}Workflow API
Get run window
Returns the workflow’s run window and whether it is open right now. When the workflow has no run window, both run_window and state are null.
See Run Window.
GET
/
workflows
/
{workflow_id}
/
run-window
Get run window
curl --request GET \
--url https://api.cloudcruise.com/workflows/{workflow_id}/run-window \
--header 'cc-key: <api-key>'import requests
url = "https://api.cloudcruise.com/workflows/{workflow_id}/run-window"
headers = {"cc-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'cc-key': '<api-key>'}};
fetch('https://api.cloudcruise.com/workflows/{workflow_id}/run-window', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudcruise.com/workflows/{workflow_id}/run-window",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"cc-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/workflows/{workflow_id}/run-window"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cc-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cloudcruise.com/workflows/{workflow_id}/run-window")
.header("cc-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/workflows/{workflow_id}/run-window")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cc-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run_window": {
"time_zone": "America/Chicago",
"regular_hours": [
{
"active_start_day": "MONDAY",
"active_start_time": {
"hours": 11,
"minutes": 29
},
"active_end_day": "MONDAY",
"active_end_time": {
"hours": 11,
"minutes": 29
}
}
],
"special_hours": [
{
"active": true,
"label": "Thanksgiving",
"start_date": {
"year": 123,
"month": 6,
"day": 16
},
"end_date": {
"year": 123,
"month": 6,
"day": 16
},
"recurrence": "FREQ=MONTHLY;BYDAY=1SA",
"recurrence_start": {
"year": 123,
"month": 6,
"day": 16
},
"active_start_time": {
"hours": 11,
"minutes": 29
},
"active_end_time": {
"hours": 11,
"minutes": 29
}
}
]
},
"state": {
"open": true,
"nextOpenAt": "2023-11-07T05:31:56Z"
}
}Authorizations
API key-based authentication. Provide your CloudCruise API key in the cc-key header.
Headers
CloudCruise API key for authentication
Path Parameters
The ID of the workflow
Was this page helpful?

