> This page is for Itential Platform Cloud.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Search schedules

POST https://example.itential.io/trigger-service/service-schedules/search
Content-Type: application/json

Filters (all must match):

- `createdBy`, `status`: `equals`
- `nextRun`, `lastRun`: `before` or `after`
- `serviceId`: `in` with a non-empty string array. IDs that match no service match nothing.

Sorts: `nextRun`, `lastRun`, `createdAt`, and `serviceName`. The default is `nextRun`, ascending. Services with the same name are ordered by ID, in either direction.

Scope: only schedules of services the caller can read are returned, whatever the filter.

Reference: https://docs.itential.com/itential-cloud/api-reference/trigger-service/service-schedules-search-schedules

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Body (application/json)

This endpoint expects an object.

- `filters` (list of TriggerServiceServiceSchedulesSearchPostRequestBodyContentApplicationJsonSchemaFiltersItems, optional) — Filter criteria. All filters must match (logical AND).
- `sort` (TriggerServiceServiceSchedulesSearchPostRequestBodyContentApplicationJsonSchemaSort, optional)
- `skip` (double, optional) — Number of items to skip. Defaults to 0.
- `limit` (double, optional) — Number of items to return (1-100). Defaults to 25.

## Response

### 200

result

- `data` (list of TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItems, required) — The schedules on this page.

## Errors

### 500 Internal Server Error

Error response from API

- `any`

## Types

### TriggerServiceServiceSchedulesSearchPostRequestBodyContentApplicationJsonSchemaFiltersItems

- `field` (enum, required) — The field name to filter on.
  - Allowed values: `createdBy`, `status`, `nextRun`, `lastRun`, `serviceId`
- `operator` (enum, required) — The filter operator.
  - Allowed values: `contains`, `equals`, `in`, `before`, `after`, `between`
- `value` (string, required) — The filter value. Can be a string, array of strings, or null.

### TriggerServiceServiceSchedulesSearchPostRequestBodyContentApplicationJsonSchemaSort

- `field` (enum, required) — The field to sort by.
  - Allowed values: `nextRun`, `lastRun`, `createdAt`, `serviceName`
- `order` (enum, required) — The sort direction.
  - Allowed values: `asc`, `desc`

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItems

- `scheduleId` (string, required) — Identifier of the schedule.
- `serviceName` (string, required) — Name of the service the schedule requests.
- `triggerSetEnabled` (boolean, required) — Master switch that determines whether the trigger and any services associated with it can fire. When false, they cannot fire, regardless of this schedule's own status.
- `createdBy` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsCreatedBy, required) — The user who created the schedule. `principalId` is `Pronghorn` when no creator is recorded.
- `status` (enum, required) — `active` fires as scheduled; `paused` was stopped by a user; `completed` fired its last occurrence; `expired` ended without firing its last occurrence.
  - Allowed values: `active`, `paused`, `completed`, `expired`
- `scheduleType` (enum, required) — `recurring` repeats on its schedule; `concrete` fires once, at `concreteDate`.
  - Allowed values: `concrete`, `recurring`
- `schedule` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsSchedule, optional) — How a recurring schedule repeats, and its start and end, in the same shape as the schedule detail. Absent for a `concrete` schedule. The response carries no text for it: a client words it.
- `concreteDate` (string, optional) — The instant a `concrete` schedule fires, ISO 8601 in UTC. Set only when `scheduleType` is `concrete`.
- `lastRun` (string, optional) — When the schedule last fired, ISO 8601 in UTC. Absent if it has never fired.
- `nextRun` (string, optional) — When the schedule is next due, ISO 8601 in UTC. Present only while the status is `active`.

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsCreatedBy

The user who created the schedule. `principalId` is `Pronghorn` when no creator is recorded.

- `principalId` (string, required) — Identifier of the account.
- `displayName` (string, optional) — The account's username. Absent when the account no longer exists, or when it could not be looked up.
- `inactive` (boolean, optional) — Whether the account has been deactivated. Present only when the account was found: `true` for a deactivated account, `false` for an active one. Absent, like `displayName`, when the account no longer exists or could not be looked up; treat absence as not deactivated.
- `email` (string, optional) — The account's email address. Present only when the account was found and has an email recorded; absent, like `displayName`, when the account no longer exists, could not be looked up, or has no email.

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsSchedule

How a recurring schedule repeats, and its start and end, in the same shape as the schedule detail. Absent for a `concrete` schedule. The response carries no text for it: a client words it.

- `recurrence` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrence, required) — How the schedule repeats.
- `startsAt` (string, optional) — The schedule does not fire before this instant, ISO 8601 in UTC.
- `endsAt` (string, optional) — The schedule does not fire after this instant, ISO 8601 in UTC. Absent when the schedule is limited to a number of occurrences (`maxOccurrences`), because its end follows from that limit.
- `maxOccurrences` (double, optional) — The number of occurrences the schedule was limited to, if it was. Absent when it ends on a date or never.

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrence

