Update Documentation
This commit is contained in:
parent
66ca94dccc
commit
4f785d4dd0
14
API.md
14
API.md
@ -1,6 +1,6 @@
|
|||||||
# dn42regsrv API Description
|
# dn42regsrv API Description
|
||||||
|
|
||||||
## GET /<file>
|
## GET /<file>
|
||||||
|
|
||||||
If the StaticRoot configuration option points to a readable directory, files from
|
If the StaticRoot configuration option points to a readable directory, files from
|
||||||
the directory will be served under /
|
the directory will be served under /
|
||||||
@ -22,14 +22,14 @@ http://localhost:8042/api/registry/
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## GET /api/registry/<type>?match
|
## GET /api/registry/<type>?match
|
||||||
|
|
||||||
Returns a JSON object listing all objects for the matched types.
|
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
|
Keys for the returned object are registry types, the value for each type is an
|
||||||
array of object names
|
array of object names
|
||||||
|
|
||||||
If the match parameter is provided, the <type> is substring matched against
|
If the match parameter is provided, the <type> is substring matched against
|
||||||
all registry types, otherwise an exact type name is required.
|
all registry types, otherwise an exact type name is required.
|
||||||
|
|
||||||
A special type of '*' returns all types and objects in the registry.
|
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/<type>/<object>?match&raw
|
||||||
|
|
||||||
Return a JSON object with the registry data for each matching object.
|
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 <type>/<object name>. The values depends on the raw parameter.
|
||||||
|
|
||||||
if the raw parameter is provided, the returned object consists of a single key 'Attributes'
|
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.
|
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
|
'Backlinks' key is added which provides an array of registry objects that
|
||||||
reference this one.
|
reference this one.
|
||||||
|
|
||||||
If the match parameter is provided, the <object> is substring matched against all
|
If the match parameter is provided, the <object> is substring matched against all
|
||||||
objects in the <type>. Matching is case insensitive.
|
objects in the <type>. Matching is case insensitive.
|
||||||
|
|
||||||
If the match parameter is not provided, an exact, case sensitive object name is required.
|
If the match parameter is not provided, an exact, case sensitive object name is required.
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ interactive applications and the DN42 registry.
|
|||||||
Requires [git](https://git-scm.com/) and [go](https://golang.org)
|
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
|
## Running
|
||||||
|
|
||||||
Use --help to view configurable options
|
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
|
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.
|
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
|
git clone http://git.dn42.us/dn42/registry.git
|
||||||
./dn42regsrv --help
|
${GOPATH}/dn42regsrv
|
||||||
./dn42regsrv
|
|
||||||
```
|
```
|
||||||
|
|
||||||
A sample service file is included for running the server under systemd
|
A sample service file is included for running the server under systemd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user