From 4f785d4dd08347d2b93b89a8e66c02aac915bb27 Mon Sep 17 00:00:00 2001 From: Simon Marsh Date: Sat, 9 Feb 2019 21:38:54 +0000 Subject: [PATCH] Update Documentation --- API.md | 14 +++++++------- README.md | 9 ++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/API.md b/API.md index b025053..4884b82 100644 --- a/API.md +++ b/API.md @@ -1,6 +1,6 @@ # dn42regsrv API Description -## GET / +## GET /<file> 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/?match +## GET /api/registry/<type>?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 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. 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//?match&raw +## GET /api/registry/<type>/<object>?match&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 /. 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' 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 is substring matched against all -objects in the . Matching is case insensitive. +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 not provided, an exact, case sensitive object name is required. diff --git a/README.md b/README.md index bf4f0d4..f4187ec 100644 --- a/README.md +++ b/README.md @@ -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