# Get Scan Details

This API allows users to retrieve the details of completed or running scans.&#x20;

### Authentication

Response data is subject to user roles and permissions

**Method**: Bearer Token or API Key

**Details**: For bearer token header name should be `X-OpsMx-Auth.`API keys can be generated from the SSD UI.&#x20;

### Request Details

### Endpoint URL

| **Method** | **URL Path**                       |
| ---------- | ---------------------------------- |
| GET        | {host}/ssdservice/v1/scan/filedata |

### Request Headers

| **Header**   | **Description**                 |
| ------------ | ------------------------------- |
| Content-Type | application/json                |
| X-OpsMx-Auth | Bearer Token for authentication |

### CURL Example

{% code overflow="wrap" %}

```
curl --location '{host}/gate/ssdservice/v1/scan/filedata?projectId=0x29ab7&type=sourceScan&scanId=0x29ab8' \
--header 'X-OpsMx-Auth: Bearer <token>'
```

{% endcode %}

### Response Details

#### Success Response (Status Code: 200/201)

{% code overflow="wrap" %}

```
[
    {
        "scanName": "openssf",
        "scanTool": "Openssf",
        "status": "Completed",
        "error": "",
        "metadata": {
            "repoName": "file:///tools/scanResult/unzipped-1525533629",
            "version": "v5.3.0",
            "score": 2.4
        },
        "data": [
            {
                "score": 10,
                "reason": "no binaries found in the repo",
                "name": "Binary-Artifacts",
                "metadata": {
                    "url": "https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts",
                    "short": "Determines if the project has generated executable (binary) artifacts in the source repository."
                }
            }
        ]
    }
]
```

{% endcode %}

#### Error Responses

| **Status Code** | **Description**                                             | **Example Error Response**            |
| --------------- | ----------------------------------------------------------- | ------------------------------------- |
| 400             | Bad Request (Invalid parameters or missing required fields) | {"error": "Invalid input data."}      |
| 401             | Unauthorized (Missing or invalid authentication token)      | {"error": "Authentication required."} |
| 500             | Some issues in Server                                       | {"error": "Resource not found."}      |

\
\
\
\ <br>
