Skip to content

Commit

Permalink
Update root url to follow the same pattern as the rest of Hawkular pr…
Browse files Browse the repository at this point in the history
…ojects.
  • Loading branch information
Stefan Negrea committed Apr 20, 2015
1 parent 5852bbe commit 5f6f8a9
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 36 deletions.
44 changes: 22 additions & 22 deletions api/metrics-api-jaxrs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ instance into `standalone/deployments/` and start the server with `bin/standalon

*Request URI*

POST /hawkular-metrics/tenants
POST /hawkular/metrics/tenants

*Request Body*

Expand All @@ -36,7 +36,7 @@ POST /hawkular-metrics/tenants
*Example Request*

----
curl -X POST http://localhost:8080/hawkular-metrics/tenants -d@request.json -HContent-Type:application/json
curl -X POST http://localhost:8080/hawkular/metrics/tenants -d@request.json -HContent-Type:application/json
----


Expand All @@ -62,12 +62,12 @@ default data retention settings.

*Request URI*

GET /hawkular-metrics/tenants
GET /hawkular/metrics/tenants

*Example Request*

----
curl http://localhost:8080/hawkular-metrics/tenants
curl http://localhost:8080/hawkular/metrics/tenants
----


Expand Down Expand Up @@ -100,7 +100,7 @@ Returns a list of tenants. Notice that the second object does not include a

*Request URI*

POST /hawkular-metrics/{tenantId}/numeric
POST /hawkular/metrics/{tenantId}/numeric

*Request Body*

Expand All @@ -119,7 +119,7 @@ POST /hawkular-metrics/{tenantId}/numeric
*Example Request*

----
curl http://localhost:8080/hawkular-metrics/{tenantId}/numeric -d@request.json -HContent-Type:application/json
curl http://localhost:8080/hawkular/metrics/{tenantId}/numeric -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -138,12 +138,12 @@ meta data and data retention.

*Request URI*

POST /hawkular-metrics/{tenantId}/availability
POST /hawkular/metrics/{tenantId}/availability

*Example Request*

----
curl http://localhost:8080/hawkular-metrics/{tenantId}/availability -d@request.json -HContent-Type:application/json
curl http://localhost:8080/hawkular/metrics/{tenantId}/availability -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -155,7 +155,7 @@ The request body is the same as creating a numeric metric.

*Request URI*

GET /hawkular-metrics/{tenantId}/metrics
GET /hawkular/metrics/{tenantId}/metrics

*Query Parameters*

Expand All @@ -170,7 +170,7 @@ GET /hawkular-metrics/{tenantId}/metrics
*Example Request*

----
curl http://localhost:8080/hawkular-metrics/{tenantId}/metrics?type=num
curl http://localhost:8080/hawkular/metrics/{tenantId}/metrics?type=num
----

*Response Body*
Expand Down Expand Up @@ -201,7 +201,7 @@ Returns a list of metrics. The results do *not* include metric data points. The

*Request URI*

PUT /hawkular-metrics/{tenantId}/numeric/{id}/meta
PUT /hawkular/metrics/{tenantId}/numeric/{id}/meta

*Request Body*

Expand All @@ -216,7 +216,7 @@ PUT /hawkular-metrics/{tenantId}/numeric/{id}/meta
*Example Request*

----
curl -X PUT http://localhost:8080/hawkular-metrics/{tenantId}/numeric -d@request.json -HContent-Type:application/json
curl -X PUT http://localhost:8080/hawkular/metrics/{tenantId}/numeric -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -230,7 +230,7 @@ either created or overwritten.

*Request URI*

POST /hawkular-metrics/{tenantId}/numeric/{id}/data
POST /hawkular/metrics/{tenantId}/numeric/{id}/data

*Request Body*

Expand All @@ -246,7 +246,7 @@ POST /hawkular-metrics/{tenantId}/numeric/{id}/data
*Example Request*

----
curl -X POST http://localhost:8080/hawkular-metrics/{tenantId}/numeric/{id}/data -d@request.json -HContent-Type:application/json
curl -X POST http://localhost:8080/hawkular/metrics/{tenantId}/numeric/{id}/data -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -258,7 +258,7 @@ points where each one consists of `timestamp` and `value` properties.

*Request URI*

POST /hawkular-metrics/{tenantId}/availability/{id}/data
POST /hawkular/metrics/{tenantId}/availability/{id}/data

*Request Body*

Expand All @@ -273,7 +273,7 @@ POST /hawkular-metrics/{tenantId}/availability/{id}/data
*Example Request*

----
curl -X POST http://localhost:8080/hawkular-metrics/{tenantId}/availability/{id}/data -d@request.json -HContent-Type:application/json
curl -X POST http://localhost:8080/hawkular/metrics/{tenantId}/availability/{id}/data -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -285,7 +285,7 @@ Inserts data for a single availablity metric. Accepted values are the strings

*Request URI*

POST /hawkular-metrics/{tenantId}/numeric/data
POST /hawkular/metrics/{tenantId}/numeric/data

*Request Body*

Expand All @@ -312,7 +312,7 @@ POST /hawkular-metrics/{tenantId}/numeric/data
*Example Request*

----
curl -X POST http://localhost:8080/hawkular-metrics/{tenantId}/numeric/data -d@request.json -HContent-Type:application/json
curl -X POST http://localhost:8080/hawkular/metrics/{tenantId}/numeric/data -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -323,7 +323,7 @@ Insert data for multiple numeric metrics.

*Request URI*

POST /hawkular-metrics/{tenantId}/availability/data
POST /hawkular/metrics/{tenantId}/availability/data

*Request Body*

Expand All @@ -350,7 +350,7 @@ POST /hawkular-metrics/{tenantId}/availability/data
*Example Request*

----
curl -X POST http://localhost:8080/hawkular-metrics/{tenantId}/availability/data -d@request.json -HContent-Type:application/json
curl -X POST http://localhost:8080/hawkular/metrics/{tenantId}/availability/data -d@request.json -HContent-Type:application/json
----

*Description*
Expand All @@ -361,7 +361,7 @@ Insert data for multiple availability metrics.

*Request URI*

GET /hawkular-metrics/{tenantId}/numeric/{id}/data
GET /hawkular/metrics/{tenantId}/numeric/{id}/data

*Request Parameters*

Expand All @@ -384,7 +384,7 @@ start and end times, having max/min/avg calculated for each bucket.
*Example Request*

----
curl http://localhost:8080/hawkular-metrics/{tenantId}/numeric/{id}/data?start=1416857688195&end=1416857688195 -d@request.json -HContent-Type:application/json
curl http://localhost:8080/hawkular/metrics/{tenantId}/numeric/{id}/data?start=1416857688195&end=1416857688195 -d@request.json -HContent-Type:application/json
----

*Response Body*
Expand Down
2 changes: 1 addition & 1 deletion api/metrics-api-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<apiSource>
<locations>org.hawkular.metrics.api.jaxrs</locations>
<apiVersion>1.0</apiVersion>
<basePath>http://localhost:8080/hawkular-metrics/</basePath>
<basePath>http://localhost:8080/hawkular/metrics/</basePath>
<outputTemplate>${project.build.directory}/dependency/hawkular-documentation/asciidoc.mustache</outputTemplate>
<swaggerDirectory>${project.build.directory}/generated/swagger-ui</swaggerDirectory>
<swaggerInternalFilter>org.hawkular.metrics.api.jaxrs.swagger.filter.JaxRsFilter</swaggerInternalFilter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-->
<jboss-web>
<context-root>/hawkular-metrics</context-root>
<context-root>/hawkular/metrics</context-root>
<!-- see https://community.jboss.org/wiki/JBossAS7SecurityAuditing for the next tag -->
<!--<disable-audit>false</disable-audit>-->
</jboss-web>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void main(final String[] args) {
metricsHandlers.setup(commonHandler);

Undertow server = Undertow.builder().addHttpListener(8080, "0.0.0.0")
.setHandler(new CorsHandler(path().addPrefixPath("/hawkular-metrics", commonHandler))).build();
.setHandler(new CorsHandler(path().addPrefixPath("/hawkular/metrics", commonHandler))).build();
server.start();
}

Expand Down
2 changes: 1 addition & 1 deletion clients/ptranslator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<hawkular-metrics.backend>cass</hawkular-metrics.backend>
<cassandra.keyspace>hawkular_metrics_ptrans_integration_tests</cassandra.keyspace>
<!-- IMPORTANT: The port must be the port offset + 8080. -->
<base-uri>127.0.0.1:55988/hawkular-metrics</base-uri>
<base-uri>127.0.0.1:55988/hawkular/metrics</base-uri>
<ptrans.wildfly.port.offset>47908</ptrans.wildfly.port.offset>
<!-- IMPORTANT: The management port must be the port offset + 9990. -->
<ptrans.wildfly.management.port>57898</ptrans.wildfly.management.port>
Expand Down
2 changes: 1 addition & 1 deletion clients/ptranslator/ptrans.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ statsd.port=8125
collectd.port=25826

# REST endpoint
rest.url=http://localhost:8080/hawkular-metrics/test/guage/data
rest.url=http://localhost:8080/hawkular/metrics/test/guage/data
# Close connection to rest-server after this many requests
rest.close-after=200

Expand Down
2 changes: 1 addition & 1 deletion clients/ptranslator/src/assembly/dist/assets/ptrans.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ statsd.port=8125
collectd.port=25826

# REST endpoint
rest.url=http://localhost:8080/hawkular-metrics/test/guage/data
rest.url=http://localhost:8080/hawkular/metrics/test/guage/data
# Close connection to rest-server after this many requests
rest.close-after=200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static Configuration from(Properties properties) {
int minimumBatchSize = getIntProperty(properties, BATCH_SIZE, 50);
int maximumBatchDelay = getIntProperty(properties, BATCH_DELAY, 1);
URI restUrl = URI.create(properties.getProperty(REST_URL.getExternalForm(),
"http://localhost:8080/hawkular-metrics/metrics"));
"http://localhost:8080/hawkular/metrics/"));
int restCloseAfterRequests = getIntProperty(properties, REST_CLOSE_AFTER_REQUESTS, 200);
int spoolSize = getIntProperty(properties, SPOOL_SIZE, 10000);
return new Configuration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
public class RestForwardingHandlerITest {
private static final String BASE_URI = System.getProperty(
"hawkular-metrics.base-uri",
"127.0.0.1:8080/hawkular-metrics"
"127.0.0.1:8080/hawkular/metrics"
);
private static final String TENANT = "test";
private static final String METRIC_NAME = RestForwardingHandler.class.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class CollectdITest extends ExecutableITestBase {
private static final String COLLECTD_PATH = System.getProperty("collectd.path", "/usr/sbin/collectd");
private static final String BASE_URI = System.getProperty(
"hawkular-metrics.base-uri",
"127.0.0.1:8080/hawkular-metrics"
"127.0.0.1:8080/hawkular/metrics"
);

private String tenant;
Expand Down
2 changes: 1 addition & 1 deletion clients/ptranslator/src/test/resources/ptrans.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ statsd.port=8125
collectd.port=25826

# REST endpoint
rest.url=http://localhost:8080/hawkular-metrics/test/guage/data
rest.url=http://localhost:8080/hawkular/metrics/test/guage/data
# Close connection to rest-server after this many requests
rest.close-after=200

Expand Down
2 changes: 1 addition & 1 deletion rest-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

<properties>
<!-- IMPORTANT: The port must be the port offset + 8080. -->
<base-uri>127.0.0.1:55977/hawkular-metrics</base-uri>
<base-uri>127.0.0.1:55977/hawkular/metrics</base-uri>
<wildfly.port.offset>47897</wildfly.port.offset>
<!-- IMPORTANT: The management port must be the port offset + 9990. -->
<wildfly.management.port>57887</wildfly.management.port>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import groovyx.net.http.RESTClient

class RESTTest {

static baseURI = System.getProperty('hawkular-metrics.base-uri') ?: '127.0.0.1:8080/hawkular-metrics'
static baseURI = System.getProperty('hawkular-metrics.base-uri') ?: '127.0.0.1:8080/hawkular/metrics'
static final double DELTA = 0.001
static final String TENANT_PREFIX = UUID.randomUUID().toString()
static final AtomicInteger TENANT_ID_COUNTER = new AtomicInteger(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @author Jeeva Kandasamy
*/
public class InfluxDBTest {
static String baseURI = System.getProperty("hawkular-metrics.base-uri","127.0.0.1:8080/hawkular-metrics");
static String baseURI = System.getProperty("hawkular-metrics.base-uri", "127.0.0.1:8080/hawkular/metrics");
static final String DB_PREFIX = UUID.randomUUID().toString();
static InfluxDB influxDB = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @author Jeeva Kandasamy
*/
public class RESTTest {
static String baseURI = System.getProperty("hawkular-metrics.base-uri", "127.0.0.1:8080/hawkular-metrics");
static String baseURI = System.getProperty("hawkular-metrics.base-uri", "127.0.0.1:8080/hawkular/metrics");
static ResteasyClient restClient = null;
static ResteasyWebTarget target = null;

Expand Down

0 comments on commit 5f6f8a9

Please sign in to comment.