wso2 / carbon-device-mgt

Apache License 2.0
53 stars 113 forks source link

New Activity Info Provider API resource which accept an array of activity IDs to get activity information #1161

Closed madhawap closed 6 years ago

madhawap commented 6 years ago

Purpose

The current activity info provider API has two API resources which allows to retrieve activity information without passing the device type, or the activity type. These two allows to retrieve information about single activity by passing the necessary activity ID or allows to retrieve the all the activity information at once. Hence, this API resource will accept an array of activity IDs where it can query information of 1 - 10 activities at once: Resolves https://github.com/wso2/product-iots/issues/1531, https://github.com/wso2/product-iots/issues/1607

Goals

Add new Activity Info Provider API resource which accept an array of activity IDs

User stories

When a user needs to get information of set of activities at once then he need to call the get activities API with relevant activity IDs. For an example let's say someone triggers RING API 5 times every 5 minutes. Then 5 activity IDs will be received for 5 operations. If somebody needs to get the status of all five ring operations at once, GET /activities/ids API can be called with the related activity Id list at once instead of calling GET /activity API 5 times.

Automation tests

Security checks