File tree Expand file tree Collapse file tree
documentation/docs/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -511,13 +511,24 @@ Mainly used by the `linupdate` agent, these endpoints allow to register a host t
511511 </thead >
512512 <tbody >
513513 <tr>
514- <td>/host/<code><HOST_ID></code>/updates<br><code>GET</code></td>
514+ <td>/host/<code><HOST_ID></code>/installed<br><code>GET</code></td>
515+ <td><code><APIKEY></code></td>
516+ <td></td>
517+ <td>Get installed packages of a specific host</td>
518+ <td markdown="block">
519+ ```bash
520+ curl --fail-with-body -L -s -X GET -H "Authorization: Bearer <APIKEY>" https://repomanager.mydomain.net/api/v2/host/<HOST_ID>/installed
521+ ```
522+ </td>
523+ </tr>
524+ <tr>
525+ <td>/host/<code><HOST_ID></code>/available<br><code>GET</code></td>
515526 <td><code><APIKEY></code></td>
516527 <td></td>
517528 <td>Get available updates for a specific host</td>
518529 <td markdown="block">
519530 ```bash
520- curl --fail-with-body -L -s -X GET -H "Authorization: Bearer <APIKEY>" https://repomanager.mydomain.net/api/v2/host/<HOST_ID>/updates
531+ curl --fail-with-body -L -s -X GET -H "Authorization: Bearer <APIKEY>" https://repomanager.mydomain.net/api/v2/host/<HOST_ID>/available
521532 ```
522533 </td>
523534 </tr>
Original file line number Diff line number Diff line change @@ -30,11 +30,20 @@ public function execute(): array
3030 throw new Exception ('Host # ' . $ id . ' does not exist. ' );
3131 }
3232
33+ /**
34+ * Get installed packages for a host
35+ * https://repomanager.mydomain.net/api/v2/host/{id}/installed
36+ */
37+ if ($ this ->uri [5 ] == 'installed ' and $ this ->method == 'GET ' ) {
38+ $ hostPackageController = new HostPackage ($ id );
39+ return ['results ' => $ hostPackageController ->getInstalled ()];
40+ }
41+
3342 /**
3443 * Get available updates for a host
3544 * https://repomanager.mydomain.net/api/v2/host/{id}/updates
3645 */
37- if ($ this ->uri [5 ] == 'updates ' and $ this ->method == 'GET ' ) {
46+ if (in_array ( $ this ->uri [5 ], [ ' available ' , 'updates ' ]) and $ this ->method == 'GET ' ) {
3847 $ hostPackageController = new HostPackage ($ id );
3948 return ['results ' => $ hostPackageController ->getAvailable ()];
4049 }
Original file line number Diff line number Diff line change 122122 endif ;
123123
124124 if ($ repoController ->getPackageType () == 'deb ' ) : ?>
125+ <h6>METADATA CUSTOM FIELDS</h6>
126+
125127 <h6>ORIGIN</h6>
126- <p class="note">Optional. Configure <code>Origin</code> value in <code>Release</code> metadata file for this repository.</p>
127- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.origin" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['origin ' ] ?? '' ?> " />
128+ <p class="note">Optional. Configure the <code>Origin</code> value in <code>Release</code> metadata file for this repository.</p>
129+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.origin" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['origin ' ] ?? '' ?> " placeholder="e.g. repository > distribution > component" />
128130
129131 <h6>LABEL</h6>
130- <p class="note">Optional. Configure <code>Label</code> value in <code>Release</code> metadata file for this repository.</p>
131- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.label" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['label ' ] ?? '' ?> " />
132+ <p class="note">Optional. Configure the <code>Label</code> value in <code>Release</code> metadata file for this repository.</p>
133+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.label" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['label ' ] ?? '' ?> " placeholder="e.g. deb packages repository" />
132134
133135 <h6>DESCRIPTION</h6>
134- <p class="note">Optional. Configure <code>Description</code> value in <code>Release</code> metadata file for this repository.</p>
135- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.description" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['description ' ] ?? '' ?> " />
136+ <p class="note">Optional. Configure the <code>Description</code> value in <code>Release</code> metadata file for this repository.</p>
137+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.description" value="<?= $ repoController ->getAdvancedParams ()['metadata-custom-fields ' ]['description ' ] ?? '' ?> " placeholder="e.g. repository > distribution > component" />
136138 <?php
137139 endif ?>
138140 </div>
Original file line number Diff line number Diff line change 225225 </div>
226226
227227 <div field-type="mirror local deb">
228+ <h6>METADATA CUSTOM FIELDS</h6>
229+
228230 <h6>ORIGIN</h6>
229- <p class="note">Optional. Configure <code>Origin</code> value in <code>Release</code> metadata file for this repository.</p>
230- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.origin" package-type="deb" />
231+ <p class="note">Optional. Configure the <code>Origin</code> value in <code>Release</code> metadata file for this repository.</p>
232+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.origin" package-type="deb" placeholder="e.g. repository > distribution > component" />
231233
232234 <h6>LABEL</h6>
233- <p class="note">Optional. Configure <code>Label</code> value in <code>Release</code> metadata file for this repository.</p>
234- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.label" package-type="deb" />
235+ <p class="note">Optional. Configure the <code>Label</code> value in <code>Release</code> metadata file for this repository.</p>
236+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.label" package-type="deb" placeholder="e.g. deb packages repository" />
235237
236238 <h6>DESCRIPTION</h6>
237- <p class="note">Optional. Configure <code>Description</code> value in <code>Release</code> metadata file for this repository.</p>
238- <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.description" package-type="deb" />
239+ <p class="note">Optional. Configure the <code>Description</code> value in <code>Release</code> metadata file for this repository.</p>
240+ <input type="text" class="task-param" param-name="advanced-params.metadata-custom-fields.description" package-type="deb" placeholder="e.g. repository > distribution > component" />
239241 </div>
240242 </div>
241243 </div>
You can’t perform that action at this time.
0 commit comments