
h1. ConfigService Admin APIs
*Content-Type: application/json*
*Required security role: admin
h2. 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 | | |
h2. Client - administration
* Resource class: ClientResource
|| Method || Description || Roles||Request body||Response body || Examples ||Comment ||
|PUT /client/\{*clientId*\}| Create or update client |Admin|[Client]|[Client]| Use cases: \\* [Preregister Client with specific ApplicationConfig] \\ * [Change ApplicationConfig for one existing Client]\\* autoUpgrade=true/false, etc. | |
|GET /client/\{*clientId*\} | |Admin| |[Client]| | |
|GET /client/\{*clientId*\}/config |return the ApplicationConfig currently registered on the client |Admin| |[ApplicationConfig] | | |
|GET /client/\{*clientId*\}/status |return overview of client, including last heartbeat data from sync/registerClient |Admin| |[ClientStatus] = [Client] + [ClientHeartbeatData]| |ED: The results doesn't look like expected. Use with caution! |
|GET /client/\{*clientId*\}/events |return events/log statements extracted from data received from sync/registerClient |Admin| |[ExtractedEventsStore] | | |
|GET /client/\{*clientId*\}/env |return last received environment variables from sync/registerClient |Admin| | [ClientEnvironment] | | |
|GET /client/ |return list of all registered clients |Admin| | List of [Client] | | |
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:
* [http://mvnrepository.com/artifact/no.arktekk/siren-java]
* [http://mvnrepository.com/artifact/net.hamnaberg.rest/json-collection]
h2. 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?|