Solutions

How you benefit

Resources

About

Solutions

How you benefit

Resources

About

/

Getting Started

/

Using the Raptor Maps API

Using the Raptor Maps API

Using the Raptor Maps API

Using the Raptor Maps API

Using the Raptor Maps API

Using the Raptor Maps API

Access full API documentation here.

An introduction to the Raptor Maps APIs

Raptor Maps strives to supply world-class data and analytics for solar farm construction and maintenance. We provide a set of APIs in order for you to interact with information in our system, providing a pathway to integrate between Raptor Maps and your internal systems for a richer, more complete experience. These APIs are documented at https://docs.raptormaps.com/reference/reference-getting-started.

The APIs provide a pathway for programmatically pulling solar farm data or retrieving an overview of inspection findings. The basic set of APIs  are a logical group of endpoints covering solar_farms, solar_inspections, and anomalies. Using this it would be possible to create an integration between you and Raptor Maps that might look like an internal task system that updates the Raptor Maps anomaly data after maintenance makes a pass through the farm or a section of the farm.

Before we talk about the general use for each of these endpoints, we should talk about a particular field that’s important for integrating your data into the Raptor Maps system, asset_id. The asset_id is an external farm identifier and has been included in the farm data object to ease integration. This allows you to map whatever identifier is being used in your internal systems into the Raptor Maps system to make searching between the two databases easier. For example, you might map the internal name into the asset_id, or make it a combination of id and name.

The key to most of Raptor Maps use cases is the solar farm. We put the asset_id field in the farm object in order to make the connection to the other data objects easier. A simple use case would be pulling all anomalies for a particular solar farm.

First step is to find your organization ID or org_id. In the left hand navigation sidebar, click your name and then find the “my profile” option in the dropdown.

Clicking this will get you to your API credentials and a list of organizations you have access to. Find the ID number for the org you wish to access and use it for the next request.

The next request would be to pull all the farms for your organization using the organization ID just retrieved.
Find a farm you wish to query in the solar_farms response and use the farm ID to pull a list of inspections.
Once the inspection data is in hand, the inspection ID can be used to pull a list of all anomalies.

At a high level, this example breaks down like this:

GET /solar_farms?org_id=<your organization id number>
GET /solar_inspections/<farm_id>
GET /anomalies/<inspection_id>

Example for one farm:

def get_bearer_token():
	client_secret = os.environ["CLIENT_SECRET"]
	client_id = os.environ["CLIENT_ID"]
	headers = {"content-type": "application/json"}
	url = f"https://api.raptormaps.com/oauth/token"
	body = {
		"client_id": client_id,
		"client_secret": client_secret,
	
		"audience": "api://customer-api"
	}

	token_response = requests.post(url, headers=headers, data=json.dumps(body))

	response_data = token_response.json()
	return response_data.get("access_token")

def get_solar_farms(token, org_id):
	header = {"authorization": f"Bearer {token}"}
	res = requests.get(
    	f"https://api.raptormaps.com/v2/solar_farms?org_id={org_id}",
    	headers=header
    	)
	return res.json()

def get_solar_inspections(token, farm_id, org_id):
	header = {"authorization": f"Bearer {token}"}
	res = requests.get(
f"https://api.raptormaps.com/v2/solar_farms/{farm_id}/solar_inspections?org_id={org_id}",
    	headers=header
    	)
	return res.json()

def get_solar_anomalies(token, inspection_id):
	header = {"authorization": f"Bearer {token}"}
	res = requests.get(   	f"https://api.raptormaps.com/v2/solar_inspections/{inspection_id}/anomalies?org_id={org_id}",
    	headers=header
    	)
	return res.json()

token = get_bearer_token()
farms = get_solar_farms(token, <org_id>)
inspections = get_solar_inspections(token, farms[0][‘id’], <org_id>)
anomalies = get_solar_anomalies(inspections[0][‘id’], <org_id>

If integrating to an existing internal system where the asset_id has been provided to Raptor Maps either during the farm creation process or the farm update API, individual ids can be searched for by changing the get_solar_farms request.

Example for a particular farm:

def get_solar_farms(asset_id):
	header = {"authorization": f"Bearer {token}"}
	res = requests.get(
f"https://api.raptormaps.com/v2/solar_farms?org_id={org_id}&asset_id={asset_id}",
    	headers=header
    	)
	return res.json()

Access full API documentation here.

© 2024 Raptor Maps, Inc.

444 Somerville Ave.
Somerville, MA 02143

Stay Up to Date

Subscribe to our newsletter and stay informed about innovations in solar asset optimization, deploying robotics for solar, our research and testing with OEMs, the latest in our product development, and more.

© 2024 Raptor Maps, Inc.

444 Somerville Ave.
Somerville, MA 02143

Stay Up to Date

Subscribe to our newsletter and stay informed about innovations in solar asset optimization, deploying robotics for solar, our research and testing with OEMs, the latest in our product development, and more.

© 2024 Raptor Maps, Inc.

444 Somerville Ave.
Somerville, MA 02143

Stay Up to Date

Subscribe to our newsletter and stay informed about innovations in solar asset optimization, deploying robotics for solar, our research and testing with OEMs, the latest in our product development, and more.

© 2024 Raptor Maps, Inc.

444 Somerville Ave.
Somerville, MA 02143

Stay Up to Date

Subscribe to our newsletter and stay informed about innovations in solar asset optimization, deploying robotics for solar, our research and testing with OEMs, the latest in our product development, and more.

© 2024 Raptor Maps, Inc.

444 Somerville Ave.
Somerville, MA 02143

Stay Up to Date

Subscribe to our newsletter and stay informed about innovations in solar asset optimization, deploying robotics for solar, our research and testing with OEMs, the latest in our product development, and more.