# Ignition Webdev Get API

**URL:** <https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571>\
**Category:** Ignition\
**Created:** [May 22, 2025, 3:07pm UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571 "2025-05-22T15:07:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [May 22, 2025, 3:07pm UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571/1 "2025-05-22T15:07:52Z")

</div>

Hello team,  
Im trying to build API by webdev module. Im getting error

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bb1b6e5f0e502f98008fa38a87c425376435e49.png)  
I have attached simple system library function for AP which call named query & revert back result by API  
API request:

```python
ParamId=1

URL="http://10.30.80.6:8088/system/webdev/Reports/GetEntityLevel"
params={"params": ParamId} 
client = system.net.httpClient()
data='application/json'
print params
response = client.get(URL,data,params)
print response
print response.getStatusCode()
print response.getText()  

```

API code

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a9c68a3c915c9ee4263fc96041ed4759136a87ee.png)

API response

```python
{'params': 1}
<Response@883603983 'http://10.30.80.6:8088/system/webdev/Reports/GetEntityLevel?application/json' [500]>
500
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500 Server Error</h2>
<table>
<tr><th>URI:</th><td>/system/webdev/Reports/GetEntityLevel</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Server Error</td></tr>
</table>

</body>
</html>

```

Please help with below error

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 22, 2025, 3:11pm UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571/2 "2025-05-22T15:11:50Z")

</div>

The first line of the stacktrace tells you exactly what's wrong: `KeyError`.  
try `request['data']['params']`

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [May 23, 2025, 6:07am UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571/3 "2025-05-23T06:07:38Z")

</div>

Hello @pascal.fragnoud

Thanks for support..  
Now after changing im getting error

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a548be057aed7804b5156b62e238d2cb7c4a5da0.png)

Please help to resolve issue

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 23, 2025, 7:23am UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571/4 "2025-05-23T07:23:53Z")

</div>

You'll have to show some code if you want help fixing code...  
The only thing we can say from this: you're trying to subscript a string like a dict:  
`"some_string"['key']` instead of `"some_string[indice]"`

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [May 23, 2025, 1:27pm UTC](https://forum.inductiveautomation.com/t/ignition-webdev-get-api/106571/5 "2025-05-23T13:27:27Z")

</div>

Hello @pascal.fragnoud  
Thanks its working for me
