Skip to main content
GET
/
functions
/
schedules
/
{scheduleId}
Retrieve a function schedule by its id
curl --request GET \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}', 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://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}",
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: Bearer <token>"
],
]);

$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://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/functions/schedules/{scheduleId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": 4503599627370496,
  "name": "My schedule",
  "createdTime": 1730204346000,
  "cronExpression": "* * * * *",
  "when": "Every hour",
  "functionId": 4503599627370496,
  "sessionId": "<string>",
  "description": "This is a nice schedule"
}
{
"error": {
"code": 401,
"message": "Could not authenticate.",
"missing": [
{}
],
"duplicated": [
{}
]
}
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

scheduleId
integer
required

The function schedule id.

Response

OK

id
integer<int64>
required

A server-generated ID for the object.

Required range: 1 <= x <= 9007199254740991
name
string
required

Name of function schedule.

Required string length: 1 - 140
Example:

"My schedule"

createdTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

cronExpression
string
required

Cron expression describes when the function should be called. Use http://www.cronmaker.com to create a cron expression.

Maximum string length: 1024
Example:

"* * * * *"

when
string
required

When the schedule will trigger, in human readable text.

Example:

"Every hour"

functionId
integer<int64>
required

A server-generated ID for the object.

Required range: 1 <= x <= 9007199254740991
sessionId
string
required

Id of the session.

description
string

Description of function schedule.

Maximum string length: 500
Example:

"This is a nice schedule"

Last modified on July 13, 2026