Get all solar farms in an organization. Farms can be sorted by name, size, country, state, or asset_id. Farms can be filtered by asset_id, country, name, or state. Endpoint is paginated and has a maximum page size of 100.
This route is documented in Raptor Maps public Postman Collection found here
For an example of how to use this API, we consider a situation where an organization has nearly 100 farms but only wants to pull 10 of them at a time. We use the offset and limit params to paginate through the solar farms. We would maybe pull the ID for each response object and use that to retrieve other information such as inspections and defects or equipment.
First call goes to https://api.raptormaps.com/v2/solar_farms?org_id={{org_id}}&limit=10&offset=0. This will bring back 10 farm objects as documented below. If we think about all the farms in an organization as an array, this will return farms 0-9 of that array.
Second call would go to https://api.raptormaps.com/v2/solar_farms?org_id={{org_id}}&limit=10&offset=10. Again, this will returns 10 farm objects but because of our offset value, it will bring back objects 10-19.
Repeat this process until either the API returns nothing or a number of objects less than our limit. In the case there are 86 farms in our org, we would run this 9 times and then stop since the last response will only contain 6 objects.