Skip to content

Commit

Permalink
[docs] Improve Apricot HTTP documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Dec 7, 2023
1 parent d010a45 commit a933c0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Binary file added apricot/docs/apricot-apidocs-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions apricot/docs/apricot_http_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,23 @@ The default port is `32188`.
To retrieve the information needed regarding FLPs, use the following urls in a web browser or with `curl` or `wget`.

To retrieve as plain text:
* `http://<apricot-server>/inventory/flps` or `http://<apricot-server>/inventory/flps/text`
* `http://<apricot-server>/inventory/detectors/<detector>/flps` or `http://<apricot-server>/inventory/detectors/<detector>/flps/text`
* `http://<apricot-host>:<port>/inventory/flps` or `http://<apricot-host>:<port>/inventory/flps/text`
* `http://<apricot-host>:<port>/inventory/detectors/<detector>/flps` or `http://<apricot-host>:<port>/inventory/detectors/<detector>/flps/text`

To retrieve as JSON:
* `http://<apricot-server>/inventory/flps/json`
* `http://<apricot-server>/inventory/detectors/<detector>/flps/json`
* `http://<apricot-host>:<port>/inventory/flps/json`
* `http://<apricot-host>:<port>/inventory/detectors/<detector>/flps/json`

To retrieve a component configuration payload, use the following urls in a web browser or with `curl` or `wget`.

* `http://<apricot-server>/components/<component>/<runtype>/<rolename>/<entry>?process=true` - with template processing
* `http://<apricot-server>/components/<component>/<runtype>/<rolename>/<entry>?process=false` - without template processing, returns the entry verbatim
* `http://<apricot-host>:<port>/components/<component>/<runtype>/<rolename>/<entry>?process=true` - with template processing
* `http://<apricot-host>:<port>/components/<component>/<runtype>/<rolename>/<entry>?process=false` - without template processing, returns the entry verbatim

The full API documentation is available at `http://<apricot-server>/docs/` wherever your Apricot instance is running. This documentation interface also allows to perform API calls directly from the browser.
The full API documentation is available at `http://<apricot-host>:<port>/docs/` wherever your Apricot instance is running. It looks like this:

![Apricot API documentation screenshot](apricot-apidocs-screenshot.png)

This documentation interface also allows to perform API calls directly from the browser.
Besides configuration retrieval, the API also includes calls for browsing the configuration tree and resolving payload paths to actual entries according to the `ANY/any` mechanism.

### Examples
Expand Down

0 comments on commit a933c0d

Please sign in to comment.