Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
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 '12 at 20:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.