curl --request GET \
--url https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}', 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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "1488e2ce-f906-47fb-ba32-c25a3f63df4f",
"max_quantity": 2,
"owner": "lifecycle_policy",
"owner_id": 1,
"retention_time": {
"days": 0,
"hours": 2,
"minutes": 1,
"weeks": 0
},
"type": "cron",
"user_id": 12,
"day": "5",
"day_of_week": "mon,fri",
"hour": "0, 20",
"minute": "30",
"month": "1,6",
"resource_name_template": "reserve snap of the volume {volume_id}",
"timezone": "UTC",
"week": "1"
}Get schedule
curl --request GET \
--url https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}', 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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "1488e2ce-f906-47fb-ba32-c25a3f63df4f",
"max_quantity": 2,
"owner": "lifecycle_policy",
"owner_id": 1,
"retention_time": {
"days": 0,
"hours": 2,
"minutes": 1,
"weeks": 0
},
"type": "cron",
"user_id": 12,
"day": "5",
"day_of_week": "mon,fri",
"hour": "0, 20",
"minute": "30",
"month": "1,6",
"resource_name_template": "reserve snap of the volume {volume_id}",
"timezone": "UTC",
"week": "1"
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Path Parameters
Project ID
1
Region ID
1
Schedule ID
"1488e2ce-f906-47fb-ba32-c25a3f63df4f"
Response
OK
- GetCronScheduleSerializer
- GetIntervalScheduleSerializer
Schedule ID
"1488e2ce-f906-47fb-ba32-c25a3f63df4f"
Number of stored resources.
x <= 100002
Schedule owner
"lifecycle_policy"
Owner ID
1
Time after which the resource will be deleted
Show child attributes
Show child attributes
Schedule type
"cron""cron"
User ID
12
Day of the month (1-31, '*') or a comma-separated list of days
"5"
Weekday or a comma-separated list of weekdays (mon,tue,wed,thu,fri,sat,sun,*)
"mon,fri"
Hour (0-23, '*') or a comma-separated list of hours
"0, 20"
Minute (0-59, '*') or a comma-separated list of minutes
"30"
Month (1-12, '*') or a comma-separated list of months
"1,6"
Template for resource names
"reserve snap of the volume {volume_id}"
A pytz timezone. Defaults to UTC.
"UTC"
ISO week (1-53, '*') or a comma-separated list of weeks
"1"
Was this page helpful?