Community articleDocument collection GET8.5.3 UP1
Added by IBM contributorIBM | Edited by IBM contributorDave Delay on March 14, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Gets information on the documents in a database.

Defined in: Document collection resource

If you don't specify any query parameters, the response includes all the documents in the database.  To limit the number of documents returned, use the optional since or search parameters.  The search syntax is defined below.

Search syntax

To search for a word or phrase, enter the word or phrase as is, except that search keywords must be enclosed in quotes. Remember to escape quotes if you are inside a literal.

Wildcards, operators, and other syntax are permitted. For the complete syntax rules, see IBM® Lotus® Notes® Help. Search for "query syntax" in the Domino Designer Eclipse help system or information center (for example, http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jspexternal link), both of which include Lotus Notes®.
 

Input
Method URI Description
GET /{database}/api/data/documents Gets information on the documents in a database.
Name Type Optional Description
database
string No Path name of a database on the server relative to the data directory.
Name Type Optional Description
compact
boolean Yes Controls compacting of the JSON output. Compacting removes extraneous white space.
search
string Yes Returns only documents that match a search query. See "Search syntax" above.
searchmaxdocs
int Yes Limits the number of documents returned by a full-text search.
since
string Yes Returns only entries modified since a specified time. Specify the time in ISO 8601 format, for example, 2011-08-21T20:21:00Z.
Output
Content Type: application/json
Use the table below that represents the returned fields:
Name Type Optional Description
@modified
string No The last modification date of the document.
@unid
string No The universal ID of the document.
@href
string No The URL of the Document resource.
Code Description
200
OK. Indicates that the request was handled successfully.
Examples
This request gets documents using default settings.
GET /XPagesExt.nsf/api/data/documents

This request gets a maximum of three documents that match a search query (documents containing macbrown or doe disregarding case).
GET /XPagesExt.nsf/api/data/documents?search=macbrown%20OR%20doe&searchmaxdocs=3

This request gets documents modified after August 21, 2011 at 8:21 PM UCT.
GET /XPagesExt.nsf/api/data/documents?since=2011-08-21T20:21:00Z

Response returned by the server
[
  {
    "@unid":"D73CD922E372C494852578B600584F03",
    "@modified":"2011-06-28T15:29:35Z",
    "@href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/D73CD922E372C494852578B600584F03"
  },
  {
    "@unid":"D1D1114365B55618852578B700499AFD",
    "@modified":"2011-06-28T15:29:35Z",
    "@href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/D1D1114365B55618852578B700499AFD"
  },
  {
    "@unid":"BC2EA75EBD93E02F852578B7004A15DB",
    "@modified":"2011-06-28T15:29:35Z",
    "@href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/BC2EA75EBD93E02F852578B7004A15DB"
  }
]