# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rest-api.symphony.com/main/malware-scanner/malware-scnanner-apis/file-malware-scanner-state.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
