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
Copy file name to clipboardExpand all lines: doc/http_api.md
+29-15Lines changed: 29 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,18 +20,20 @@ The API is designed around 3 main concepts: *system*, *config* and *proposal*.
20
20
The *config* contains elements that can modify the *system*, the *proposal* or both. For example, the *dasd* config changes the *system*, and the *storage* config changes the *proposal*. In other cases like *network*, the config can affect to both *system* and *proposal*.
21
21
22
22
~~~
23
+
GET /status
23
24
GET /system
24
25
GET /extended_config
25
-
GET /extended_config/{scope}
26
26
GET PUT PATCH /config
27
-
GET PUT PATCH /config/{scope}
28
27
GET POST PATCH /questions
29
28
GET /proposal
30
-
GET /status
31
29
GET /issues
32
30
POST /action
33
31
~~~
34
32
33
+
### GET /status
34
+
35
+
Reports the status of the installation. It contains the installation state (*configuring*, *installing*, *finished*) and the active progresses.
36
+
35
37
### GET /system
36
38
37
39
Returns a JSON with the info of the system (storage devices, network connections, current localization, etc).
@@ -47,39 +49,51 @@ There is a distinction between *extended config* and *config*:
47
49
48
50
For example, if only the *locale* was configured by the user, then the *config* has no *keymap* property. Nevertheless, the *extended config* would have a *keymap* with the value from the default *extended config*.
49
51
50
-
The scope can be indicated to retrieve only a part of the config, for example *GET /extended_config/l10n*.
52
+
### GET PUT /config
51
53
52
-
### GET PUT PATCH /config
54
+
Reads or replaces the *config*. In case of patching, the given config is merged into the current *extended config*.
53
55
54
-
Reads, replaces or modifies the explicitly set *config*. In case of patching, the given config is merged into the current *extended config*.
56
+
### PATCH /config
55
57
56
-
The scope can be indicated to manage only part of the config, for example *PUT /config/l10n*.
58
+
Applies changes in the *config*. There is an own patch document:
57
59
58
-
### POST /action
60
+
~~~json
61
+
{
62
+
"update": {
63
+
"l10n": {
64
+
"keymap": "es"
65
+
}
66
+
}
67
+
}
68
+
~~~
59
69
60
-
Allows performing actions that cannot be done as side effect of applying a config. For example, start the installation, reload the system, etc. The *actions schema* defines the possible actions, parameters, etc.
70
+
The given config from the *update* key is merged into current *extended config*.
61
71
62
-
### GET /status
72
+
The patch document could be extended in the future with more options, for example for resetting some parts of the config.
63
73
64
-
Reports the status of the installation. It contains the installation state (*configuring*, *installing*, *finished*) and the active progresses.
74
+
See https://datatracker.ietf.org/doc/html/rfc5789#section-2
75
+
76
+
### POST /action
77
+
78
+
Allows performing actions that cannot be done as side effect of applying a config. For example, start the installation, reload the system, etc. The *actions schema* defines the possible actions, parameters, etc.
65
79
66
-
### Example: reload the system
80
+
####Example: reload the system
67
81
68
82
In some cases, clients need to request a system reload. For example, if you create a RAID device using the terminal, then you need to reload the system in order to see the new device. In the future, reloading the system could be automatically done (e.g., by listening udisk D-Bus). For now, reloading has to be manually requested.
69
83
70
84
~~~
71
-
POST /action { "reloadSystem": { scope: "storage" } }
85
+
POST /action { "reloadSystem": "storage" }
72
86
~~~
73
87
74
-
### Example: change the system localization
88
+
####Example: change the system localization
75
89
76
90
Sometimes we need to directly modify the system without changing the config. For example, switching the locale of the running system (UI language).
77
91
78
92
~~~
79
93
POST /action { "configureL10n": { language: "es_ES" } }
80
94
~~~
81
95
82
-
### Example: start installation
96
+
####Example: start installation
83
97
84
98
The installation can be started by calling the proper action.
0 commit comments