Community articleView/folder entries GET8.5.3 UP1
Added by IBM contributorIBM | Edited by IBM contributorRobert F Harwood on April 27, 2015
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 entries in a view or folder.

Defined in: View/folder entries resource

If you don't specify any query parameters, the response includes the first 10 entries in the view or folder (in the default sort order).  Depending on the optional query parameters you specify, you can page through the entries, sort on different columns, find entries by key, or search entries matching a given text string.  See the "Query parameters" table for more details.  The syntax for the search parameter 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®.

Here is an example that searches the view named Categorized for documents containing strings category0000 and Document0000. Use %20 in place of spaces in a URL.

GET /restTest.nsf/api/data/collections/name/Categorized?search=category0000%20AND%20Document0000

Input
Method URI Description
GET /{database}/api/data/collections/unid/{unid} Gets information on the entries in a view or folder. Use this URI to get the entries by view or folder UNID.
GET /{database}/api/data/collections/name/{name} Gets information on the entries in a view or folder. Use this URI to get the entries by view or folder name.
Name Type Optional Description
database
string No Path name of a database on the server relative to the data directory.
unid
string No Universal ID of a view or folder in the database.
name
string No Name or alias of a view or folder in the database.
Name Type Optional Description
compact
boolean Yes Controls compacting of the JSON output. Compacting removes extraneous white space.
start
int Yes Specifies the starting entry. Defaults to 0 (the first entry).
count
int Yes Specifies the number of entries to return. Defaults to 10.
Note: Use start and count together, or use si, ps, and page together.
si
int Yes Specifies the starting entry. Defaults to 0 (the first entry).
ps
int Yes Page size or the number of entries to return.
page
int Yes Page number. The service returns entries based on a multiple of this parameter and the page size parameter (ps).
entrycount
boolean Yes When false, disable the output of the Content-Range header as a performance optimization. The default value is true.
search
string Yes Returns only documents that match a full-text query. See "Search syntax" above. An error occurs if the database is not full-text indexed.
searchmaxdocs
int Yes Limits the number of documents returned by a full-text search.
sortcolumn
string Yes Returns entries sorted on a column. If the column is not sorted by design or does not exist, this parameter has no effect.
sortorder
string Yes Specifies the sort order. The parameter value should be either "ascending" or "descending". Pair this parameter with sortcolumn.
startkeys
string Yes Returns sorted entries starting at a specified entry. Pair this parameter with sortcolumn. Example: ?sortcolumn=Title&sortorder=ascending&startkeys=Document0020
keys
string Yes Returns entries whose initial characters match keys. Pair this parameter with sortcolumn. Example: ?sortcolumn=Title&sortorder=ascending&keys=Document001
keysexactmatch
string Yes Returns entries that match keys exactly. Pair this parameter with keys. Example: ?sortcolumn=Title&sortorder=ascending&keys=Document001&keysexactmatch=true
expandlevel
int Yes Returns only entries at a specified indent level or higher.
category
string Yes Returns only entries in a specified category.
parentid
string Yes Returns only entries that are descendants of the specified entry UNID. Example: ?parentid=9B8F4A02A5F5254E852578950064EC03
systemcolumns
9.0
int Yes Limits system data to @entryid plus a bit mask formed by adding bit values from the response properties table. Use hexadecimal (0x followed by the hexadecimal value, case insensitive) or decimal. For example, systemcolumns=0x80a returns only @entryid, @unid, @read, and @href. In decimal format, systemcolumns=2058 has the same effect.
Output
Content Type: application/json
Use the table below that represents the returned fields:
Name Type Optional Description
@entryid
string No Position of the entry in the view or folder and the universal ID of any associated document.
@noteid
string No The note ID of the document associated with the entry, or an empty string if the entry is a category or total. (systemcolumns bit 0x0001)
@unid
string No The universal ID of the document associated with the entry, or an empty string if the entry is a category or total. (systemcolumns bit 0x0002)
@position
string No Position of the entry in the view or folder. (systemcolumns bit 0x0004)
@read
boolean No true if the entry is marked read for the user. (systemcolumns bit 0x0008)
@siblings
int No The number of siblings of the entry. (systemcolumns bit 0x0010)
@descendants
int No The number of descendants of the entry. (systemcolumns bit 0x0020)
@children
int No The number of children of the entry. (systemcolumns bit 0x0040)
@indent
int No The indent level of the entry. (systemcolumns bit 0x0080)
@form
string No The form upon which a document entry is based. (systemcolumns bit 0x0100)
@category
boolean No true if the entry is a category. (systemcolumns bit 0x0200)
@response
boolean No true if the entry is a response. (systemcolumns bit 0x0400)
@href
string No URL for the entry. (systemcolumns bit 0x0800)
@link
Object No Link to the document resource related to this view entry.
Name Type Optional Description
Content-Range
string No Range and number of items in the response. For example, the value "items 0-9/88" indicates the response includes entries 0 through 9 of a total of 88 entries. The value "items 10-19/88" indicates the response includes the second page of 10 entries.
Code Description
200
OK. Indicates that the request was handled successfully.
Examples
This request gets three entries starting at the second entry.
GET /XPagesExt.nsf/api/data/collections/name/AllContacts?start=1&count=3

