Community articleSpecifying a request URL with IBM Domino Access Services
Added by IBM contributorIBM | Edited by IBM contributorSimon O'Doherty on November 19, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

The base URL for accessing IBM® Domino® Access Services is the internet address of an enabled server.

Specifying a request URL with the Domino Core Services


Send the base URL appended by /api/core as a GET request to obtain information about the resources available for Core services. Here are some Core samples:


Gets a list of the resources provided by the Core service. The service responds with a list of link objects in JSON format.
Gets the authenticated user's password statistics (pwstats resource). If the request includes valid authorization credentials (basic, session, etc.), the REST service returns HTTP 200 and a response in JSON format.
Accesses the nonce resource. This can be used to enable CSRF (Cross-site request forgery) protection. By accessing this resource, the REST service returns HTTP 200 (OK). It also returns a SetCookie header that causes the browser to store the nonce value in the "DasToken" cookie.
  • GET http://zealand.xyz.com:80/api/core
  • GET http://zealand.xyz.com:80/api/core/pwstats
  • GET http://zealand.xyz.com:80/api/core/nonce

Specifying a request URL with the Domino Data Service


Send the base URL appended by /api/data as a GET request to obtain information about the databases on the server. The remaining URLs include the relative path name of a database on the server. The function of the API call depends on the method of sending as well as the specification of the URL. Here are some Data samples:


Gets information about the databases on the server.
Gets information about the views and folders in a database.
Gets information about entries in a view of a database.
Adds a document to a database. The request body contains the new document.
Updates a document in a database. The request body contains the updates.
  • GET http://zealand.xyz.com:80/api/data
  • GET http://zealand.xyz.com:80/XPagesExt.nsf/api/data/collections
  • GET http://zealand.xyz.com:80/XPagesExt.nsf/api/data/collections/name/AllContacts?start=0&count=3
  • POST http://zealand.xyz.com:80/XPagesExt.nsf/api/data/documents
  • PUT http://zealand.xyz.com:80/XPagesExt.nsf/api/data/documents/unid/C3F96907EFDD1B1E85257869006AF185

In some cases, you have the option of specifying a name or a Notes® universal identifier (UNID). The following request uses a name to identify a view:
GET http://ibm-z0shi2lw4cz.swg.usma.ibm.com:80/XPagesExt.nsf/api/data/collections/name/AllContacts

Here is the same request using the UNID to identify the view:

GET http://zealand.xyz.com:80/XPagesExt.nsf/api/data/collections/unid/CD40A953ABDE036A8525786500660C27

Requests can be modified by parameters. The syntax rules are as follows:


  • Place a question mark after the URL. Place the parameter or parameters after the question mark.
  • Specify each parameter as the name of the parameter, an equals sign, and the value of the parameter.
  • Separate multiple parameters with ampersands.
     

The following request specifies as parameters a starting entry and the number of entries to get:
GET http://zealand.xyz.com:80/XPagesExt.nsf/api/data/collections/name/AllContacts?start=0&count=3

Specifying a request URL with the Domino Calendar Service


Send the base URL appended by /api/calendar as a GET request to obtain information about calendars on the server.

To read and create calendar events, you need the URL for a specific event feed. An event feed is really just a reference to the calendar view in a specific user's mail file. Usually, this is the currently authenticated user's mail file. If the user manages another person's calendar, they can also make requests to the URL representing the delegated calendar. Calendar information can be accessed in either JSON or iCalendar format.

The function of the API call depends on the method of sending as well as the specification of the URL. Here are some Calendar samples:


Gets information about the calendars on the designated server and returns a response in JSON format.
Gets information about the events in a specific user’s calendar and returns a response in the default JSON format sorted by date. In this example, the events are read from D. Lawson's mail file (mail\dlawson.nsf).
Gets information about the events in a specific user’s calendar and returns a response in iCalendar format. In this example, the events are read from D. Lawson's mail file (mail\dlawson.nsf).
Gets information about a range of events in a specific user’s calendar and returns the first 50 events that start between 01-Dec-2010 and 31-Dec-2010 inclusive. Date/time values are specified in ISO8601 format. You can also specify just since or just before and you can specify the format parameter
Gets information about a specific event in this user’s calendar. The format of the event URL is similar to the event feed URL except that it has the event's UID appended to the path.
Gets information about the unprocessed invitations in this specific user’s calendar.
  • GET http://zealand.xyz.com:80/api/calendar
  • GET http://zealand.xyz.com:80/mail/dlawson.nsf/api/calendar/events
  • GET http://zealand.xyz.com:80/mail/dlawson.nsf/api/calendar/events?format=icalendar
  • GET http://zealand.xyz.com:80/mail/dlawson.nsf/api/calendar/events?since=2010-12- 01T00:00:00Z&before=2010-12-31T00:00:00Z
  • GET http://zealand.xyz.com:80/mail/dlawson.nsf/api/calendar/events/839355989EC30000852577BB0050F06A
  • GET http://zealand.xyz.com:80/mail/dlawson.nsf/api/calendar/invitations

Note: All of the examples assume that the request is an authenticated request. This could mean the request includes an Authorization header with basic authentication credentials or the request could include a Cookie header with session authentication credentials. The Domino web engine might be configured for other authentication schemes including SAML and SPNEGO. For more information on authenticating with the Domino web engine, refer to relevant product documentation. If a client sends an unauthenticated request, the service cannot establish the user's identity and will return an authentication challenge.

Parent topic: Accessing IBM Domino Access Services