diff --git a/apps/segmentrouting/web/BUCK b/apps/segmentrouting/web/BUCK
new file mode 100644
index 0000000..bf6864c
--- /dev/null
+++ b/apps/segmentrouting/web/BUCK
@@ -0,0 +1,16 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:JACKSON',
+    '//lib:javax.ws.rs-api',
+    '//utils/rest:onlab-rest',
+    '//apps/segmentrouting/app:onos-apps-segmentrouting-app',
+]
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    web_context = '/onos/segmentrouting',
+    api_title = 'Segment Routing Rest Server',
+    api_version = '1.0',
+    api_description = 'REST API for Segment Routing Application',
+    api_package = 'org.onosproject.segmentrouting.web',
+)
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/package-info.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/package-info.java
new file mode 100644
index 0000000..ff9555e
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Segment routing application components.
+ */
+package org.onosproject.segmentrouting.web;
\ No newline at end of file
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyCodec.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyCodec.java
new file mode 100644
index 0000000..0dedc7c
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyCodec.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting.web;
+
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onosproject.segmentrouting.Policy;
+import org.onosproject.segmentrouting.TunnelPolicy;
+
+/**
+ * Codec of Policy class.
+ */
+public final class PolicyCodec extends JsonCodec<Policy> {
+
+    // JSON field names
+    private static final String POLICY_ID = "policy_id";
+    private static final String PRIORITY = "priority";
+    private static final String TYPE = "policy_type";
+    private static final String TUNNEL_ID = "tunnel_id";
+    private static final String DST_IP = "dst_ip";
+    private static final String SRC_IP = "src_ip";
+    private static final String PROTO_TYPE = "proto_type";
+    private static final String SRC_PORT = "src_tp_port";
+    private static final String DST_PORT = "dst_tp_port";
+
+    @Override
+    public ObjectNode encode(Policy policy, CodecContext context) {
+        final ObjectNode result = context.mapper().createObjectNode()
+                .put(POLICY_ID, policy.id());
+
+        result.put(PRIORITY, policy.priority());
+        result.put(TYPE, policy.type().toString());
+
+        if (policy.dstIp() != null) {
+            result.put(DST_IP, policy.dstIp());
+        }
+        if (policy.srcIp() != null) {
+            result.put(SRC_IP, policy.srcIp());
+        }
+        if (policy.ipProto() != null) {
+            result.put(PROTO_TYPE, policy.ipProto());
+        }
+
+        int srcPort = policy.srcPort() & 0xffff;
+        if (policy.srcPort() != 0) {
+            result.put(SRC_PORT, srcPort);
+        }
+        int dstPort = policy.dstPort() & 0xffff;
+        if (policy.dstPort() != 0) {
+            result.put(DST_PORT, dstPort);
+        }
+        if (policy.type() == Policy.Type.TUNNEL_FLOW) {
+            result.put(TUNNEL_ID, ((TunnelPolicy) policy).tunnelId());
+        }
+
+        return result;
+    }
+
+    @Override
+    public Policy decode(ObjectNode json, CodecContext context) {
+
+        String pid = json.path(POLICY_ID).asText();
+        String type = json.path(TYPE).asText();
+        int priority = json.path(PRIORITY).asInt();
+        String dstIp = json.path(DST_IP).asText();
+        String srcIp = json.path(SRC_IP).asText();
+        String tunnelId = json.path(TUNNEL_ID).asText();
+        String protoType = json.path(PROTO_TYPE).asText();
+        short srcPort = json.path(SRC_PORT).shortValue();
+        short dstPort = json.path(DST_PORT).shortValue();
+
+        if (json.path(POLICY_ID).isMissingNode() || pid == null) {
+            // TODO: handle errors
+            return null;
+        }
+
+        TunnelPolicy.Builder tpb = TunnelPolicy.builder().setPolicyId(pid);
+        if (!json.path(TYPE).isMissingNode() && type != null &&
+                Policy.Type.valueOf(type).equals(Policy.Type.TUNNEL_FLOW)) {
+
+            if (json.path(TUNNEL_ID).isMissingNode() || tunnelId == null) {
+                return null;
+            }
+
+            tpb.setTunnelId(tunnelId);
+            tpb.setType(Policy.Type.valueOf(type));
+
+            if (!json.path(PRIORITY).isMissingNode()) {
+                tpb.setPriority(priority);
+            }
+            if (dstIp != null) {
+                tpb.setDstIp(dstIp);
+            }
+            if (srcIp != null) {
+                tpb.setSrcIp(srcIp);
+            }
+            if (protoType != null) {
+                tpb.setIpProto(protoType);
+            }
+            if (dstPort != 0) {
+                tpb.setDstPort(dstPort);
+            }
+            if (srcPort != 0) {
+                tpb.setSrcPort(srcPort);
+            }
+        }
+
+        return tpb.build();
+    }
+
+}
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java
new file mode 100644
index 0000000..abfba3c
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting.web;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.segmentrouting.Policy;
+import org.onosproject.segmentrouting.SegmentRoutingService;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+/**
+ * Query, create and remove segment routing plicies.
+ */
+@Path("policy")
+public class PolicyWebResource extends AbstractWebResource {
+
+    private static final PolicyCodec POLICY_CODEC = new PolicyCodec();
+
+    /**
+     * Get all segment routing policies.
+     * Returns an array of segment routing policies.
+     *
+     * @return status of OK
+     */
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response getPolicy() {
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        List<Policy> policies = srService.getPolicies();
+        ObjectNode result = new ObjectMapper().createObjectNode();
+        result.set("policy", new PolicyCodec().encode(policies, this));
+
+        return ok(result.toString()).build();
+    }
+
+    /**
+     * Create a new segment routing policy.
+     *
+     * @param input JSON stream for policy to create
+     * @return status of the request - OK if the policy is created,
+     * @throws IOException if JSON processing fails
+     */
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public Response createPolicy(InputStream input) throws IOException {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode policyJson = (ObjectNode) mapper.readTree(input);
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        Policy policyInfo = POLICY_CODEC.decode(policyJson, this);
+
+        if (policyInfo.type() == Policy.Type.TUNNEL_FLOW) {
+            srService.createPolicy(policyInfo);
+            return Response.ok().build();
+        } else {
+            return Response.serverError().build();
+        }
+    }
+
+    /**
+     * Delete a segment routing policy.
+     *
+     * @param input JSON stream for policy to delete
+     * @return 204 NO CONTENT if the policy is removed
+     * @throws IOException if JSON is invalid
+     */
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    public Response removePolicy(InputStream input) throws IOException {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode policyJson = (ObjectNode) mapper.readTree(input);
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        Policy policyInfo = POLICY_CODEC.decode(policyJson, this);
+        // TODO: Check the result
+        srService.removePolicy(policyInfo);
+
+        return Response.noContent().build();
+    }
+
+}
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelCodec.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelCodec.java
new file mode 100644
index 0000000..b2d74b1
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelCodec.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting.web;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onosproject.segmentrouting.DefaultTunnel;
+import org.onosproject.segmentrouting.Tunnel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Codec of Tunnel class.
+ */
+public final class TunnelCodec extends JsonCodec<Tunnel> {
+
+    // JSON field names
+    private static final String TUNNEL_ID = "tunnel_id";
+    private static final String GROUP_ID = "group_id";
+    private static final String LABEL_PATH = "label_path";
+
+    @Override
+    public ObjectNode encode(Tunnel tunnel, CodecContext context) {
+        final ObjectNode result = context.mapper().createObjectNode()
+                .put(TUNNEL_ID, tunnel.id());
+
+        result.put(GROUP_ID, tunnel.groupId());
+
+        final ArrayNode jsonLabelIds = result.putArray(LABEL_PATH);
+
+        tunnel.labelIds().forEach(label -> jsonLabelIds.add(label.intValue()));
+
+        return result;
+    }
+
+    @Override
+    public DefaultTunnel decode(ObjectNode json, CodecContext context) {
+
+        String tid = json.path(TUNNEL_ID).asText();
+        List<Integer> labels = new ArrayList<>();
+
+        if (!json.path(LABEL_PATH).isMissingNode()) {
+            ArrayNode labelArray = (ArrayNode) json.path(LABEL_PATH);
+            for (JsonNode o : labelArray) {
+                labels.add(o.asInt());
+            }
+        }
+
+        return new DefaultTunnel(tid, labels);
+    }
+
+}
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelWebResource.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelWebResource.java
new file mode 100644
index 0000000..7a368f5
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/TunnelWebResource.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting.web;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.segmentrouting.SegmentRoutingService;
+import org.onosproject.segmentrouting.Tunnel;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+/**
+ * Query, create and remove segment routing tunnels.
+ */
+@Path("tunnel")
+public class TunnelWebResource extends AbstractWebResource {
+
+    private static final TunnelCodec TUNNEL_CODEC = new TunnelCodec();
+
+    /**
+     * Get all segment routing tunnels.
+     * Returns an array of segment routing tunnels.
+     *
+     * @return status of OK
+     */
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response getTunnel() {
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        List<Tunnel> tunnels = srService.getTunnels();
+        ObjectNode result = new ObjectMapper().createObjectNode();
+        result.set("tunnel", new TunnelCodec().encode(tunnels, this));
+
+        return ok(result.toString()).build();
+    }
+
+    /**
+     * Create a new segment routing tunnel.
+     *
+     * @param input JSON stream for tunnel to create
+     * @return status of the request - OK if the tunnel is created,
+     * @throws IOException if the JSON is invalid
+     */
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public Response createTunnel(InputStream input) throws IOException {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode tunnelJson = (ObjectNode) mapper.readTree(input);
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        Tunnel tunnelInfo = TUNNEL_CODEC.decode(tunnelJson, this);
+        srService.createTunnel(tunnelInfo);
+
+        return Response.ok().build();
+    }
+
+    /**
+     * Delete a segment routing tunnel.
+     *
+     * @param input JSON stream for tunnel to delete
+     * @return 204 NO CONTENT, if the tunnel is removed
+     * @throws IOException if JSON is invalid
+     */
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    public Response removeTunnel(InputStream input) throws IOException {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode tunnelJson = (ObjectNode) mapper.readTree(input);
+        SegmentRoutingService srService = get(SegmentRoutingService.class);
+        Tunnel tunnelInfo = TUNNEL_CODEC.decode(tunnelJson, this);
+        srService.removeTunnel(tunnelInfo);
+
+        return Response.noContent().build();
+    }
+
+}
diff --git a/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/package-info.java b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/package-info.java
new file mode 100644
index 0000000..101d40e
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/java/org/onosproject/segmentrouting/web/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Set of resources implementing the segment routing application REST API.
+ */
+package org.onosproject.segmentrouting.web;
\ No newline at end of file
diff --git a/apps/segmentrouting/web/src/main/webapp/WEB-INF/web.xml b/apps/segmentrouting/web/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..5aac978
--- /dev/null
+++ b/apps/segmentrouting/web/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2015-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="ONOS" version="2.5">
+    <display-name>Segment Routing REST API v1.0</display-name>
+
+    <servlet>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>jersey.config.server.provider.classnames</param-name>
+            <param-value>
+                org.onosproject.segmentrouting.web.TunnelWebResource,
+                org.onosproject.segmentrouting.web.PolicyWebResource
+            </param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>
