Skip to content

Commit

Permalink
Some minor README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Oct 8, 2024
1 parent ea3a988 commit 7b567ab
Showing 1 changed file with 40 additions and 24 deletions.
64 changes: 40 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# web
# tmt web

Web application for checking tmt tests, plans and stories.

Expand All @@ -10,7 +10,7 @@ To run the service locally for development purposes, use the following command:
podman-compose up --build
```

add `-d` for the service to run in the background
Add `-d` for the service to run in the background.

## Tests

Expand All @@ -30,36 +30,52 @@ rebuild, start the service and run the tests.
- `API_HOSTNAME` - *required*, specifies the hostname of the API, used for
creating the callback URL to the service

# API
API for checking tmt tests and plans metadata
## Version
The API version is defined by prefix in url, e.g.
`/v0.1/status`
## Endpoints
* `/` - returns ID of the created Celery task with additional metadata in JSON and callback url for `/status` endpoint,
returns the same in HTML format if `format` is set to `html`
* `test-url` - URL of the repo test is located in - accepts a `string`
## API

The API version is defined by prefix in url, e.g. `/v0.1/status`.

If we want to display metadata for both tests and plans, we can combine
the `test-*` and `plan-*` options together, they are not mutually
exclusive.

`test-url` and `test-name`, or `plan-url` and `plan-name` are required.

* `test-ref` - Ref of the repository the test is located in - accepts a `string`,
defaults to default branch of the repo
### `/`

Returns ID of the created Celery task with additional metadata in JSON
and callback url for `/status` endpoint, returns the same in HTML format
if `format` is set to `html`.

* `test-url` - URL of the repo test is located in - accepts a `string`
* `test-ref` - Ref of the repository the test is located in - accepts
a `string`, defaults to default branch of the repo
* `test-path` - Points to directory where `fmf` tree is stored
* `test-name` - Name of the test - accepts a `string`

* `plan-url` - URL of the repo plan is located in - accepts a `string`

* `plan-ref` - Ref of the repository the plan is located in - accepts a `string`,
defaults to default branch of the repo
* `plan-ref` - Ref of the repository the plan is located in - accepts
a `string`, defaults to default branch of the repo
* `plan-path` - Points to directory where `fmf` tree is stored
* `plan-name` - Name of the plan - accepts a `string`
* `format` - Format of the output - accepts a `string`, default is `json`, other options are `xml`, `html`
(serves as a basic human-readable output format)

* `format` - Format of the output - accepts a `string`, default is
`json`, other options are `xml`, `html` (serves as a basic
human-readable output format)
* `id` - Unique ID of the tmt object
* `/status` - returns a status of the tmt object being processed by the backend

### `/status`

Returns a status of the tmt object being processed by the backend.

* `task_id` - ID of the task - accepts a `string`
* `/status/html` - returns a status of the tmt object being processed by the backend in a simple HTML formatting

### `/status/html`

Returns a status of the tmt object being processed by the backend in a
simple HTML formatting.

* `task_id` - ID of the task - accepts a `string`
* `/health` - returns a health status of the service

If we want to display metadata for both tests and plans, we can combine the `test-*`
and `plan-*` options together, they are not mutually exclusive.
### `/health`

`test-url` and `test-name`, or `plan-url` and `plan-name` are required.
Returns a health status of the service.

0 comments on commit 7b567ab

Please sign in to comment.