How the schedule repeats.

- `kind` (enum, required) — How the schedule repeats: `cron`, `periodic`, `daily`, `weekly` or `monthly`.
  - Allowed values: `cron`, `periodic`, `daily`, `weekly`, `monthly`
- `cron` (string, optional) — The cron expression, evaluated in UTC. Present when `kind` is `cron`.
- `every` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceEvery, optional) — How often the schedule runs. Present when `kind` is `periodic`.
- `window` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceWindow, optional) — The stretch of the day the schedule runs in. Absent when it runs through the whole day. Present only when `kind` is `periodic`.
- `everyDays` (double, optional) — Days between runs: 1 for every day, 2 for every other day. Present when `kind` is `daily`.
- `everyWeeks` (double, optional) — Weeks between runs: 1 for every week, 2 for every other week. Present when `kind` is `weekly`.
- `weekdays` (list of enum, optional) — Days of the week the schedule runs on. Present when `kind` is `weekly`, and when `kind` is `periodic` and days were chosen.
  - Allowed values: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`
- `months` (list of double, optional) — Months the schedule fires in, 1 (January) to 12 (December). Present when `kind` is `monthly`.
- `on` (TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceOn, optional) — Which day of the month the schedule fires on. Present when `kind` is `monthly`.
- `at` (string, optional) — Time of day in UTC, written HH:mm. Present when `kind` is `daily`, `weekly` or `monthly`.

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceEvery

How often the schedule runs. Present when `kind` is `periodic`.

- `quantity` (double, required) — How many seconds, minutes or hours between runs.
- `unit` (enum, required) — Whether `quantity` counts `seconds`, `minutes` or `hours`.
  - Allowed values: `seconds`, `minutes`, `hours`

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceWindow

The stretch of the day the schedule runs in. Absent when it runs through the whole day. Present only when `kind` is `periodic`.

- `from` (string, required) — When the window opens each day, in UTC, written HH:mm.
- `to` (string, required) — When the window closes, in UTC, written HH:mm. A time earlier than `from` closes it the next morning.

### TriggerServiceServiceSchedulesSearchPostResponsesContentApplicationJsonSchemaDataItemsScheduleRecurrenceOn

Which day of the month the schedule fires on. Present when `kind` is `monthly`.

- `kind` (enum, required) — How the day is chosen: `dayOfMonth` for a fixed date, `nthWeekday` for a counted weekday such as the first Tuesday, `lastDay` for the last day of the month.
  - Allowed values: `dayOfMonth`, `nthWeekday`, `lastDay`
- `day` (double, optional) — Day of the month, 1 to 31. A month too short for it uses its last day. Present when `kind` is `dayOfMonth`.
- `ordinal` (enum, optional) — Which occurrence of the weekday in the month. Present when `kind` is `nthWeekday`.
  - Allowed values: `first`, `second`, `third`, `fourth`, `last`
- `weekday` (enum, optional) — Day of the week. Present when `kind` is `nthWeekday`.
  - Allowed values: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "scheduleId": "string",
      "serviceName": "string",
      "triggerSetEnabled": true,
      "createdBy": {
        "principalId": "string",
        "displayName": "string",
        "inactive": true,
        "email": "string"
      },
      "status": "active",
      "scheduleType": "concrete",
      "schedule": {
        "recurrence": {
          "kind": "cron",
          "cron": "string",
          "every": {
            "quantity": 1.1,
            "unit": "seconds"
          },
          "window": {
            "from": "string",
            "to": "string"
          },
          "everyDays": 1.1,
          "everyWeeks": 1.1,
          "weekdays": [
            "sun"
          ],
          "months": [
            1.1
          ],
          "on": {
            "kind": "dayOfMonth",
            "day": 1.1,
            "ordinal": "first",
            "weekday": "sun"
          },
          "at": "string"
        },
        "startsAt": "string",
        "endsAt": "string",
        "maxOccurrences": 1.1
      },
      "concreteDate": "string",
      "lastRun": "string",
      "nextRun": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://example.itential.io/trigger-service/service-schedules/search"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://example.itential.io/trigger-service/service-schedules/search';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://example.itential.io/trigger-service/service-schedules/search"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://example.itential.io/trigger-service/service-schedules/search")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://example.itential.io/trigger-service/service-schedules/search")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://example.itential.io/trigger-service/service-schedules/search', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://example.itential.io/trigger-service/service-schedules/search");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://example.itential.io/trigger-service/service-schedules/search")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```