This request gets all entries sorted in descending order on the LastName column.
GET /XPagesExt.nsf/api/data/collections/name/AllContacts?sortcolumn=LastName&sortorder=descending

This request gets all entries in the AllContacts view. If the total number of entries exceeds 10, only the first 10 are returned.
GET /XPagesExt.nsf/api/data/collections/name/AllContacts

Response returned by the server
[
  {
    "LastName":"Bloomberg",
    "$10":"Barney Bloomberg",
    "@form":"Contact",
    "Created":"2011-06-22T13:32:22Z",
    "@position":"1",
    "@href":"\/XPagesExt.nsf\/api\/data\/collections\/name\/AllContacts\/unid\/5D006566E919779E852578B7004A6019",
    "City":"New York City",
    "@entryid":"1-5D006566E919779E852578B7004A6019",
    "@noteid":"906",
    "State":"",
    "@siblings":5,
    "@unid":"5D006566E919779E852578B7004A6019",
    "@link": {
      "rel":"document",
      "href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/5D006566E919779E852578B7004A6019"
    },
    "Id":"",
    "FirstName":"Barney",
    "EMail":"bb@acme.com"
  },
  {
    "LastName":"Kim",
    "$10":"Hee-soon Kim",
    "@form":"Contact",
    "Created":"2011-06-22T13:35:39Z",
    "@position":"2",
    "@href":"\/XPagesExt.nsf\/api\/data\/collections\/name\/AllContacts\/unid\/B36433FCF346069E852578B7004AAD09",
    "City":"Seoul",
    "@entryid":"2-B36433FCF346069E852578B7004AAD09",
    "@noteid":"90A",
    "State":"",
    "@siblings":5,
    "@unid":"B36433FCF346069E852578B7004AAD09",
    "@link": {
      "rel":"document",
      "href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/B36433FCF346069E852578B7004AAD09"
    },
    "Id":"",
    "FirstName":"Hee-soon",
    "EMail":"kimhs@acme.com"
  },
  {
    "LastName":"Perrault",
    "$10":"Jean Perrault",
    "@form":"Contact",
    "Created":"2011-06-22T13:29:12Z",
    "@position":"3",
    "@href":"\/XPagesExt.nsf\/api\/data\/collections\/name\/AllContacts\/unid\/BC2EA75EBD93E02F852578B7004A15DB",
    "City":"Trois Rivieres",
    "@entryid":"3-BC2EA75EBD93E02F852578B7004A15DB",
    "@noteid":"902",
    "State":"",
    "@siblings":5,
    "@unid":"BC2EA75EBD93E02F852578B7004A15DB",
    "@link": {
      "rel":"document",
      "href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/BC2EA75EBD93E02F852578B7004A15DB"
    },
    "Id":"",
    "FirstName":"Jean",
    "EMail":"jean.perrault@acme.com"
  },
  {
    "LastName":"Ramirez",
    "$10":"Jorge Ramirez",
    "@form":"Contact",
    "Created":"2011-06-22T13:23:58Z",
    "@position":"4",
    "@href":"\/XPagesExt.nsf\/api\/data\/collections\/name\/AllContacts\/unid\/D1D1114365B55618852578B700499AFD",
    "City":"San Juan",
    "@entryid":"4-D1D1114365B55618852578B700499AFD",
    "@noteid":"8FE",
    "State":"",
    "@siblings":5,
    "@unid":"D1D1114365B55618852578B700499AFD",
    "@link": {
      "rel":"document",
      "href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/D1D1114365B55618852578B700499AFD"
    },
    "Id":"",
    "FirstName":"Jorge",
    "EMail":"jorge.ramirez@acme.com"
  },
  {
    "LastName":"MacBrown",
    "$10":"Mary MacBrown",
    "@form":"Contact",
    "Created":"2011-06-21T16:04:33Z",
    "@position":"5",
    "City":"Glascow",
    "@href":"\/XPagesExt.nsf\/api\/data\/collections\/name\/AllContacts\/unid\/D73CD922E372C494852578B600584F03",
    "@entryid":"5-D73CD922E372C494852578B600584F03",
    "@noteid":"8FA",
    "State":"",
    "@siblings":5,
    "@unid":"D73CD922E372C494852578B600584F03",
    "@read":true,
    "@link": {
      "rel":"document",
      "href":"\/XPagesExt.nsf\/api\/data\/documents\/unid\/D73CD922E372C494852578B600584F03"
    },
    "Id":"",
    "FirstName":"Mary",
    "EMail":"mary.macbrown@acme.com"
  }
]