# ParseCSVData

## Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

### Headers

```
POST /api/ss/utils/parse-csv HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
```

### Body

**base64&#x20;*****(string)***

Base64 encoded CSV data.

Example:

```json
{
   "base64": "QXNzZXQsVnVsbgphdHRhY2tmb3JnZS5jb20sSFNUUyBIZWFkZXIgTWlzc2luZw=="
}
```

**options&#x20;*****(object) (optional)***

* **columns -** whether to include columns as keys in the response. The first row of CSV data will act as the columns/keys.
* **delimiter** - default delimiter is comma. Set a custom delimiter if required.

Example:

```json
{
   "columns": true,
   "delimiter": ";"
}
```

## Example

The following example is a cURL request to convert a CSV data to JSON.

### Request

Include API Token instead of stars in 'X-SSAPI-KEY: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*' parameter.

```
curl -X POST 'https://demo.attackforge.com/api/ss/utils/parse-csv' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "base64": "QXNzZXQsVnVsbgphdHRhY2tmb3JnZS5jb20sSFNUUyBIZWFkZXIgTWlzc2luZw==",
  "options": {
    "columns": true
  }
}'
```

### Response

Returns a JSON object with CSV data as records.

```json
{
   "records": [
      {
         "some_key": "some_value"
      }
    ]
}
```


---

# 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://support.attackforge.com/attackforge-enterprise/modules/self-service-restful-api/parsecsvdata.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.
