Hi there ...
I'm trying some samples from:
https://docs.jboss.org/author/display/WFLY8/The+HTTP+management+API
and have questions/comments.
1). First one is giving:
curl --digest -L -D -
http://localhost:9990/management --header
"Content-Type: application/json" -d
'{"operation":"read-attribute","name":"server-state","json.pretty":1}'
-u u3:p3
HTTP/1.1 401 Unauthorized
Connection: keep-alive
WWW-Authenticate: Digest
realm="ManagementRealm",domain="/management",nonce="n6l3IRhNwTwNMTM4OTE0MjA3MTE4N55G54PM/ll8QrzSK+RrvTM=",opaque="00000000000000000000000000000000",algorithm=MD5
Content-Length: 77
Content-Type: text/html
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Authentication-Info:
nextnonce="I7Yrew1s+j4NMTM4OTE0MjA3MTE4NxXgrLGjS/rWgbUveRrchio="
Content-Type: text/plain;utf-8
Content-Length: 128
{
"outcome" : "failed",
"failure-description" : "JBAS014792: Unknown attribute
server-state",
"rolled-back" : true
}
http://wildscribe.github.io/Wildfly/8.0.0.CR1/index.html shows
server-state as a valid attribute.
Similar error for:
"JBAS014792: Unknown attribute profile-name"
Reading product-name and product-version returns:
{"outcome" : "success", "result" : null}
"name" attribute returns:
{"outcome" : "success", "result" : "Unnamed
Domain"}
2). curl --digest -L -D -
http://localhost:9990/management --header
"Content-Type: application/json" -d
'{"operation":"whoami","json.pretty":1}' -u u3:p3
does not return pretty JSON and instead returns:
{"outcome" : "success", "result" : {"identity" :
{"username" : "u3",
"realm" : "ManagementRealm"}}}
release-name and release-version returned correct values.
3). I think a restart-server operation would be useful.
4). Why is the following command failing:
curl --digest -D -
http://localhost:9990/management --header
"Content-Type: application/json" -d
'{"operation":"read-resource",
"address":["subsystem","data-sources"],
"json.pretty":1}' -u u3:p3
HTTP/1.1 401 Unauthorized
Connection: keep-alive
WWW-Authenticate: Digest
realm="ManagementRealm",domain="/management",nonce="2oB+bvt990QNMTM4OTE0MzQ4Nzc0NkxPJHWOl6yAkN/F7PGdbYo=",opaque="00000000000000000000000000000000",algorithm=MD5
Content-Length: 77
Content-Type: text/html
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Authentication-Info:
nextnonce="JXNHCPPtBVwNMTM4OTE0MzQ4Nzc0N5YLxVykiaapgV5zTDnV++I="
Content-Type: text/plain;utf-8
Content-Length: 184
{
"outcome" : "failed",
"failure-description" : "JBAS014883: No resource definition is
registered for address [(\"subsystem\" =>
\"data-sources\")]",
"rolled-back" : true
}
Even though there is a default data source already registered. The
management model
Either I'm not doing something basic correctly, the management model
is out of sync, or the API is not fully implemented.
Comments ?
Thanks,
Arun
--
http://blog.arungupta.me
http://twitter.com/arungupta