1

I successfully use the music rest API to fetch cover art, artists and albums, and songs. But if I want to to use rest/download.view or rest/stream.view I get a 404 and the content is a html page. The id I put on the request is fetched before with the API. It has the form: egde:

The url I call looks like https://one.ubuntu.com/music/rest/download.view?u=x&p=x&v=1.2.0&c=bla&id=egde%3A I make a GET call.

In case of a error it should return the content type "text/xml" but it is "text/html"

So it seems the URL isn't known by the server.

What do I wrong and how can I obtain a stream or the file for download via the music rest API?

1 Answer 1

2

Hrm, I don't know the cause offhand. The "id=egde%3A" looks suspicious because it looks like an english word and IDs are complex encodings of numbers. The canonical hostname of streaming should be, as far as I know, "streaming.one.ubuntu.com"; probably nothing else is guaranteed to work.

So, to get the index of artists, then pick the first artist, the first album, and stream the first song, your conversation might look like this:

https://streaming.one.ubuntu.com/rest/getIndexes.view?&u=07136529&p=92874536&v=1.2.0&c=android

https://streaming.one.ubuntu.com/rest/getMusicDirectory.view?id=dcec086c78a8c170df18d500dd8f0b46&u=07136529&p=92874536&v=1.2.0&c=android

https://streaming.one.ubuntu.com/rest/getMusicDirectory.view?id=7b6b42accb9c20d3ac6c3cc4c34cc8e5&u=07136529&p=92874536&v=1.2.0&c=android

https://streaming.one.ubuntu.com/rest/stream.view?id=eLDxbcnwR1it2WTBVCSmXQ&u=07136529&p=92874536&v=1.2.0&c=android
1
  • Thank you Chad. The server url was wrong and is like you told. The answer is also in the FAQ one.ubuntu.com/help/faq/… but not in the documentation.
    – mascha
    Apr 2, 2012 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .