Create or replace the Open Services recurring schedule.
curl --request PUT \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cron_expression": "0 9 * * 1-5",
"enabled": true,
"timezone": "Europe/London"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule"
payload = {
"cron_expression": "0 9 * * 1-5",
"enabled": True,
"timezone": "Europe/London"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cron_expression: '0 9 * * 1-5', enabled: true, timezone: 'Europe/London'})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule"
payload := strings.NewReader("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"enabled\": true,\n \"timezone\": \"Europe/London\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"schedule": {
"created_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"dataset": "services",
"enabled": true,
"next_run_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_snapshot_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Services
Create or replace the Open Services recurring schedule.
PUT
https://api.infrawatch.com/api/v1
/
projects
/
{project_uuid}
/
esi
/
services
/
schedule
Create or replace the Open Services recurring schedule.
curl --request PUT \
--url https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"cron_expression": "0 9 * * 1-5",
"enabled": true,
"timezone": "Europe/London"
}
'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule"
payload = {
"cron_expression": "0 9 * * 1-5",
"enabled": True,
"timezone": "Europe/London"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cron_expression: '0 9 * * 1-5', enabled: true, timezone: 'Europe/London'})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/esi/services/schedule"
payload := strings.NewReader("{\n \"cron_expression\": \"0 9 * * 1-5\",\n \"enabled\": true,\n \"timezone\": \"Europe/London\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"schedule": {
"created_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"dataset": "services",
"enabled": true,
"next_run_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_snapshot_run_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Authorizations
Infrawatch API key. Supply the complete key directly as the header value.
Path Parameters
Body
application/json
Standard five-field cron expression (minute, hour, day of month, month, day of week). Seconds and descriptors are not accepted.
Required string length:
9 - 255Example:
"0 9 * * 1-5"
IANA time zone used to evaluate the cron expression.
Required string length:
1 - 255Example:
"Europe/London"
Response
Daily query schedule.
Show child attributes
Show child attributes
⌘I