Adobe Connect User Community
Menu

#1 2009-05-14 15:54:46

**_brian.bealer_**

Creating Courses through the API

Has anyone created a Course through the API?

Through the API:

I've uploaded a presentation to a folder in the Shared Content Folder.

I then created a folder in the Shared Training folder. In this folder, I created a course, using the presentation as the source.

From the folder in the Shared Training folder, if I select the course and try to open it, it fails with the following error:

Request Not Processed

The system was unable to process your request.
For further assistance ....


From the Shared Content folder, I can select the presentation and open presentation without any problems.

anyone have any ideas what's going on? When I call sco-update to create the course, there isn't an error returned, so I don't think I'm missing a required field.

Offline

#2 2009-05-15 08:52:23

**_brian.bealer_**

Re: Creating Courses through the API

Here's the process that I'm using:


Step 1: Create Curriculum in Shared Training/Test
API call:

?action=sco-update&folder-id=20598&name=Test Curriculum&icon=curriculum&type=curriculum&desciption=new curriculum

Response:

<results>
    <status code="ok"/>
    <sco account-id="7" folder-id="20598" icon="curriculum" lang="en" sco-id="21116" type="curriculum" version="0">
        <url-path>/p70281787/</url-path>
        <name>Test Curriculum</name>
    </sco>
</results>

Step 2: Create Resource Folder in Shared Training/Test- used to hold the courses
API call:

?action=sco-update&folder-id=20598&name=Test Curriculum Resources&icon=folder&type=folder&desciption=Course1

Response:

<results>
    <status code="ok"/>
    <sco account-id="7" folder-id="20598" icon="folder" lang="en" sco-id="21117" type="folder" version="0">
        <url-path>/f27616520/</url-path>
        <name>Test Curriculum Resources</name>
    </sco>
</results>

Step 3: Create Content place holder in Shared Content/Test Upload folder
API call:

?action=sco-update&folder-id=20890&name=TestPresenter&icon=producer&type=content&description=testing upload through api

Response:

<results>
    <status code="ok"/>
    <sco account-id="7" folder-id="20890" icon="producer" lang="en" sco-id="21119" type="content" version="0">
        <url-path>/p32276986/</url-path>
        <description>testing upload through api</description>
        <name>TestPresenter</name>
    </sco>
</results>

Step 4: Upload presenter zip file to Shared Content/TestUpload folder
API call:

?action=sco-upload&sco-id=21119&title=TestPresenter&summary=testing upload through api

Response:

<results>
    <status code="ok"/>
    <files>
        <file>
            <path>7/21119-1/input/test.zip</path>
        </file>
    </files>
</results>

Step 5: Create the course in the resource folder, using the presentation as the source sco
API call:

?action=sco-update&folder-id=21117&name=Course1&icon=course&type=content&desciption=TestPresenter&source-sco-id=21119

Response:

<results>
    <status code="ok"/>
    <sco account-id="7" folder-id="21117" icon="course" lang="en" sco-id="21123" source-sco-id="21119" type="content" version="0">
        <url-path>/p41597918/</url-path>
        <name>Course1</name>
    </sco>
</results>

Step 6: Create the "link" to the course inside the curriculum
API call:

?action=sco-update&folder-id=21116&name=Course1Link&icon=course&type=link&desciption=TestPresenter&source-sco-id=21123

Response:

<results>
    <status code="ok"/>
    <sco account-id="7" folder-id="21116" icon="course" lang="en" sco-id="21124" source-sco-id="21123" type="link" version="0">
        <url-path>/l88923651/</url-path>
        <name>Course1Link</name>
    </sco>
</results>

Step 5 is where it starts to have problems. When I navigate to the Shared Content/Test folder and select the course I created and click on the url for the course, it should pop up a new window and start playing the presentation, but I get an error in the popup:

Request Not Processed
The system was unable to process your request.
For further assistance, please check out the Connect Pro support center or contact Connect Pro support.

If I navigate to the Shared Content/Test folder and select the presentation, it shows that it is linked to the course and I can click the url and it pops open a new window and starts playing the presentation.

I've looked through the log files on the server and found in c:\breeze\logs\support\debug.log the following error:

