Skip to end of metadata
Go to start of metadata

This document defines the usage of the Configureme repository RESTful interface.

 

General

Request format

Requests to the REST Interface should have the form:

Not all parts of the path must be always present.

Parameter 
serverName of the server, for example localhost or www.mydomain.com
portPort of the server. For example 8088.
restpathThe specific url for the case. The url is defined in the table below.

 

Response format

The response provided as JSON. The response format is defined by Accept header.

  • application/json - for JSON

All replies are packed in a general response object. 

JSON Example:

The general response object contains at least two fields:

  • Status - could the request be processed correctly. If the status is false you should throw away the response.
  • Results - a dictionary (hashmap) with result objects. The result objects differ from case to case. 

Cases

 

SectionCaseCase-URLMethodParametersExample URLResponse 
Configurations       
 List all configurations names/configurationsGET 
 
 Get a single configuration/configurations/{name}GET
  • name - configuration name
 
 Delete configuration/configurations/{name}DELETE
  • name - configuration name

none.

Example:

Warning, this will actually drop data.
 Create configuration/configurations/{name}POST, PUT

POST/PUT data JSON:

{
 "name": "TestAccumulator",
 "producerId": "ThreadCount", 
 "interval": "1m",
 "unit": "MILLISECONDS",
 "statName": "ThreadCount",
 "valueName": "current"
}
Note, if the name is already used, it will be replaced. 
 Returns timestamp of last change/lastChangeTimestampGET 
 
 Return configuration for environment/configurations/{name}/{environment}GET

name - configuration name

evironment - specified environment

 

 

 Import all configurations/configurations/importPOST,PUT

POST/PUT data JSON:

{ 
"configurations":{
"import1":{
"v1":"test",
"v2":1
},
"import2":{
"v1":"test",
"v2":2
}
}
}

 

 

 

 

 

 

 

 

 
 Import only not imported configurations/configurations/importNewPOST, PUT

POST/PUT data JSON:

{ 
"configurations":{
"import1":{
"v1":"test",
"v2":1
},
"import2":{
"v1":"test",
"v2":2
}
}
}
 
 Export all configuration in one json/configurations/exportGET 
 
  • No labels