rest_api_settings_get.md 1.78 KB
Newer Older
Nils Bandener's avatar
Nils Bandener committed
1
2
3
4
5
6
7
---
title: Put Destination
html_title: Put a destination with the REST API
slug: elasticsearch-alerting-rest-api-destination-put
category: signals-rest
order: 900
layout: docs
8
edition: beta
Nils Bandener's avatar
Nils Bandener committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
description: 
---

<!--- Copyright 2019 floragunn GmbH -->

# Get Settings API
{: .no_toc}

{% include toc.md %}



## Endpoint

```
GET /_signals/settings
```

```
GET /_signals/settings/{key}
```

Retries all Signals settings or a single setting item.

## Path Parameters

**{key}** The configuration setting to be retrieved. See (Signals Administration)[administration.md] for a list of the available settings.

## Responses

### 200 OK

41
The setting could be successfully retrieved. The value of the settings is returned in the response body. The response format is JSON. This means, that if a setting as a simple textual value, the value will be returned in double quotes. If you specify the header `Accept: text/plain` in the request, you will get a plain text response with unquoted textual values.
Nils Bandener's avatar
Nils Bandener committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

### 403 Forbidden

The user does not have the permission to retrieve settings.

### 404 Not Found

A setting does not exist for the particular key.

## Permissions

For being able to access the endpoint, the user needs to have the privilege `cluster:admin:searchguard:signals:settings/put`.

This permission is included in the following [built-in action groups](security_permissions.md):

* SGS\_SIGNALS\_ALL

## Examples

```
GET /_signals/settings
```

**Response**

```
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
  "active": "true",
  "http": {
    "allowed_endpoints": [
      "https://www.example.com/*",
      "https://intra.example.com/*"
    ]
  },
  "tenant": {
    "_main": {
      "active": "true",
      "node_filter": "node.attr.signals: true"
    }
  }
}
Nils Bandener's avatar
Nils Bandener committed
83
84
```

85
86
87
88
89
90
91
92
93
```
GET /_signals/settings/watchlog.index
```

**Response**

```
"<.signals_log_{now/d}>"
```
Nils Bandener's avatar
Nils Bandener committed
94
95