Name
Using an API, get a list of all SCOs matching a search text within the specified field to search for objects associated with a SCO.
Availability
Acrobat Connect Pro 7
Description
Provides a list of all SCOs matching the search text within the specified field. This action allows you to search for objects in the database based on the SCO’s name, description, or author, or all three of those fields.
The sco-search-by-field action searches the content of some types of SCOs for the query string. The search includes folders, training courses, curriculums, meetings, content, and archives.
To search for multi-word terms with spaces between the words, search only on the first word in the term and use a wildcard at the end. For example, to search for Sales Presentation, use the following string:
query=sales*
The sco-search-by-field command does not support the and/or operators.
Request URL
http://server_name/api/xml ?action=sco-search-by-field &query=SearchTerm &field=allowedValue
Parameters
|
Type |
Required |
Description |
query |
String |
Y |
The term to search for within the specified field. The query is case-insensitive. |
field |
String |
N |
The field to search. Accepts four possible values: name, description, author, or allfields:
If this parameter is omitted, the name field is searched. |
Filters
Filters are supported on any field that can be returned. For example, you can use
&filter-gt-date-created=2007-09-12T08:00:00.000
if you want to show only results created after 8:00 AM on September 12, 2007.
Response structure
<?xml version="1.0" encoding="utf-8" ?> <results> <status code=allowedValue /> <sco-search-info> <sco sco-id=integer tree-id=integer folder-id=integer type=allowedValue status=allowedValue sco-data-id=integer source-sco-id=integer host-id=integer author-contact-id=integer learning-time=allowedValue lang=allowedValue seq-id=integer icon=allowedValue display-seq=integer max-retries=integer version=integer account-id=integer tree-type=integer> <name>string</name> <url-path>string</url-path> <date-created>datetime</date-created> <date-modified>datetime</date-modified> <principal-name>string</principal-name> <folder-name>string</folder-name> </sco> </sco-search-info> </results>
Response value
Element |
Attribute |
Type |
Description |
---|---|---|---|
results | Container |
All results the action returns. |
|
status | Empty, with attributes |
The status of the response. |
|
code | Allowed value |
A code indicating the response status (see status). |
|
sco-search-by-field-info | Container |
The list of objects (SCOs) that match the search query. |
|
sco | Container |
Details about one object that matches the search. |
|
sco-id | BIGINT |
The unique ID of the SCO. |
|
folder-id | BIGINT |
The ID of the folder in which the SCO is stored. |
|
type | Allowed value |
The content type assigned to the SCO (see type for values). |
|
icon | Allowed value |
The icon that visually identifies the SCO in a user interface. |
|
name | String |
The file name of the SCO. |
|
url-path | String |
The unique identifier that comes after the domain name in the SCO URL. |
|
date-created | Datetime |
The date the SCO was created. |
|
date-modified | Datetime |
The date the SCO was last modified. |
|
principal-name | String |
The author of the SCO. |
|
folder-name | String |
The name of the folder in which the SCO is stored. |
Sample request
https://example.com/api/xml?action=sco-search-by-field&query=Marketing*&field=description
Sample response
<results> <status code="ok"/> <sco-search-by-field-info> <sco sco-id="2007775205" tree-id="" folder-id="2007470298" type="meeting" status="" sco- data-id="" source-sco-id="2007470292" host-id="" author-contact-id="" learning-time="" lang="en" seq-id="" icon="virtual-classroom" display-seq="0" max-retries="" version="0" account-id="2007470268" tree-type="4"> <name>virt1</name> <url-path>/r72655596/</url-path> <date-created>2007-10-10T16:41:31.643-07:00</date-created> <date-modified>2007-10-10T16:41:31.643-07:00</date-modified> <principal-name>Piet Pompies</principal-name> <folder-name>ppompies@adobe.com</folder-name> </sco> <sco sco-id="2007775257" tree-id="" folder-id="2007775254" type="folder" status="" sco-data-id="" source-sco-id="" host-id="" author-contact-id="" learning-time="" lang="en" seq-id="" icon="folder" display-seq="0" max-retries="" version="0" account-id="2007470268"> <name>test1</name> <url-path>/f13818712/</url-path> <date-created>2007-10-10T18:00:31.083-07:00</date-created> <date-modified>2007-10-10T18:00:31.083-07:00</date-modified> <principal-name>trainer two</principal-name> <folder-name>trainer@two.com</folder-name> </sco> </sco-search-by-field-info> </results>