# Tools

Tools service exposes some "tool"-like methods

## Methods

## ConvertToDocument

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.Tools/ConvertToDocument`

Method to convert NewsML to Document

#### Request Body

| Name   | Type   | Description                    |
| ------ | ------ | ------------------------------ |
| newsml | string | Full XML NewsML based document |

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

```
```

{% endtab %}
{% endtabs %}

## ConvertToNewsml

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.Tools/ConvertToNewsml`

Convert Document to NewsML

#### Request Body

| Name     | Type            | Description          |
| -------- | --------------- | -------------------- |
| document | naviga.Document | A Naviga Doc in JSON |

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

```
```

{% endtab %}
{% endtabs %}

## ValidateNavigaDoc

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.Tools/ValidateNavigaDoc`

Validate NavigaDoc document JSON against JSON schema

#### Request Body

| Name     | Type            | Description |
| -------- | --------------- | ----------- |
| document | naviga.Document |             |

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

```
```

{% endtab %}
{% endtabs %}

api-method-response endapi-method-response

## Enums

**cca.DownloadType** DownloadType can be passed as a parameter when downloading assets

```
TYPE_UNKNOWN
TYPE_ORIGINAL
TYPE_PRESENTATION
```

**cca.LockingMode** Locking mode is passed as a parameter when saving documents

```
NONE
OPTIMISTIC_LOCKING
PESSIMISTIC_LOCKING
```

**cca.ProcessingStatus**

```
UNKNOWN
IN_PROGRESS
DONE
ERROR
```
