Commit c86c173f authored by Corey O'Connor's avatar Corey O'Connor
Browse files

expand on guide

parent b310e8bd
......@@ -175,19 +175,21 @@ representation.
### API Tour
The API conventions enforced by glngn server:
- All routes prefixed with a `_` are operations routes. These are provided by glngn server.
- `/_ops/`
- Deployment `_ops` routes
- These are always available
- EG: `/_ops/groups`: query and modify the available groups.
- EG: `/_ops/groups`: query and modify the available groups
- `/$GROUP/_ops`
- Group `_ops` routes, `/$GROUP/_ops`, require a group to be created
- Group `_ops` routes. These require a group, `$GROUP`, to be created
- `/$GROUP/$SERVICE/_ops`
- Service fragment `_ops` routes, `/$GROUP/$SERVICE/_ops`, require the service fragment to be
instantiated under the group.
instantiated under the group
- automatically generated for each instantiated service fragment
- `/$GROUP/$SERVICE/...`
- All other routes under a service are provided by a Service Fragment's `endpoints`.
- All other routes under a service are provided by a Service Fragment's `endpoints`
### Create a Groups
......@@ -195,6 +197,38 @@ The `/_ops/groups` endpoint is used to query the existing groups and create new
All services are namespaced under a group. Before we can instantiate and use a service we must
first create a group:
$ curl --data '{ "id": "accounts", "name": "Client Accounts" }' localhost:10000/_ops/groups
"id" : {
"txt" : "accounts"
"name" : "Client Accounts",
"operators" : null
This creates a group with the logical name `accounts`. The endpoint responds with the
current definition of the group.
Which we can confirm by querying the `/_ops/groups` endpoint again:
$ curl localhost:10000/_ops/groups
"accounts" : {
"id" : {
"txt" : "accounts"
"name" : "Cli Accounts",
"operators" : null
Note the `operators` attribute. Using the premium license server this would contain the users
authorized to access that group. The free license server ignores this attribute.
### Instantiate a Service Fragment
TODO: show dynamic instantiation of a service fragment under a group
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment