Hi @Rajesh - you might find what you’re looking for in these two documentation pages:
General farmOS API: https://farmos.org/development/api/
Sensor Listener API: https://farmos.org/guide/assets/sensors/#farm-sensor-listener
With regard to your specific examples:
Extract the activity data for a specific date or a specific asset.
Logs can be filtered by asset ID using
Logs can be filtered similarly with their
timestamp property - but right now it’s tricky to query logs with a specific date via the API because logs are stored with a timestamp, and the RESTful Web Services module (which provides the farmOS API) does not support “greater than” or “less than” filters in URL queries. My hope is that filtered queries like this will be much easier in farmOS 2.0 with the GraphQL module (work in progress).
There is a patch available for the RESTful Web Services module that is marked as “Needs Review” - if that is merged into the project then it would allow us more flexibility in farmOS 1.x: https://www.drupal.org/project/restws/issues/1910294
how can sensor data be extracted using API and search criteria as listed above
Sensor data has it’s own API (different from logs), which does support timestamp ranges. For more details, see https://farmos.org/guide/assets/sensors/#pulling-data-from-a-listener