# restAPI to create a Wowza CDN stream target

**URL:** https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482
**Category:** Wowza Streaming Engine
**Tags:** cdn, rest-api
**Created:** [June 29, 2020, 2:20pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482 "2020-06-29T14:20:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Clevelland](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Clevelland](https://community.wowza.com/u/Mark_Clevelland)
#### Post date: [June 29, 2020, 2:20pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/1 "2020-06-29T14:20:58Z")

</div>

Hi Wowza,

I have WSE 4.7.8 and my application communicates with the engine via restFul API.

I have a couple of rtsp camera I want to transcode and send to the Wowza CDN.

I already have a Cloud account and everything is fine when I configure the system from the manager.

The issue comes when I try to integrate the solution using the rest API.

I saw this article:

[https://www.wowza.com/docs/how-to-send-a-stream-from-wowza-streaming-engine-to-a-wowza-cdn-hls-target-by-using-the-wowza-streaming-engine-and-wowza-streaming-cloud-rest-apis](https://www.wowza.com/docs/how-to-send-a-stream-from-wowza-streaming-engine-to-a-wowza-cdn-hls-target-by-using-the-wowza-streaming-engine-and-wowza-streaming-cloud-rest-apis)

but this APi doesn’t work for me:

```auto
curl -X POST \
-H "Content-Type: application/json" \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
-d '{
   "stream_target_akamai": {
     "name": "MyCloudHLStarget",
     "provider": "akamai_cupertino"
   }
}' "${WSC_HOST}/api/${WSC_VERSION}/stream_targets/akamai"

```

Can you please double check this API is still working and this is the right documentation.

Moreover, where should I inset the Cloud username and password to be used for the CDN ?

Thank you for the help,

Mark

---

<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: [June 29, 2020, 6:07pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/2 "2020-06-29T18:07:03Z")

</div>

Hi @Mark Clevelland, when you say passwords, are you referring to the keys? That is what you use to authenticate for that workflow. Or do you mean how to authenticate the RTSP source? I had the Cloud Product Manager take a peek and there are no issues with the docs and it’s al working fine. If you want to sed a support ticket, an engineer can walk you through the setup.

I can share this tutorial as well.

[https://www.wowza.com/docs/connect-an-rtsp-encoder-to-wowza-streaming-cloud-using-the-wowza-streaming-cloud-rest-api](https://www.wowza.com/docs/connect-an-rtsp-encoder-to-wowza-streaming-cloud-using-the-wowza-streaming-cloud-rest-api)

Let me see if I can find a video tutorial showing all the steps.

---

<div class="post-metadata">

### Author: ![Mark\_Clevelland](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Clevelland](https://community.wowza.com/u/Mark_Clevelland)
#### Post date: [June 29, 2020, 9:33pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/3 "2020-06-29T21:33:34Z")

</div>

Hi Rose,

thank you for your response.

The link you included is for pushing the stream from Engine to Cloud.

Indeed, Im trying to push the stream from Engine to the Wowza CDN.

When I do this operation manually using the Engine Manager, everything works fine.

It’s only when I use the Rest API following this tutorial:

[https://www.wowza.com/docs/how-to-send-a-stream-from-wowza-streaming-engine-to-a-wowza-cdn-hls-target-by-using-the-wowza-streaming-engine-and-wowza-streaming-cloud-rest-apis](https://www.wowza.com/docs/how-to-send-a-stream-from-wowza-streaming-engine-to-a-wowza-cdn-hls-target-by-using-the-wowza-streaming-engine-and-wowza-streaming-cloud-rest-apis)

The API doesn’t work for me.

It always returns 404:

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

4.8.0.01

`404`

The server has not found anything matching the request URI

Did you say you have tested this API and it works fine for you ?

Thanks

---

<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: [June 30, 2020, 2:49am UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/4 "2020-06-30T02:49:24Z")

</div>

Here you go @Mark Clevelland…these two docs are the ones that you need:

[https://www.wowza.com/docs/how-to-push-streams-to-cdns-and-other-services-push-publishing#about-the-push-publishing-api](https://www.wowza.com/docs/how-to-push-streams-to-cdns-and-other-services-push-publishing#about-the-push-publishing-api)

[https://www.wowza.com/docs/stream-targets-query-examples-push-publishing](https://www.wowza.com/docs/stream-targets-query-examples-push-publishing)

Hope that helps and please know that you can always [submit a support ticket](https://www.wowza.com/support/open-ticket) to get free assistance from an engineer in setting it up.

---

<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: [June 30, 2020, 2:51am UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/5 "2020-06-30T02:51:51Z")

</div>

I didn’t, but I asked our Cloud engineer if the docs were correct and he said there were no reports of any bugs.

If you’d like your workflow tested we’d be happy to do so for free in a ticket. Support can’t debug in forums.

---

<div class="post-metadata">

### Author: ![Mark\_Clevelland](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Clevelland](https://community.wowza.com/u/Mark_Clevelland)
#### Post date: [July 30, 2020, 2:30pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/6 "2020-07-30T14:30:58Z")

</div>

Thank you Rose,

the link you gave me works fine and I was able to create a CDN stream target.

Thanks for your help

---

<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: [July 30, 2020, 3:26pm UTC](https://community.wowza.com/t/restapi-to-create-a-wowza-cdn-stream-target/55482/7 "2020-07-30T15:26:37Z")

</div>

Oh I’m so glad it worked out for you. Thanks for letting me know.
