# Wowza REST API

**URL:** <https://community.wowza.com/t/wowza-rest-api/33780>\
**Category:** Wowza Developer Dojo\
**Created:** [September 5, 2015, 1:28pm UTC](https://community.wowza.com/t/wowza-rest-api/33780 "2015-09-05T13:28:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [September 5, 2015, 1:28pm UTC](https://community.wowza.com/t/wowza-rest-api/33780/1 "2015-09-05T13:28:33Z")

</div>

Hi,

Im currently using the Wowza REST API. When creating a new application with PHP CURL

The application is created but the response is false

\<?xml version="1.0" encoding="UTF-8" ?\>\n

\n

false\n

C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.2.0\conf\testlive\Application.xml (The system cannot find the path specified)\n

Any ideas

Im sending in:

$json-\>restURI = env(‘WOWZA\_HOST’) . ‘applications/’ . $name;

$json-\>name = $name;

$json-\>appType = ‘Live’;

$json-\>clientStreamReadAccess = “\*”;

$json-\>clientStreamWriteAccess = “\*”;

$json-\>description = ‘DESC’;

$json-\>streamConfig = new stdClass();

$json-\>streamConfig-\>restURI = ‘[http://localhost:8087/v2/servers/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/testlive/streamconfiguration’;

$json-\>streamConfig-\>streamType = ‘live’;

---

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [September 5, 2015, 3:07pm UTC](https://community.wowza.com/t/wowza-rest-api/33780/2 "2015-09-05T15:07:22Z")

</div>

> Hi,
> 
> Im currently using the Wowza REST API. When creating a new application with PHP CURL
> 
> The application is created but the response is false
> 
> \<?xml version="1.0" encoding="UTF-8" ?\>\n
> 
> \n
> 
> false\n
> 
> C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.2.0\conf\testlive\Application.xml (The system cannot find the path specified)\n
> 
> Any ideas
> 
> Im sending in:
> 
> $json-\>restURI = env(‘WOWZA\_HOST’) . ‘applications/’ . $name;
> 
> $json-\>name = $name;
> 
> $json-\>appType = ‘Live’;
> 
> $json-\>clientStreamReadAccess = “\*”;
> 
> $json-\>clientStreamWriteAccess = “\*”;
> 
> $json-\>description = ‘DESC’;
> 
> $json-\>streamConfig = new stdClass();
> 
> $json-\>streamConfig-\>restURI = ‘[http://localhost:8087/v2/servers/\_defaultServer\_/vhosts/\_defaultVHost\_/applications/testlive/streamconfiguration](http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive/streamconfiguration)’;
> 
> $json-\>streamConfig-\>streamType = ‘live’;

Nevermind. Found the issue streamconfig restURI was fault…

---

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [September 6, 2015, 12:33pm UTC](https://community.wowza.com/t/wowza-rest-api/33780/3 "2015-09-06T12:33:30Z")

</div>

I do have another question. When setting the application everything goes fine. But the application is already created with that name. I don’t get a JSON back. But instead I get an XML back with the error code. Is this normal behavior or is it me doing something

\<?xml version="1.0" encoding="UTF-8" standalone="no"?\>4.2.0`409`The request could not be completed due to a conflict with the current state of the resource"

---

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [September 9, 2015, 6:44pm UTC](https://community.wowza.com/t/wowza-rest-api/33780/4 "2015-09-09T18:44:20Z")

</div>

Thanks Matt,

Is it already in the 4.2.0.01 build? or coming up in a future release?

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [September 8, 2015, 5:29pm UTC](https://community.wowza.com/t/wowza-rest-api/33780/5 "2015-09-08T17:29:44Z")

</div>

Hello

We are aware of the issue that results in an XML error response upon requesting a json content type. Please look out for our next release as it should contain the update that will honor the requested return type (in this case json) for these errors.

Thanks,

Matt
