<commit_before>This [REST](https://en.wikipedia.org/wiki/Representational_state_transfer)-oriented API is available at the address `/rest/v0`.

### Authentication

A valid authentication token should be attached as a cookie to all HTTP
requests:

```http
GET /rest/v0 HTTP/1.1
Cookie: authenticationToken=<KEY>
```

The server will respond to an invalid token with a `401 Unauthorized` status.

The server can request the client to update its token with a `Set-Cookie` header:

```http
HTTP/1.1 200 OK
Set-Cookie: authenticationToken=<KEY>
```

Usage with cURL:

```
curl -b authenticationToken=KQxQdm2vMiv7jBIK0hgkmgxKzemd8wSJ7ugFGKFkTbs https://xo.company.lan/api/proxy/v0
```

You can use `xo-cli` to create an authentication token:

```
> xo-cli --createToken xoa.company.lan <EMAIL>
Password: ********
Successfully logged with <EMAIL>
Authentication token created

DiYBFavJwf9GODZqQJs23eAx9eh3KlsRhBi8RcoX0KM
```

### Collections

Collections of objects are available at `/<name>` (e.g. `/vms`)<commit_msg>fix(xo-server/docs): fix REST API path<commit_after>This [REST](https://en.wikipedia.org/wiki/Representational_state_transfer)-oriented API is available at the address `/rest/v0`.

### Authentication

A valid authentication token should be attached as a cookie to all HTTP
requests:

```http
GET /rest/v0 HTTP/1.1
Cookie: authenticationToken=<KEY>
```

The server will respond to an invalid token with a `401 Unauthorized` status.

The server can request the client to update its token with a `Set-Cookie` header:

```http
HTTP/1.1 200 OK
Set-Cookie: authenticationToken=<KEY>
```

Usage with cURL:

```
curl -b authenticationToken=KQxQdm2vMiv7jBIK0hgkmgxKzemd8wSJ7ugFGKFkTbs https://xo.company.lan/rest/v0/
```

You can use `xo-cli` to create an authentication token:

```
> xo-cli --createToken xoa.company.lan <EMAIL>
Password: ********
Successfully logged with <EMAIL>
Authentication token created

<KEY>
```

### Collections

Collections of objects are available at `/<name>` (e.g. `/vms`)
{'fraction_non_alphanumeric': 0.12219451371571072, 'fraction_numerical': 0.02144638403990025, 'mean_word_length': 5.09726443768997, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 16, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4210455', 'n_tokens_mistral': 714, 'n_tokens_neox': 671, 'n_words': 207}