ARCHIVED: KB web services: Listing documents in a domain class

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Using web services, you can retrieve a list of all documents in a domain class, along with information about when they were updated. If you have documents in a dedicated domain class, you could use this method to build a cache of documents and update them at regular intervals, or publish information about recently updated documents (e.g., in an RSS feed).

On this page:


Listing documents with SOAP

getDocumentListResponse getDocumentList(string authkey, string whichKB)

List the documents in the whichKB domain class. If no domain class is specified, all is assumed. The result has three fields:

count

An integer that specifies how many documents are in the list

documents

An array of strings, naming the docids of documents in this domain class

timestamps

An array of strings which specify when each document was last modified

These strings are in the SQL timestamp format of YYYYMMDDhhmmss. For example, if a document was last edited at 1:23:45pm on April 5, 2010, its timestamp would be 20100405132345.

Note: The KM developers may also update the timestamp if a document was impacted by a web services bug that has been fixed, to signal that you should retrieve it again and get the corrected content.

The documents and timestamps arrays are associative. For example, the ninth timestamp in timestamps is the time that the ninth document in documents was last modified.

Listing documents with REST

GET /REST/v0.2/whichKB/documents

List the documents in the whichKB domain class. If no domain class is specified, all is assumed. A specialized XML document is returned. None of its tags have any attributes.

results is the root tag. Its first child element is count; this tag contains an integer specifying how many documents have been returned. results then contains any number of document child tags, one for each document in this domain class.

document has two tags as children. id contains the docid of the document in question. timestamp specifies when it was last modified. See the timestamps section above for an explanation of the data in timestamp.

Errors

If you specify a domain class that does not exist, you will receive a result with zero documents inside.

This is document arhp in the Knowledge Base.
Last modified on 2023-02-08 14:27:45.