# RichTextToConfluenceWiki

## 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/richtext-to-confluence-wiki HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
```

### Body

**custom\_key (string)**

A user-supplied custom key with a rich-text string supplied as the value. Multiple custom key/value pairs can be included within the object.

Example:

```
{
   "vuln_recommendation": "<h1>Validation rules:</h1><p>Proper validation, file type restrictions, size limits, and permission controls are essential to mitigate this vulnerability.</p><p>At this time the only check of file validity seems to be if it ends in '.jpg' (or other image type) and this is easy for an attacker to bypass.</p><p>Here are some examples of other validation checks that could be used...</p>"
}
```

## Example

The following example is a cURL request to convert a custom value from rich-text to Confluence Wiki markup.

### Request

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

```
curl -X POST 'https://demo.attackforge.com/api/ss/utils/richtext-to-confluence-wiki' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "vuln_recommendation": "<h1>Validation rules:</h1><p>Proper validation, file type restrictions, size limits, and permission controls are essential to mitigate this vulnerability.</p><p>At this time the only check of file validity seems to be if it ends in '.jpg' (or other image type) and this is easy for an attacker to bypass.</p><p>Here are some examples of other validation checks that could be used...</p>"
}'
```

### Response

Response contains a Confluence Wiki markup object.

```
{
   "vuln_recommendation": "h1. Validation rules:\nProper validation, file type restrictions, size limits, and permission controls are essential to mitigate this vulnerability.\nAt this time the only check of file validity seems to be if it ends in '.jpg' (or other image type) and this is easy for an attacker to bypass.\nHere are some examples of other validation checks that could be used..."
}
```


---

# 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/richtexttoconfluencewiki.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.
