You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The th2-cradle-admin is a set of projects for managing books and pages in th2 storage.
4
+
5
+
## th2-cradle-admin-tool (th2 component)
6
+
7
+
The th2-cradle-admin-tool is th2 component which allows to manage books and pages via configuration automatically or via REST API manually
8
+
9
+
### Configuration
10
+
11
+
```yaml
12
+
apiVersion: th2.exactpro.com/v2
13
+
kind: Th2CoreBox
14
+
metadata:
15
+
name: cradle-admin
16
+
spec:
17
+
imageName: ghcr.io/th2-net/th2-cradle-admin-tool
18
+
imageVersion: 1.9.0-dev
19
+
type: th2-conn
20
+
customConfig:
21
+
ip: 0.0.0.0
22
+
port: 8080
23
+
page-recheck-interval: 60
24
+
auto-book: true
25
+
auto-pages:
26
+
test_book:
27
+
page-duration: "P1D"
28
+
page-start-time: "1970-00-00T00:00:00.000Z"
29
+
extendedSettings:
30
+
service:
31
+
enabled: true
32
+
ingress:
33
+
urlPaths:
34
+
- /cradle-admin/
35
+
```
36
+
37
+
### REST API
38
+
39
+
#### View
40
+
41
+
* `/get-all-books` - returns all existed books
42
+
* `/get-book-info?book-id=test_book&with-pages=false&load-removed-pages` - returns information by arguments:
43
+
* `book-id` - name (id) of requested book (required). You can specify multiple `book-id` arguments
44
+
* `with-pages` - controls respond information about pages (optional)
45
+
* `load-removed-pages` - this flag controls respond information about pages marked as removed (optional)
46
+
47
+
#### Book management
48
+
49
+
* `/new-book?book-name=test_book&created-time=1970-00-00T00:00:00.000Z&full-name=test_book&desc=first_book&first-page-name=first_page` - creates new a book by arguments:
50
+
* `book-name` - name (id) of new book (required)
51
+
* `full-name` - extended book name (optional)
52
+
* `desc` - description for book (optional)
53
+
* `first-page-name` - name of the first page (optional). You can add page later
54
+
55
+
#### Page management
56
+
57
+
* `/new-page?book-id=test_book&page-name=first_page&page-start=1970-00-00T00:00:00.000Z&page-comment=my_first_page` - crates a new page by arguments:
58
+
* `book-id` - name (id) where the new page will be created (required).
59
+
* `page-name` - name of the new page (optional). If you miss this argument, name is generated automatically
60
+
* `page-start` - start time of the new page (required)
61
+
* `page-comment` - comment for the new page (optional)
62
+
* `/remove-page?book-id=test_book&page-name=first_page` - removes a page by arguments:
63
+
* `book-id` - name (id) where the removed page is (required).
64
+
* `page-name` - name of the removed page (required).
0 commit comments