Using Connect Enterprise Web Services |
|||
| Training > Find courses and curriculums | |||
Most XML API actions that work with courses and curriculums require the sco-id of the course or curriculum. You often need to locate the sco-id dynamically, before you call another action, without knowing the exact name of the SCO.
Use these best practices to make searching for training SCOs efficient:
courses.This directory structure is also recommended when you want to display a list of all courses and curriculums (or all those in a subject area) and allow users to enroll themselves.
If you are working in Enterprise Manager, you can find the sco-id of a course or curriculum by navigating to it, clicking its URL, and taking the value of sco-id from the browser URL. You can also locate the sco-id from an application, using the XML API.
sco-shortcuts:https://example.com/api/xml?action=sco-shortcuts
sco-id of the courses folder:
<sco tree-id="624528" sco-id="624528" type="courses">
<domain-name>http://example.com</domain-name>
</sco>
You cannot use a filter with sco-shortcuts, but you can parse the response for the sco element that has type=courses.
sco-contents, passing the sco-id of the courses folder and filtering for your specialized training folders:
https://example.com/api/xml?action=sco-contents&sco-id=624528
&filter-name=Sales Training
filter-name, filter-url-path, another exact match filter, or a date filter. However, be careful when using filter-like-name, as it might affect server performance. sco-id of your specialized training folder from the browser URL in Enterprise Manager and pass it to sco-contents. sco-id of your specialized training folder:
<sco sco-id="2007122244" source-sco-id="" folder-id="624528"
type="folder" icon="folder" display-seq="0" is-folder="1">
sco-contents, passing it the sco-id of the specialized training folder and adding a filter that identifies the course or curriculum:
https://example.com/api/xml?action=sco-contents
&sco-id=2007122244&filter-name=Java 201
sco-contents, rather than sco-expanded-contents, if all courses and curriculums are stored at the top level of your specialized training folder. This improves performance.sco elements in the response for the sco-id of the course or curriculum:
<sco depth="2" sco-id="2006745673" folder-id="2006745671" type="content"
icon="course" lang="en" source-sco-id="2006744233"
display-seq="1" source-sco-type="0">
<name>All About Web Communities</name>
<url-path>/p33096345/</url-path>
<description>Web 2.0 course</description>
<date-created>2006-06-12T14:48:25.870-07:00</date-created>
<date-modified>2006-06-12T14:48:25.870-07:00</date-modified>
</sco>
sco-id of a specialized training folder you have created (see "Find the sco-id of a course or curriculum"). You can also get the sco-id by navigating to the folder in Enterprise Manager, clicking its URL, and reading the sco-id in the browser URL.
sco-id:https://example.com/api/xml?action=sco-contents&sco-id=2006258748
The best practice is to create the specialized training folders one level deep. By doing so, you can call sco-contents rather than sco-expanded-contents. This gives better performance.
name, url-path, or any values you want to display:
<sco sco-id="2007035246" source-sco-id="2006334909"
folder-id="2006258748" type="content" icon="course"
display-seq="0" is-folder="0">
<name>Java 101</name>
<url-path>/java101/</url-path>
<date-begin>2006-07-20T17:15:00.000-07:00</date-begin>
<date-modified>2006-07-20T17:21:38.860-07:00</date-modified>
</sco>
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/breeze/6/xml_api/03b_tra3.htm