JBoss Community Archive (Read Only)

RHQ 4.9

Update schedule

Update Schedule

URL: /metric/schedule/{id}
Method: PUT

Description

Updates a metric schedule. Parameters to be updated are collection interval and enabled state.

Path Parameters

{id} Id of the schedule

Query Parameters

none

Returns

200 ok and the updated schedule

Examples

$ curl -i http://localhost:7080/rest/1/metric/schedule/10004 \\ 
    --user rhqadmin:rhqadmin -X PUT -d @/tmp/fooX \\
    -HContent-Type:application/xml
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)/Tomcat-5.5
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sun, 06 Nov 2011 13:09:47 GMT

{  "collectionInterval":30000,
   "displayName":"Pattern 2 Trait",
   "enabled":true,
   "scheduleId":10004,
   "scheduleName":"text2",
   "type":"TRAIT",
   "unit":""
}

Input is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<metricSchedule>
  <collectionInterval>30000</collectionInterval>
  <enabled>true</enabled>
</metricSchedule>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 08:03:27 UTC, last content change 2013-09-18 19:41:19 UTC.