Section | Case | Case-URL | Method | Parameters | Example URL | Response | |
---|
Configurations | | | | | | | |
| List all configurations names | /configurations | GET | | Code Block |
---|
http://<server>:<port>:<app>/configurations |
| | |
| Get a single configuration | /configurations/{name} | GET | - name - configuration name
| Code Block |
---|
http://<server>:<port>:<app>/convigurations/test1 |
| | |
| Delete configuration | /configurations/{name} | DELETE | - name - configuration name
| Code Block |
---|
http://<server>:<port>:<app>/configurations/test1 |
| none. Example: Code Block |
---|
| {
"success": true,
"message": null,
"results": {
"test2": "Configuration deleted"
}
} |
| 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"
} | Code Block |
---|
http://<server>:<port>/<app>/configurations/test3 |
| Code Block |
---|
{
"success": true,
"message": null,
"results": {
"test3": {
"id": "57342ff7b4c36d4f97ed067e",
"name": "test3",
"creationTimestamp": 1463037943620,
"lastEditTimestamp": 1463037943620,
"configurationContext": {
"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 | /lastChangeTimestamp | GET | | Code Block |
---|
http://<server>:<port>:<app>/lastChangeTimestamp/test1 |
| Code Block |
---|
{
"success":true,"message":null,"results": {
"test1":1462542984843
}
} |
| |
| Return configuration for environment | /configurations/{name}/{environment} | GET | name - configuration name evironment - specified environment | Code Block |
---|
http://<server>:<port>/<app>//configurations/test1/test | | Code Block |
---|
{
"success": true,
"results": {
"version": {
"fileTimestamp": "2015-06-28T00:25:50,000",
"version": "2.6.2-SNAPSHOT",
"group": "net.anotheria",
"artifact": "moskito-webui"
}
}
} |
| |
| Import all configurations | /configurations/import | POST,PUT | POST/PUT data JSON: { "configurations":{ "import1":{ "v1":"test", "v2":1 }, "import2":{ "v1":"test", "v2":2 } } } | Code Block |
---|
http://<server>:<port>/configurations/import |
| Code Block |
---|
{
"success": true,
"message": null,
"results": {
"importResult": {
"amount": 2,
"timestamp": 1463392493878
}
}
} |
| |
| Import only not imported configurations | /configurations/importNew | POST, PUT | POST/PUT data JSON: { "configurations":{ "import1":{ "v1":"test", "v2":1 }, "import2":{ "v1":"test", "v2":2 } } } | Code Block |
---|
http://<server>:<port>/configurations/importNew |
| Code Block |
---|
{
"success": true,
"message": null,
"results": {
"importResult": {
"amount": 1,
"timestamp": 1463392493887
}
}
} |
| |
| Export all configuration in one json | /configurations/export | GET | | Code Block |
---|
http://<server>:<port>/configurations/export |
| Code Block |
---|
{
"success": true,
"message": null,
"results": {
"configurations": {
"import2": {
"p11": 3,
"p12": "eee"
},
"import1": {
"p11": 3,
"p12": "eee"
}
}
} |
| |