# Noticelist

#### Get a list of noticelists

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/warninglists</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
[
  {
    "Noticelist": {
      "id": "3",
      "name": "List of known domains to know external IP",
      "type": "cidr",
      "description": "string",
      "version": "10",
      "enabled": true,
      "warninglist_entry_count": "1234",
      "valid_attributes": "domain, hostname, domain|ip, uri, url",
      "NoticelistEntry": [
        {
          "id": "1234",
          "noticelist_id": "3",
          "data": {
            "scope": [
              "attribute"
            ],
            "field": [
              "category"
            ],
            "value": [
              "Person"
            ],
            "tags": [
              "tlp:white"
            ],
            "message": {
              "en": "This attribute is likely to contain personal data and the data subject is likely to be directly identifiable."
            }
          }
        }
      ]
    }
  }
]
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```

#### Get a noticelist by ID:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/warninglists</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "Noticelist": {
    "id": "3",
    "name": "List of known domains to know external IP",
    "type": "cidr",
    "description": "string",
    "version": "10",
    "enabled": true,
    "warninglist_entry_count": "1234",
    "valid_attributes": "domain, hostname, domain|ip, uri, url",
    "NoticelistEntry": [
      {
        "id": "1234",
        "noticelist_id": "3",
        "data": {
          "scope": [
            "attribute"
          ],
          "field": [
            "category"
          ],
          "value": [
            "Person"
          ],
          "tags": [
            "tlp:white"
          ],
          "message": {
            "en": "This attribute is likely to contain personal data and the data subject is likely to be directly identifiable."
          }
        }
      }
    ]
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```

#### Enable/disable noticelist:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/warninglists</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Noticelist enabled.",
  "message": "Noticelist enabled.",
  "url": "/noticelists/toggleEnable/1"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```

#### Update noticelists:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/noticelists/update</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Successfully updated 1 noticelists.",
  "message": "Successfully updated 1 noticelists.",
  "url": "/noticelists/update"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```

####  