Reupload
This commit is contained in:
commit
61cbd57af1
168 changed files with 31208 additions and 0 deletions
57
docs/docs/Logs.md
Normal file
57
docs/docs/Logs.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
# Logs
|
||||
|
||||
Logs are text with a date and tags associated with it.
|
||||
|
||||
## API Calls
|
||||
|
||||
You need 2 things to make an api call to create a log:
|
||||
|
||||
- An API Key (generate one from the "Api keys" tab on the left).
|
||||
- The project's `id`, you can copy it by clicking on the clipboard icon at the top of the page.
|
||||
|
||||
### Add a log
|
||||
|
||||
Method: `POST`
|
||||
Url: `/projects/{PROJECT_ID}/logs`
|
||||
Header:
|
||||
```json
|
||||
Authorization: Bearer {API_KEY}
|
||||
```
|
||||
Body:
|
||||
```json
|
||||
{
|
||||
"title": "The title",
|
||||
"content": "More information",
|
||||
"tags": [123456789098765432123456]
|
||||
}
|
||||
```
|
||||
|
||||
The `tags` is an array of `id`, you can find the `id` on the tags config panel on the Logs page.
|
||||
|
||||
### Retrieving all logs
|
||||
|
||||
Method: `GET`
|
||||
Url: `/projects/{PROJECT_ID}/logs`
|
||||
Header:
|
||||
```json
|
||||
Authorization: Bearer {API_KEY}
|
||||
```
|
||||
Response body example:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "647a148a4f68451001cec326",
|
||||
"projectId": "647a146d4f68451001cec323",
|
||||
"title": "The title",
|
||||
"content": "More information",
|
||||
"tags": [
|
||||
{
|
||||
"id": "647a148e4f68451001cec328",
|
||||
"projectId": "647a146d4f68451001cec323",
|
||||
"name": 1685722254142,
|
||||
"color": "#ff00ff"
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
```
|
87
docs/docs/Metrics.md
Normal file
87
docs/docs/Metrics.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Metrics
|
||||
|
||||
Metrics are an easy way to keep track of how things evolve.
|
||||
|
||||
## Use case
|
||||
|
||||
Each time a value change on your app or something else you want to track, you can call the api to
|
||||
update the value, all previous values are stored in a database and can be viewed in the
|
||||
form of a graph on the official web app, or you can call the api to retrieve the data and make your
|
||||
own thing.
|
||||
|
||||
## API Calls
|
||||
|
||||
You need 3 things to make an api call for a metric:
|
||||
|
||||
- An API Key (check this to know how to generate one).
|
||||
- The project's `id`, you can copy it by clicking on the clipboard icon next to the project's name.
|
||||
- The metric's `id`, you can copy it by clicking on the clipboard icon next to the metric's name.
|
||||
|
||||
### Updating a metric
|
||||
|
||||
Method: `PUT`
|
||||
Url: `/projects/{PROJECT_ID}/metrics/{METRIC_ID}`
|
||||
Header:
|
||||
```json
|
||||
Authorization: Bearer {API_KEY}
|
||||
```
|
||||
Body:
|
||||
```json
|
||||
{
|
||||
value: 42
|
||||
}
|
||||
```
|
||||
|
||||
### Retrieving one metric
|
||||
|
||||
Method: `GET`
|
||||
Url: `/projects/{PROJECT_ID}/metrics/{METRIC_ID}`
|
||||
Header:
|
||||
```json
|
||||
Authorization: Bearer {API_KEY}
|
||||
```
|
||||
Response body example:
|
||||
```json
|
||||
{
|
||||
"id": "647a148a4f68451001cec326",
|
||||
"projectId": "647a146d4f68451001cec323",
|
||||
"name": "My metric name",
|
||||
"history": [
|
||||
{
|
||||
"id": "647a148e4f68451001cec328",
|
||||
"metricId": "647a148a4f68451001cec326",
|
||||
"date": 1685722254142,
|
||||
"value": 33
|
||||
}
|
||||
],
|
||||
"currentValue": 33
|
||||
}
|
||||
```
|
||||
|
||||
### Retrieving all metrics
|
||||
|
||||
Method: `GET`
|
||||
Url: `/projects/{PROJECT_ID}/metrics`
|
||||
Header:
|
||||
```json
|
||||
Authorization: Bearer {API_KEY}
|
||||
```
|
||||
Response body example:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "647a148a4f68451001cec326",
|
||||
"projectId": "647a146d4f68451001cec323",
|
||||
"name": "My metric name",
|
||||
"history": [
|
||||
{
|
||||
"id": "647a148e4f68451001cec328",
|
||||
"metricId": "647a148a4f68451001cec326",
|
||||
"date": 1685722254142,
|
||||
"value": 33
|
||||
}
|
||||
],
|
||||
"currentValue": 33
|
||||
}
|
||||
]
|
||||
```
|
5
docs/docs/index.md
Normal file
5
docs/docs/index.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Documentation for Awary
|
||||
|
||||
Awary is a simple software that allows you to **store** data in the form of a **log** or **metric**
|
||||
using HTTP requests, there is no processing of these data.
|
||||
|
27
docs/mkdocs.yml
Normal file
27
docs/mkdocs.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
site_name: Awary documentation
|
||||
theme:
|
||||
name: material
|
||||
palette:
|
||||
|
||||
# Palette toggle for light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
toggle:
|
||||
icon: material/weather-night
|
||||
name: Switch to dark mode
|
||||
|
||||
# Palette toggle for dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
toggle:
|
||||
icon: material/weather-sunny
|
||||
name: Switch to light mode
|
||||
|
||||
markdown_extensions:
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
pygments_lang_class: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
Loading…
Add table
Add a link
Reference in a new issue