Retrieve All Inspections from Single Farm

Number of APIs: 3

Three requests are required to retrieve inspection data. In order for this collection to work, an org_id must be provided, either as a environment variable set in the Qodex environment, or as a collection variable in the pre-request script of the second request (there is a commented example).

The first request is to retrieve the bearer token necessary for authentication. This is a common theme and it is generally best practice to call this once for a session and store the result as an environment variable. We do just that in the post-response scripts for this request.

The second request is GET Solar Farm Data. In this flow we'll use post-request scripts to pull the farm UUID from the first farm returned into the environment so we can retrieve a list of inspections associated with that farm.

The third and final request is GET Solar Inspection Data using the UUID retrieved from the second request. This will return a list of inspections associated with the specified farm. As a convenience, we log out the names of the inspections as an example for how to interact with the data.

  1. Retrieve Bearer Token POST {{url}}/oauth/token

  2. GET Solar Farm Data GET {{url}}/solar_farms?org_id={{org_id}}

  3. GET Solar Inspection Data GET {{legacy_url}}/solar_farms/{{farm_uuid}}/solar_inspections?org_id={{org_id}}