ConfigService Admin API
ConfigService Admin APIs
Content-Type: application/json
*Required security role: admin
Service status check
| Method |
Description |
Roles |
Request body |
Response body |
Examples |
Comment |
| GET /health |
return the status and version of the service |
|
|
ConfigService OK, version 0.8-beta-7, now=2016-11-02T08:56:31.528Z, running since 2016-11-01T12:49:28.960Z |
|
|
Client - administration
- Resource class: ClientResource
For å få verktøystøtte for bl.a. links så bør vi vurdere et ferdig hypermediaformat hvor det finnes helperlibs. Tenker admin-api-ene er naturlig å stare med først. F.eks. siren og collection+json kan antagelig brukes. Mulig siren passer best:
Application
- Resource class: ApplicationResource
| Method |
Description |
Roles |
Request Body |
Response Body |
Examples |
Comment |
| POST /application/ |
Create a new application with the given artifactId. |
Admin |
artifactId |
Application |
Create Application and ApplicationConfig |
TODO should application have a defaultApplicationConfigId reference? |
| GET /application/{artifactId}/status |
Data on clients that are registered on this application |
Admin |
|
ApplicationStatus |
|
Tenker her typisk hvor mange klienter totalt, hvor mange har vært aktive siden x tid, hvor mange klienter kjører hver versjon, osv. TODO: artifactId -> applicationId (requires that we store applicationId in ClientHeartbeatData) |
| GET /application/ |
return all registered applications |
Admin |
|
List of Application |
|
|
| GET /application/config |
return all ApplicationConfig for all applications |
Admin |
|
List of ApplicationConfig |
|
Suggestion, not implemented yet |
ApplicationConfig
- Resource class: ApplicationConfigResource (former serviceconfig)
| Method |
Description |
Roles |
Request Body |
Response Body |
Examples |
Comment |
| POST /application/{applicationId}/config |
Create applicationconfig for the given application. RegisterClient will return this config for matching artifactId. |
Admin |
ApplicationConfig |
ApplicationConfig |
Create Application and ApplicationConfig |
|
| PUT /application/{applicationId}/config/{applicationConfigId} |
Update applicationconfig. Clients will receive updated config when they call sync/checkForUpdate. |
Admin |
ApplicationConfig |
ApplicationConfig |
Update ApplicationConfig |
lastChanged must always be updated TODO: when to create a new one vs when to change? |
| GET /application/{applicationId}/config/{applicationConfigId} |
return a specific ApplicationConfig |
Admin |
|
ApplicationConfig |
|
|
| DELETE /application/{applicationId}/config/{applicationConfigId} |
delete the specific ApplicationConfig |
Admin |
|
|
|
|
| GET /application/{applicationId}/config/ |
return all ApplicationConfigs for the given applicationId |
Admin |
|
Map from id to ApplicationConfig |
|
Currently returns all ApplicationConfigs for all applications, see #39 |
Example application config
Old documentation (still useful for older versions of ConfigService and Java Auto Update