<commit_before>

# mohawk/examples/rest

![Mohawk](/images/logo-128.png?raw=true "Mohawk Logo")

Mohawk is a metric data storage engine that uses a plugin architecture for data storage and a simple REST API as the primary interface.

## Examples

For usage information look at the [example](/examples) directory.

## REST API

#### Prefix: "/hawkular/metrics/"

| Method | Path           | Description             |
|--------|----------------|-------------------------|
| GET    | status         | Query server status     |
| GET    | tenants        | Query a list of tenants |
| GET    | metrics        | Query a list of metrics |

#### Prefix: "/hawkular/metrics/gauges/"

| Method | Path           | Description                    |
|--------|----------------|--------------------------------|
| GET    | :id/raw        | Query metric data              |
| POST   | raw            | Insert new metric data         |
| POST   | raw/query      | Query multiple metric data     |
| PUT    | :id/tags       | Update metric tags             |

## Data Structures

#### Item

	Id         string            `json:"id"`
	Type       string            `json:"type"`
	Tags       map[string]string `json:"tags"`
	LastValues []DataItem        `json:"data"`

#### DataItem

	Timestamp int64   `json:"timestamp"`
	Value     float64 `json:"value"`

#### StatItem
<commit_msg>Update REST.md<commit_after>

# mohawk/examples/rest

![Mohawk](/images/logo-128.png?raw=true "Mohawk Logo")

Mohawk is a metric data storage engine that uses a plugin architecture for data storage and a simple REST API as the primary interface.

## Examples

For usage information look at the [example](/examples) directory.

## REST API

#### Prefix: "/hawkular/metrics/"

| Method | Path           | Description             |
|--------|----------------|-------------------------|
| GET    | status         | Query server status     |
| GET    | tenants        | Query a list of tenants |
| GET    | metrics        | Query a list of metrics |

#### Prefix: "/hawkular/metrics/gauges/"

| Method | Path           | Description                    |
|--------|----------------|--------------------------------|
| GET    | :id/raw        | Query metric data              |
| POST   | raw/query      | Query multiple metric data     |
| PUT    | :id/tags       | Update metric tags             |
| PUT    | tags           | Update multiple metric tags    |
| POST   | raw            | Insert new metric data         |

## Data Structures

#### Item

	Id         string            `json:"id"`
	Type       string            `json:"type"`
	Tags       map[string]string `json:"tags"`
	LastValues []DataItem        `json:"data"`

#### DataItem

	Timestamp int64   `json:"timestamp"`
	Value     float64 `json:"value"`

#### StatItem

{'fraction_non_alphanumeric': 0.18341708542713567, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 1.5877437325905293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6025262', 'n_tokens_mistral': 774, 'n_tokens_neox': 728, 'n_words': 235}