# Error while creating application with rest api

**URL:** <https://community.wowza.com/t/error-while-creating-application-with-rest-api/54575>\
**Category:** Wowza Streaming Engine\
**Created:** [February 3, 2020, 4:08pm UTC](https://community.wowza.com/t/error-while-creating-application-with-rest-api/54575 "2020-02-03T16:08:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![developer\_goplaybook](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@developer\_goplaybook](https://community.wowza.com/u/developer_goplaybook)\
**Post date:** [February 3, 2020, 4:08pm UTC](https://community.wowza.com/t/error-while-creating-application-with-rest-api/54575/1 "2020-02-03T16:08:22Z")

</div>

I am trying to create a simple application with rest api in python and i am getting error. Please look below my code and error log

**PYTHON SCRIPT**

import requests  
from requests.auth import HTTPDigestAuth

headers = {  
‘Content-Type’: ‘application/json; charset=utf-8’,  
‘Accept’: ‘application/json; charset=utf-8’  
}

data = {  
“restURI”: “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/testlive”,  
“name”: “testlive”,  
“appType”: “Live”,  
“clientStreamReadAccess”: “_",  
“clientStreamWriteAccess”: "_”,  
“description”: “A basic live application”,  
“streamConfig”: {  
“restURI”: “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/testlive/streamconfiguration”,  
“streamType”: “live”  
}  
}

url = “[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/testlive”

r = requests.post(url,headers=headers,auth=HTTPDigestAuth(‘username’, ‘password’))

r.json()

**RESPONSE:**

{‘code’: ‘500’,  
‘message’: ‘The server encountered an unexpected condition which prevented it from fulfilling the request’,  
‘success’: False,  
‘wowzaServer’: ‘4.7.8’}

**ERROR LOG:**

ERROR server comment 2020-02-03 08:11:45 - - - - - 238714.72 - - - - - - - - class com.wowza.wms.rest.vhosts.applications.ApplicationConfig.post : java.lang.IllegalArgumentException: argument “src” is null|at com.fasterxml.jackson.databind.ObjectReader.\_assertNotNull(ObjectReader.java:2120)|at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1224)|at org.restlet.ext.jackson.JacksonRepresentation.getObject(JacksonRepresentation.java:309)|at com.wowza.wms.rest.ConfigBase.getObject(ConfigBase.java:2782)|at com.wowza.wms.rest.ConfigBase.post(ConfigBase.java:3575)|

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [February 3, 2020, 7:11pm UTC](https://community.wowza.com/t/error-while-creating-application-with-rest-api/54575/2 "2020-02-03T19:11:21Z")

</div>

Thanks for sharing the info @developer goplaybook, but Wowza does not officially support a Python wrapped API call so I have no official documentation to share with you.

If you do not get a response from a community member here in the forum, I would suggest checking GitHub where I saw some people posting examples of [python wrapped wowza API calls](https://github.com/ATLUSio/wowza). This is not anything Wowza has built so please know this is all external code.
