1
mirror of https://git.burble.com/burble.dn42/dn42regsrv.git synced 2024-02-26 20:28:04 +01:00

Update Documentation

This commit is contained in:
Simon Marsh 2019-02-09 21:38:54 +00:00
parent 66ca94dccc
commit 4f785d4dd0
No known key found for this signature in database
GPG Key ID: 7B9FE8780CFB6593
2 changed files with 11 additions and 12 deletions

14
API.md
View File

@ -1,6 +1,6 @@
# dn42regsrv API Description
## GET /<file>
## GET /&lt;file&gt;
If the StaticRoot configuration option points to a readable directory, files from
the directory will be served under /
@ -22,14 +22,14 @@ http://localhost:8042/api/registry/
```
## GET /api/registry/<type>?match
## GET /api/registry/&lt;type&gt;?match
Returns a JSON object listing all objects for the matched types.
Keys for the returned object are registry types, the value for each type is an
array of object names
If the match parameter is provided, the <type> is substring matched against
If the match parameter is provided, the &lt;type&gt; is substring matched against
all registry types, otherwise an exact type name is required.
A special type of '*' returns all types and objects in the registry.
@ -45,11 +45,11 @@ http://localhost:8042/api/registry/route?match # list route and route6 objects
```
## GET /api/registry/<type>/<object>?match&raw
## GET /api/registry/&lt;type&gt;/&lt;object&gt;?match&amp;raw
Return a JSON object with the registry data for each matching object.
The keys for the object are the object paths in the form <type>/<object name>. The values depends on the raw parameter.
The keys for the object are the object paths in the form &lt;type&gt;/&lt;object name&gt;. The values depends on the raw parameter.
if the raw parameter is provided, the returned object consists of a single key 'Attributes'
which will be an array of key/value pairs exactly as held within the registry.
@ -59,8 +59,8 @@ style links depending the relations defined in the DN42 schema. In addition a
'Backlinks' key is added which provides an array of registry objects that
reference this one.
If the match parameter is provided, the <object> is substring matched against all
objects in the <type>. Matching is case insensitive.
If the match parameter is provided, the &lt;object&gt; is substring matched against all
objects in the &lt;type&gt;. Matching is case insensitive.
If the match parameter is not provided, an exact, case sensitive object name is required.

View File

@ -17,14 +17,14 @@ interactive applications and the DN42 registry.
Requires [git](https://git-scm.com/) and [go](https://golang.org)
```
go get https://git.dn42.us/burble/dn42regsrv
go get -insecure git.dn42.us/burble/dn42regsrv
```
## Running
Use --help to view configurable options
```
./dn42regsrv --help
${GOPATH}/bin/dn42regsrv --help
```
The server requires access to a clone of the DN42 registry and for the git executable
@ -33,10 +33,9 @@ If you want to use the auto pull feature then the registry must
also be writable by the server.
```
cd ${GOROOT}/src/dn42regsrv
cd ${GOPTH}/src/git.dn42.us/burble/dn42regsrv
git clone http://git.dn42.us/dn42/registry.git
./dn42regsrv --help
./dn42regsrv
${GOPATH}/dn42regsrv
```
A sample service file is included for running the server under systemd