Skip to content

Commit

Permalink
Fix some wrong information and add how to delete systems
Browse files Browse the repository at this point in the history
  • Loading branch information
meteoDaniel committed Jan 30, 2025
1 parent 6bc0ac6 commit c85e15d
Showing 1 changed file with 198 additions and 1 deletion.
199 changes: 198 additions & 1 deletion docs/solar_power_forecast/setup_pv_portfolio_forecast.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ After setting up your portfolio or to check out existing locations, you can use

``` bash
curl --request GET \
--url 'https://api.alitiq.com/pv_systems/list?response_format=json' \
--url 'https://solar.alitiq.com/pv_systems/list?response_format=json' \
--header 'x-api-key: api-key'
```

Expand Down Expand Up @@ -280,6 +280,203 @@ In case you use the html- Response of the API the systems will be shown in a tab

---


## Inspect your portfolio

After setting up your portfolio or to check out existing locations, you can use the `pv_systems/list` endpoint.

=== "python requests"

``` python
import requests

url = "https://solar.alitiq.com/pv_systems/list"

querystring = {"response_format":"html"}

payload = ""
headers = {"x-api-key": {api-key}}
response = requests.request("GET", url, data=payload, params=querystring, headers=headers)

print(response.text)
```

=== "alitiq-py"

``` python
from alitiq import alitiqSolarAPI

# Initialize the API client
solar_api = alitiqSolarAPI(api_key="your-api-key")

# return the location as a pd.DataFrame
response = solar_api.list_locations()
print("Locations:", response)
```

=== "cURL"

``` bash
curl --request GET \
--url 'https://solar.alitiq.com/pv_systems/list?response_format=json' \
--header 'x-api-key: api-key'
```


Example response json:
```json
{
"columns": [
"location_id",
"altitude",
"latitude",
"longitude",
"site_name",
"zip_code",
"country",
"do_backtracking",
"row_distance",
"tso_area",
"subsystem_id",
"installed_power",
"installed_power_inverter",
"temp_factor",
"azimuth",
"tilt",
"mover",
"height",
"table_length",
"max_rotation_angle"
],
"index": [
0,
1,
2,
3
],
"data": [
[
"1",
126.95,
50.06,
8.83,
"Obertshausen",
"63179",
"DE",
false,
null,
"Amprion",
5599,
709.3,
636.0,
0.0,
195.0,
10.0,
1,
null,
null,
null
],
[
"1",
126.95,
50.06,
8.83,
"Obertshausen",
"63179",
"DE",
false,
null,
"Amprion",
5759,
999.38,
480.0,
0.0,
180.0,
15.0,
1,
null,
null,
null
],
[
"4507",
557.75,
48.9,
10.3,
"test_2",
null,
null,
null,
null,
null,
5796,
320.0,
300.0,
0.0,
50.0,
15.0,
1,
null,
null,
null
]
]
}
```

In the response of your portfolio you might find additional information that you have not defined e.g. the TSO-Area or a ZIP Code. These information are defined by alitiq.

In case you use the html- Response of the API the systems will be shown in a table like this:

![html-overview API](html_overview_api.png)

---

## Delete system from your portfolio

In case you want to delete a pv-system from your portfolio, you can simply use a POST request to the endpoint `pv_systems/delete` it. Please use your individually defined location_id to delete the system:

=== "python requests"

``` python
import requests

url = "https://solar.alitiq.com/pv_systems/delete"

querystring = {"location_id": "your-location-id-to-delete"}

payload = ""
headers = {"x-api-key": {api-key}}
response = requests.request("POST", url, data=payload, params=querystring, headers=headers)

print(response.text)
```

=== "alitiq-py"

``` python
from alitiq import alitiqSolarAPI

# Initialize the API client
solar_api = alitiqSolarAPI(api_key="your-api-key")

# delete location
response = solar_api.delete_location("your-location-id-to_delete")
print(response.text)
```

=== "cURL"

``` bash
curl --request POST \
--url 'https://solar.alitiq.com/pv_systems/delete?location_id=your-location-id-to_delete' \
--header 'x-api-key: api-key'
```

---


## FAQs ❓

### Which temp_factor should I use?
Expand Down

0 comments on commit c85e15d

Please sign in to comment.