Configuration Admin API
{ urn:soa.com:/uri/products/configservice/wsdl/1.0 } ConfigurationService
A REST API that provides access to the Configuration Admin service.
GETGet configurations
Get all configurations. An optional filter may be specified to select specific configurations.
Request:
GET /admin/config HTTP/1.1
Accept: application/json
Responses:
- HTTP/1.1 200 OK. If successful
Response
The following is an example of a response for a getConfigurations request. The content has been truncated for brevity.
HTTP/1.1 200 OK
Content-Type:application/json; charset=UTF-8
{
"links": [
{
"href": "http://localhost:9900/admin/config/factories",
"rel": "factories"
}
],
"pids": [
{
"pid": "com.akana.test",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test",
"rel": "self"
}
]
},
{
"pid": "com.soa.framework.xpath",
"bundleLocation": "obr://com.soa.platform.framework/8.3.0",
"links": [
{
"href": "http://localhost:9900/admin/config/com.soa.framework.xpath",
"rel": "self"
}
]
},
...
{
"pid": "com.soa.platform.jetty",
"bundleLocation": "obr://com.soa.platform.jetty/8.3.0",
"links": [
{
"href": "http://localhost:9900/admin/config/com.soa.platform.jetty",
"rel": "self"
}
]
},
{
"pid": "com.soa.cache.generic",
"bundleLocation": "obr://com.soa.framework/8.3.0",
"links": [
{
"href": "http://localhost:9900/admin/config/com.soa.cache.generic",
"rel": "self"
}
]
}
]
}
Parameters
Reponse
link {
configurationInfo {
propertyMetadata {
nameValuePair {
GET/factoriesGet factories
Get information on all available configuration factories.
Request:
GET /admin/config/factories HTTP/1.1
Accept: application/json
Responses:
- HTTP/1.1 200 OK. If successful
Response:
HTTP/1.1 200 OK
Content-Type:application/json; charset=UTF-8
{
"factory": [
"com.soa.admin.obr",
"com.soa.provision"
]
}
Reponse
GET/{pid}Get configuration by PID
Get a specified PID.
Request:
GET /admin/config/com.akana.test HTTP/1.1
Accept: application/json
Responses :
- HTTP/1.1 200 OK. If successful
Response
HTTP/1.1 200 OK
Content-Type:application/json; charset=UTF-8
{
"pid": "com.akana.test",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test",
"rel": "self"
}
],
"properties": [
{
"name": "service.pid",
"value": "com.akana.test"
},
{
"name": "prop3",
"value": "value3"
},
{
"name": "prop2",
"value": "value2"
},
{
"name": "prop1",
"value": "value1"
}
]
}
Parameters
Reponse
propertyMetadata {
link {
nameValuePair {
PUT/{pid}Update configuration
Update a PID.
Request:
The following is a sample request. Note that only the properties in the request are
relevant, all other fields are ignored.
PUT /admin/config/com.akana.test HTTP/1.1
Accept: application/json
{
"pid": "com.akana.test",
"properties": [
{
"name": "prop3",
"value": "abc"
},
{
"name": "prop2",
"value": "def"
},
{
"name": "prop1",
"value": "xyz"
}
]
}
Responses:
- HTTP/1.1 200 OK. If successful
- HTTP/1.1 404 Not Found. If the PID is not found
Response:
HTTP/1.1 200 OK
Content-Type:application/json; charset=UTF-8
{
"pid": "com.akana.test",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test",
"rel": "self"
}
],
"properties": [
{
"name": "service.pid",
"value": "com.akana.test"
},
{
"name": "prop3",
"value": "abc"
},
{
"name": "prop2",
"value": "def"
},
{
"name": "prop1",
"value": "xyz"
}
]
}
Parameters
propertyMetadata {
link {
nameValuePair {
Reponse
propertyMetadata {
link {
nameValuePair {
DELETE/{pid}Delete configuration
Deletes a specified PID.
Request:
DELETE /admin/config/com.akana.test HTTP/1.1
Responses:
- HTTP/1.1 204 No Content. If the configuration is successfully deleted
- HTTP/1.1 404 Not Found. If the PID is not found
Parameters
Reponse
propertyMetadata {
link {
nameValuePair {
POST/{pid}Create configuration
Add a configuration to the Config Admin. The client specifies the PID for the new configuration as part of the request URL path.
Request:
POST /admin/config/com.akana.test HTTP/1.1
Content-Type: application/json
[
{"name":"prop1","value":"value1"},
{"name":"prop2","value":"value2"}
]
Responses:
- 201 Created. On success, the response will include a Location header that points to the newly created configuration.
- 409 Conflict. If the PID already exists
Response:
HTTP/1.1 201 Created
Content-Type:application/json; charset=UTF-8
Location: http://localhost:9900/admin/config/com.akana.test
{
"pid": "com.akana.test",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test",
"rel": "self"
}
],
"properties": [
{
"name": "service.pid",
"value": "com.akana.test"
},
{
"name": "prop2",
"value": "value2"
},
{
"name": "prop1",
"value": "value1"
}
]
}
Parameters
Reponse
propertyMetadata {
link {
nameValuePair {
POST/factories/{pid}Create factory configuration
Add a factory configuration to the Config Admin. The client specifies the factory PID for the new configuration as part of the request URL path.
Request:
POST /admin/config/factories/com.akana.test.factory HTTP/1.1
Content-Type: application/json
[
{"name":"prop1","value":"value1"},
{"name":"prop2","value":"value2"}
]
Responses:
- HTTP/1.1 201 Created. On success, the response will include a Location header that points to the newly created configuration.
Response:
HTTP/1.1 201 Created
Content-Type:application/json; charset=UTF-8
Location: http://localhost:9900/admin/config/com.akana.test.factory.a7df3a9e-9249-4451-8ad5-478e3b075657
{
"pid": "com.akana.test.factory.a7df3a9e-9249-4451-8ad5-478e3b075657",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test.factory.a7df3a9e-9249-4451-8ad5-478e3b075657",
"rel": "self"
}
],
"properties": [
{
"name": "service.pid",
"value": "com.akana.test.factory.a7df3a9e-9249-4451-8ad5-478e3b075657"
},
{
"name": "service.factoryPid",
"value": "com.akana.test.factory"
},
{
"name": "prop2",
"value": "value2"
},
{
"name": "prop1",
"value": "value1"
}
]
}
Parameters
Reponse
propertyMetadata {
link {
nameValuePair {
POST/{pid}/{name}Create property
Create a property for an existing PID.
Request:
POST /admin/config/com.akana.test/prop3 HTTP/1.1
Content-Type: application/json
{"name":"prop3","value":"value3"}
Responses:
- HTTP/1.1 201 Created.
- HTTP/1.1 404 Not Found. If the specified PID is not found
Response
HTTP/1.1 201 Created
Content-Type:application/json; charset=UTF-8
Location: http://localhost:9900/admin/config/com.akana.test/prop3
{
"pid": "com.akana.test",
"links": [
{
"href": "http://localhost:9900/admin/config/com.akana.test/prop3",
"rel": "self"
}
],
"properties": [
{
"name": "service.pid",
"value": "com.akana.test"
},
{
"name": "prop3",
"value": "value3"
},
{
"name": "prop2",
"value": "value2"
},
{
"name": "prop1",
"value": "value1"
}
]
}
Parameters
Reponse
PUT/{pid}/{name}Update property
Update the value or name of a property in a PID.
Request:
PUT /admin/config/com.akana.test/prop1 HTTP/1.1
Accept: application/json
{
"name": "new_name",
"value": "abc1"
}
Responses:
- HTTP/1.1 200 OK. If successful
- HTTP/1.1 404 Not Found. If the PID or property name specified in the path is not found
Parameters
Reponse
DELETE/{pid}/{name}Remove property
Deletes the specified property.
Request:
DELETE /admin/config/com.akana.test/prop1 HTTP/1.1
Responses:
- HTTP/1.1 200 OK. If successful
- HTTP/1.1 404 Not Found. If the PID or property is not found
Parameters
Reponse
GET/{pid}/{name}Get property
Fetch a specific property.
Request:
GET /admin/config/com.akana.test/prop1 HTTP/1.1
Accept: application/json
Responses:
- HTTP/1.1 200 OK. If successful.
- HTTP/1.1 404 Not Found. If the specified PID or property name is not found
Response:
HTTP/1.1 200 OK
Content-Type:application/json; charset=UTF-8
{
"name": "prop1",
"value": "value1"
}