Debian Codegraph @

src/docbkx/protocol/version.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 ~ Copyright 2009-2013 Roland Huss
4 ~
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at
8 ~
9 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
16 -->
17
18 <section id="version">
19 <title>Getting the agent version (version)</title>
20 <para>
21 The Jolokia command <constant>version</constant> returns the version of
22 the Jolokia agent along with the protocol version.
23 </para>
24
25 <section id="get-version">
26 <title>GET version request</title>
27 <para>
28 The GET URL for a version request has the following format:
29 </para>
30 <synopsis><![CDATA[<base-url>/version]]></synopsis>
31 <para>
32 For GET request the <literal>version</literal> part can be
33 omitted since this is the default command if no command is
34 provided as path info.
35 </para>
36 </section>
37 <section id="post-version">
38 <title>POST version request</title>
39 <para>
40 A version POST request has only a single key
41 <constant>type</constant> which has to be set to
42 <emphasis role="bold">version</emphasis>.
43 </para>
44 </section>
45 <section id="response-version">
46 <title>Version response</title>
47 <para>
48 The response value for a version request looks like:
49 </para>
50 <programlisting><![CDATA[
51 {
52 "timestamp":1287143106,
53 "status":200,
54 "request":{"type":"version"},
55 "value":{
56 "protocol":"7.1",
57 "agent":"1.2.0",
58 "config": {
59 "agentDescription": "Servicemix ESB",
60 "agentId": "EF87BE-jvm",
61 "agentType": "jvm",
62 "serializeException": "false"
63 },
64 "info": {
65 "product": "glassfish",
66 "vendor": "Oracle",
67 "version": "4.0",
68 "extraInfo": {
69 "amxBooted": false
70 },
71 }
72 }]]></programlisting>
73 </section>
74 <para>
75 <literal>protocol</literal> in the response value contains the
76 protocol version used, <literal>agent</literal> is the version of
77 the Jolokia agent. See <xref linkend="versions"/> for the various
78 protocol versions and the interoperability. If the agent is able
79 to detect the server, additional meta information about this
80 server is returned (i.e. the product name, the vendor and
81 optionally some extra information added by the server detector).
82 </para>
83 </section>