Skip to content

Commit 38f05f2

Browse files
committed
Address feedback
1 parent 3cb6496 commit 38f05f2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/howto-api-image-export.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
You can use the XDMoD API to image export your saved metric explorer charts. A local XDMoD account is **required** to authenticate through the API.
22

3-
The following Python script will export your saved metric explorer charts. The `dotenv` library is recommended when authenticating through XDMoD API. You can install the `dotenv` library using:
3+
The following Python script will export your saved metric explorer charts. The `dotenv` and `requests` libraries are used when authenticating through the XDMoD API. You can install these libraries through:
44

5-
`$ pip install python-dotenv`
5+
```shell
6+
pip install python-dotenv
7+
pip install requests
8+
```
69

710
Before running the script,
811

9-
1. Create a `.env` file with your local XDMoD account credentials in the same directory as the script
12+
1. Install the required dependencies listed above.
13+
1. Create a `.env` file with your local XDMoD account credentials in the same directory as the script.
1014
1. Update `site_address` within the script with site address associated with your XDMoD instance.
1115
1. Confirm the `image_format` within the script.
1216

13-
The script will export your saved metric explorer charts to the current working directory.
17+
The script will export your saved metric explorer charts to the current working directory. **\*Note:** Replace `<XDMOD_URL_HERE>` with your site address.
1418

1519
```python
1620
#!/usr/bin/env python3
@@ -24,7 +28,7 @@ load_dotenv()
2428

2529
username = os.getenv('XDMOD_USERNAME')
2630
password = os.getenv('XDMOD_PASSWORD')
27-
site_address = ""
31+
site_address = "<XDMOD_URL_HERE>"
2832
image_format = "svg"
2933

3034
session = requests.Session()

0 commit comments

Comments
 (0)