> For the complete documentation index, see [llms.txt](https://sitasys-ag.gitbook.io/evalink-talos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sitasys-ag.gitbook.io/evalink-talos/management-api/manage-schedules.md).

# Manage schedules

## Introduction

Schedules can be set to define a timeslot. You can define workflows based on these schedules.

Example:\
You can define, that in case of an alarm the call is sent to a different recipient, based on the schedule. Through opening hours it’s sent to your in-house security, through closed hours it,s sent to a private ARC.

## create new schedules

<mark style="color:green;">`POST`</mark> `https://talos-app.io/api/schedule-service/schedules`

Use this endpoint to create a new schedule in a service.

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "activateAlarm": "string",
  "buffer": 0,
  "companyId": "string",
  "createdAt": 0,
  "deactivateAlarm": "string",
  "deviceGroupId": "string",
  "deviceId": "string",
  "entityStatus": "string",
  "entries": [
    {
      "autoDelete": true,
      "autoDeleteAt": 0,
      "dayOfWeek": "FRIDAY",
      "endDate": "string",
      "endTime": "string",
      "entryType": "DATE",
      "id": "string",
      "specialDayId": "string",
      "startDate": "string",
      "startTime": "string"
    }
  ],
  "excludedCount": 0,
  "excludedSchedulesPreview": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "id": "string",
  "includedCount": 0,
  "includedSchedulesPreview": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "links": {
    "empty": true
  },
  "name": "string",
  "nextActivateAlarm": 0,
  "nextDeactivateAlarm": 0,
  "rolesPreview": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "timeZone": "string",
  "updatedAt": 0,
  "updatedBy": "string",
  "usageCount": 0
}
```

{% endtab %}
{% endtabs %}

## list the schedules by device ID

<mark style="color:blue;">`GET`</mark> `https://talos-app.io/api/schedule-service/schedules/search/findByDeviceId{deviceId}`

Use this endpoint to list the schedules by their device id.

#### Query Parameters

| Name     | Type   | Description                              |
| -------- | ------ | ---------------------------------------- |
| deviceId | string | The ID of the device you want to access. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## delete the schedules

<mark style="color:red;">`DELETE`</mark> `https://talos-app.io/api/schedule-service/schedules/{id}`

Use this endpoint to delete the schedules.

#### Path Parameters

| Name | Type   | Description               |
| ---- | ------ | ------------------------- |
| id   | string | The relevant schedule ID. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## list the special days by companyId

<mark style="color:blue;">`GET`</mark> `https://talos-app.io/api/schedule-service/special-days/search/findByCompanyId{companyId}`

Use this endpoint to list the special days.

#### Query Parameters

| Name      | Type   | Description                             |
| --------- | ------ | --------------------------------------- |
| companyId | string | The company Id of the required company. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "_embedded": {
    "specialDays": [
      {
        "companyId": "string",
        "date": "string",
        "dayType": "FIX",
        "id": "string",
        "name": "string",
        "rule": "string"
      }
    ]
  },
  "_links": {}
}
```

{% endtab %}
{% endtabs %}

## create new special days

<mark style="color:green;">`POST`</mark> `https://talos-app.io/api/schedule-service/special-days`

Use this endpoint to create new special days within the scheduled service.

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{
  "companyId": "string",
  "date": "string",
  "dayType": "FIX",
  "id": "string",
  "links": {
    "empty": true
  },
  "name": "string",
  "rule": "string"
}
```

{% endtab %}
{% endtabs %}

```
{
  "companyId": "string",
  "date": "string",
  "dayType": "FIX",
  "id": "string",
  "name": "string",
  "rule": "string"
}
```

## delete the special days

<mark style="color:red;">`DELETE`</mark> `https://talos-app.io/api/schedule-service/special-days/{id}`

Use this endpoint to delete the special days from the scheduled service.

#### Path Parameters

| Name | Type   | Description                   |
| ---- | ------ | ----------------------------- |
| id   | string | The required special days ID. |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | string | Use "Bearer" followed by your API Token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
