> For the complete documentation index, see [llms.txt](https://rest-api.symphony.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rest-api.symphony.com/main/malware-scanner/malware-scnanner-apis/file-malware-scanner-state.md).

# File Malware Scanner State

Implemented by Symphony, the API is exposed on the customer's pod. It retrieves a file malware scan high-level state. The calling service account should have 'Malware Scan State User' role to make this call.&#x20;

Possible values: `OK`, `BAD`, `PENDING`.&#x20;

Customers can use this API to get the current malware-scan state of a file.

* `OK` - Malware Scan state is ok. The file can be downloaded.
* `BAD` - Malware Scan determined the file to be bad. Errors in malware scanning, after the retry attempts have exhausted or wait-time elapsed, also result in this final state. The file cannot be downloaded.
* `PENDING` - Malware Scan is still in progress. Temporary errors in malware scanning workflow will also result in this state. The file cannot be downloaded.

## Retrieves the current malware scan state of a file from the pod.

<mark style="color:blue;">`GET`</mark> `https://your-pod-subdomain.symphony.com/maestro/api/v1/attachments/malware-scan/state`

Implemented by Symphony, the API is exposed on the customer's pod. It retrieves a file malware scan high-level state. The calling service account should have 'Malware Scan State User' role to make this call. Possible values: OK, BAD, PENDING. Customers can use this API to get the current malware-scan state of a file.

OK - Malware Scan state is ok. The file can be downloaded. BAD - Malware Scan determined the file to be bad. Errors in malware scanning, after the retry attempts have exhausted or wait-time elapsed, also result in this final state. The file cannot be downloaded. PENDING - Malware Scan is still in progress. Temporary errors in malware scanning workflow will also result in this state. The file cannot be downloaded.

#### Query Parameters

| Name                                     | Type   | Description                                                                              |
| ---------------------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| fileId<mark style="color:red;">\*</mark> | string | Id of the file for which malware scan state will be retrieved. It should be URL encoded. |

#### Headers

| Name                                           | Type   | Description                   |
| ---------------------------------------------- | ------ | ----------------------------- |
| sessionToken<mark style="color:red;">\*</mark> | string | Authentication session token. |

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

```javascript
{
  "status": "OK",
  "details": null
}
```

{% endtab %}

{% tab title="200: OK Bad" %}

```javascript
{
  "status": "BAD",
  "details": null
}
```

{% endtab %}

{% tab title="200: OK Pending" %}

```javascript
{
  "status": "PENDING",
  "details": null
}
```

{% endtab %}

{% tab title="400: Bad Request Result" %}

```javascript
//Malware Scan is not available. See response body for further details.
```

{% endtab %}

{% tab title="500: Internal Server Error Result" %}

```javascript
//An error occurred while getting a file. See response body for further details.
```

{% endtab %}
{% endtabs %}
