---
title: "Query scheduled services"
method: GET
path: "/v1/projects/{project_id}/scheduled_services"
tags: ["Service"]
---

# Query scheduled services

`GET /v1/projects/{project_id}/scheduled_services`

## Request

- Base URL: `https://api.telerivet.com`
- URL: `https://api.telerivet.com/v1/projects/{project_id}/scheduled_services`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://telerivet.com/oauth/authorize`, token URL `https://api.telerivet.com/oauth/token`)

Queries scheduled services within the given project.

## Path parameters

- `project_id` string, required

## Query parameters

- `service_id` string: ID of Service
- `time_created` integer: Unix timestamp in seconds
- `next_time` integer: Unix timestamp in seconds
- `sort` 'default' | 'next_time'
- `sort_dir` 'asc' | 'desc'
- `page_size` integer
- `offset` integer
- `marker` string
- `count` boolean

## Response `200`

Successful response. When count=1 parameter is provided, returns {"count": N} instead.

- object
  - `data` ScheduledService[]: Array of results (omitted when count=1)
    - `id` string: ID of the scheduled service
    - `service_id` string: ID of the service to be triggered
    - `rrule` string: Recurrence rule for recurring scheduled services, e.g. 'FREQ=MONTHLY' or 'FREQ=WEEKLY;INTERVAL=2'; see [RFC2445](https://tools.ietf.org/html/rfc2445#section-4.3.10).
    - `timezone_id` string: Timezone ID used to compute times for recurring scheduled services; see [List of tz database time zones Wikipedia article](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
    - `time_created` integer: Time the scheduled service was created in Telerivet
    - `start_time` integer: The time that the service will be triggered (or first triggered for recurring scheduled services)
    - `end_time` integer, nullable: Time after which a recurring scheduled service will stop (not applicable to non-recurring scheduled services)
    - `prev_time` integer, nullable: The most recent time that Telerivet triggered this scheduled service (null if it has never been triggered)
    - `next_time` integer, nullable: The next upcoming time that Telerivet will trigger this scheduled service (null if it will not be triggered again)
    - `occurrences` integer: Number of times this scheduled service has already been triggered
    - `vars` object: Custom variables stored for this scheduled service. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.
    - `project_id` string: ID of the project this scheduled service belongs to
  - `truncated` boolean: True if there are more results
  - `next_marker` string: Marker for pagination
  - `page_size` integer: Number of results per page
  - `sort_dir` 'asc' | 'desc': Sort direction
  - `count` integer: Total count of matching items (only when count=1 parameter is provided)

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key or Bearer token
- `404`: Resource not found

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
