Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Web Services Upload Document

I'm having trouble getting an upload URL for an AddCourse call. It says to make the call:

https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/valenciacc.edu.127 9686253


Additionally, valenciacc.edu.1279686253 is the iTunes U identifier for the tab. Where can I find this identifier? I'm trying to add some courses under a certain section.


Thanks,

Doug

Valencia Community College


[Personal Information Edited by Host]

Windows XP

Posted on Jun 5, 2007 1:31 PM

Reply
9 replies

Sep 3, 2018 1:09 AM in response to richwolf

I am having the identical problem as Mazhar.

I however, have not been able to upload an xml file like him.

I am getting an HttpStatus code 403 Forbidden.

I am using jakartas HttpClient and/or curl.

My tokens work to get showTree responses just fine, so I don't have any reason to suspect my credentials string.

Here is the url I am sending using a get method:

https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/myschool.edu.13249 41395.01324941402?credentials=Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3 Amyschool.edu&identity=%22joebloe%22%3Cjoe.blow%40myschool.edu%3E+%28joeblow%29%5B23413%5D&time=1181696654&signature=4a10e710f123dde248f2bac1684171601d973d564b 2d6696314d1d5c3b5cd319

Scratching my head... Mazhar, have you figured it out yet?

Any help, well, mui appreciado.

Jun 5, 2007 1:56 PM in response to Madreder

To get the upload URL you not only have to send out an HTTP request with the URL that you specified but you also have to include the non URL-Encoded token data that you create when logging in. So in your case it should be

https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/valenciacc.edu.127 9686253 ?credentials=(insert credentials)&identity=(identity)&time=(put time stamp here)&type=XMLControlFile (this last part is if you are to send an xml directive)

If you send out all that you should get a long upload URL in return.

I have gotten a upload url returned but if you are able to figure out the next part of actually uploading a file then it would be awesome if you could let me know.

I hope this helps

Jun 5, 2007 2:01 PM in response to Madreder

Oh and one more thing to get an identifier of any place in your iTunes site, just drag the site link towards the top to a text editor. You can also right click on a tab or link and click "copy " then paste. The identifier will be at the end of the URL. Later when you get the upload URL and are able to figure that out you can send a "showtree" command to the web service and get the identifiers there. Hope this helps

Good Luck

Jun 7, 2007 8:29 AM in response to Jupr05

I am facing the same problem when I use curl command.

After generating " Administrator" credentials, signature and time stamp (Step 1) I use curl to get a long uplaod URL.

curl https://deimos.apple.com/WebObjects/Core.woa/API/GetUploadURL/gcsu.edu ?type=XMLControlFile&credentials=(insert credentials)&identity=(identity)&time=(put time stamp here)&signature=(signature value)

Also tried placing "type=XMLControlFile" at the end of the URL.

The error which I get after running curl is "You don't have permission to access this document on this server" even though I am logging in as Admin.

On the other hand if I use the same URL generated from the first Step and put in a browser (Safari/FireFox) I do get a long upload URL, with which I can upload XML file.

So my Question is why I get permission error when I use curl?

Jun 7, 2007 8:47 AM in response to Mazhar

Maybe use a command for curl after such as -d. From what I read is that it sends it in url encoded which sends back a correct URL for me, but I also haven't used the curl for the initial upload url. Just for the XML document sending testing.
http://linux.about.com/od/commands/l/blcmdl1_curl.htm

has some stuff on curl. Might be overstating the obvious for you, but thought it might help.

Good Luck

Jun 7, 2007 12:45 PM in response to Madreder

Yes, a handle uniquely identifies an iTunes U resource.

If you copy and paste an iTunes U URL, you'll see that it (almost always) ends in a series of digits ... 12345.23456 or 12345.23456.34567. The last set of digits are the "handle" that you see in your ShowTree results. The other digits represent (if my calculations are correct) a path to the last object ... "site", "group", and "object". When you use GetUploadURL, you can specify the handle either way (I've tested that) ... you can go with the full path, or just the final set ... the handle.

Web Services Upload Document

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.