[05-15 09:35:11] web-213 (d) XXXXXX ====================================== 
[05-15 09:35:11] web-213 (d) XXXXXX action: map-info
[05-15 09:35:11] web-213 (d) XXXXXX ====================================== 
[05-15 09:35:11] web-213 (d)  0ms spid:56 fetch com.macromedia.breeze.model.Sco("21123")
[05-15 09:35:11] web-213 (d)  0ms spid:56 com.macromedia.breeze.sco.DAL.getTranscriptByTicket("vnpichxtovxo")
[05-15 09:35:11] web-213 (d)  0ms spid:56 com.macromedia.breeze.sco.DAL.getAssetEntries("21123",output)
[05-15 09:35:11] web-213 (e) java.lang.NullPointerException
[05-15 09:35:11] web-213 (e)     at com.macromedia.breeze.sco.DataManager.getFileName(DataManager.java:2676)
[05-15 09:35:11] web-213 (e)     at com.macromedia.breeze.sco.DataManager$MapInfo.mapInfoContent(DataManager.java:1462)
[05-15 09:35:11] web-213 (e)     at com.macromedia.breeze.sco.DataManager$MapInfo.execute(DataManager.java:1341)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.ActionHandler.executeOrQueue(ActionHandler.java:134)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.ActionDispatcher.dispatch(ActionDispatcher.java:266)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.servlet.HTMLHandler.execute(HTMLHandler.java:474)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.servlet.ContentHandler.sendMappedFile(ContentHandler.java:273)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.servlet.ContentHandler.service(ContentHandler.java:112)
[05-15 09:35:11] web-213 (e)     at com.macromedia.airspeed.servlet.BaseServlet.service(BaseServlet.java:263)
[05-15 09:35:11] web-213 (e)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[05-15 09:35:11] web-213 (e)     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
[05-15 09:35:11] web-213 (e)     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
[05-15 09:35:11] web-213 (e)     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
[05-15 09:35:11] web-213 (e)     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
[05-15 09:35:11] web-213 (e)     at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
[05-15 09:35:11] web-213 (e)     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
[05-15 09:35:11] web-213 (e)     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
[05-15 09:35:11] web-213 (d) <status code="internal-error"/>
[05-15 09:35:11] web-213 (d) com.macromedia.airspeed.StatusException$InternalError: <status code="internal-error"/>
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.ActionDispatcher.dispatch(ActionDispatcher.java:287)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.servlet.HTMLHandler.execute(HTMLHandler.java:474)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.servlet.ContentHandler.sendMappedFile(ContentHandler.java:273)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.servlet.ContentHandler.service(ContentHandler.java:112)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.servlet.BaseServlet.service(BaseServlet.java:263)
[05-15 09:35:11] web-213 (d)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[05-15 09:35:11] web-213 (d)     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
[05-15 09:35:11] web-213 (d)     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
[05-15 09:35:11] web-213 (d)     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
[05-15 09:35:11] web-213 (d)     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
[05-15 09:35:11] web-213 (d)     at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
[05-15 09:35:11] web-213 (d)     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
[05-15 09:35:11] web-213 (d)     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
[05-15 09:35:11] web-213 (d) Caused by: java.lang.NullPointerException
[05-15 09:35:11] web-213 (d)     at com.macromedia.breeze.sco.DataManager.getFileName(DataManager.java:2676)
[05-15 09:35:11] web-213 (d)     at com.macromedia.breeze.sco.DataManager$MapInfo.mapInfoContent(DataManager.java:1462)
[05-15 09:35:11] web-213 (d)     at com.macromedia.breeze.sco.DataManager$MapInfo.execute(DataManager.java:1341)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.ActionHandler.executeOrQueue(ActionHandler.java:134)
[05-15 09:35:11] web-213 (d)     at com.macromedia.airspeed.ActionDispatcher.dispatch(ActionDispatcher.java:266)
[05-15 09:35:11] web-213 (d)     ... 12 more

Offline

#3 2009-05-19 18:09:43

**_sfsmithcha_**

Re: Creating Courses through the API

Hi,

I'm pretty sure your problem is that you're sending your source-sco-id along with your initial sco-update to create the course.  You need to make 2 calls.  The first sco-update will give return the sco-id you create.  The second you pass that sco-id and set the source sco-id.

-Charles

Offline

#4 2009-05-20 07:58:17

**_brian.bealer_**

Re: Creating Courses through the API

sfsmithcha - you are brilliant. Thank you very much.

Offline

Board footer