<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you 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.
  -->

<!-- This file contains the list of permissions that are associated with URL end points
    of the web app. Each permission should contain the name, permission path ,API path
    (URL) , HTTP method and OAUTH2 authorization scope (not-required).
    When defining dynamic paths for APIs, path variables are denoted by '*' notation.
    NOTE: All the endpoints of the web app should be available in this file. Otherwise
    it will result 403 error at the runtime.
-->
<PermissionConfiguration>
	<APIVersion></APIVersion>
	<!-- Device related APIs -->
	<Permission>
		<name>Set words</name>
		<path>/device-mgt/user/operations</path>
		<url>/device/*/words</url>
		<method>POST</method>
		<scope>android_sense_user</scope>
	</Permission>
	<Permission>
		<name>set word threshold information</name>
		<path>/device-mgt/user/operations</path>
		<url>/device/*/words/threshold</url>
		<method>POST</method>
		<scope>android_sense_user</scope>
	</Permission>
	<Permission>
		<name>delete words</name>
        <path>/device-mgt/user/operations</path>
        <url>/device/*/words</url>
		<method>DELETE</method>
		<scope>android_sense_user</scope>
	</Permission>
	<Permission>
		<name>get device stats</name>
		<path>/device-mgt/user/stats</path>
		<url>/stats/*/sensors/*</url>
		<method>GET</method>
		<scope>android_sense_device</scope>
	</Permission>
    <Permission>
        <name>Add device</name>
        <path>/device-mgt/user/devices</path>
        <url>/device/*/register</url>
        <method>POST</method>
        <scope>android_sense_user</scope>
    </Permission>
</PermissionConfiguration>
