iMIS 20.2 REST API Examples

iMIS 20.2 comes packaged with a built-in REST API. The REST API is not yet officially supported by ASI, and thus there is no documentation available yet. However, it appears to be working well in iMIS 20.2 so far, so we are providing some examples on how to use the REST API.

In general the REST API exposes all SOA functionality using the following notation: http://yourimisserver/Asi.Scheduler/api/DataContract/id/

For a reference on the available data contracts in SOA, visit the iMIS help website to view the entity types.

Advanced Query Operations

To do advanced query operations, use the following URL notation: http://yourimisserver/Asi.Scheduler/api/DataContract?PropertyName=Operation:value

Example using "startswith" operation:
HTTP GET: http://yourimisserver/Asi.Scheduler/api/party?firstname=startswith:john&lastname=startswith:smith

Operations Available:

  • Between
  • Contains
  • EndsWith
  • Equal
  • GreaterThan
  • GreaterThanOrEqual
  • In
  • IsEmpty
  • IsFalse
  • IsTrue
  • LessThan
  • LessThanOrEqual
  • NotContain
  • NotEmpty
  • NotEqual
  • StartsWith

Customer Query Examples

Find users with first name that starts with "John" and last name that starts with "Smith":

HTTP GET: http://yourimisserver/Asi.Scheduler/api/party?firstname=startswith:john&lastname=startswith:smith

Pull data from UD table "Name_Demo" for iMIS ID 23131:

HTTP GET: http://yourimisserver/Asi.Scheduler/api/Name_Demo?PartyId=23131​

Delete user with iMIS ID 23131:

HTTP DELETE: http://yourimisserver/Asi.Scheduler/api/party/23131

Activity Query Examples

Display all activities for member ID 23131:

HTTP GET: http://yourimisserver/Asi.Scheduler/api/Activity?PartyId=23131

Display all activities of type “DONORCLUB” for iMIS ID 23131:

HTTP GET: http://yourimisserver/Asi.Scheduler/api/Activity?PartyId=23131&ACTIVITY_TYPE=DONORCLUB

IQA Query Examples

Call an out-of-the-box IQA query and pass in a full name as a parameter:

HTTP GET: http://yourimisserver/Asi.Scheduler/api/IQA?QueryName=$/Common/Queries/Search/User/Name&Parameter=James%20Schwartz

Event Query Examples

Search for all events:

HTTP GET: http://yourimisserver/Asi.Scheduler/api/event

Search for an event starting with event name "Ann":

HTTP GET: http://yourimisserver/Asi.Scheduler/api/event?name=startswith:ann

Display event with event code "ANNCONF":

HTTP GET: http://yourimisserver/Asi.Scheduler/api/event/ANNCONF

blog comments powered by Disqus