iMIS REST API

The iMIS REST API is an HTTP-based web API that allows developers to send a request to a simple URL instead of using XML. The iMIS REST API uses JSON objects to send the data in smaller payloads between the client and the server. A lazy-loaded pattern allows asynchronous handling when objects are loaded on a page, which also improves performance.

All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.

When using a client tool or developing in JavaScript, you will need a token to make a request to the API. If you are using the iMIS web application pass-through method, the browser or application will also need access to the login cookie of the user you are logged in as.

Simple REST examples

Using jQuery Ajax to authenticate and request a resource

jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party/101", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party?UniformId=87EAD15E-B188-42E8-AE48-E9B8C2B24C94", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party?lastname=contains:smith", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/country", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/country?countryname=contains:united", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});

Status codes

Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The various HTTP status codes we might return are listed below.

CodeTitleDescription
200OKThe request was successful.
201CreatedThe resource was successfully created.
202Async createdThe resource was asynchronously created
400Bad requestBad request
401UnauthorizedYour RequestVerificationToken is invalid.
403ForbiddenThe server cannot authorize the request.
404Not foundThe resource does not exist.
422Validation errorA validation error occurred.
50XInternal Server ErrorAn error occurred with our API.

Accessing the API endpoint

For anyone on iMIS EMS (20.3, 20/20 Advance)

The API endpoint points to the ASI Scheduler. The endpoint format is: URL/api/endpoint

For example, your public iMIS website URL is https://abc.org. To call the party endpoint, the full API URL is: https://abc.org/api/party.

For anyone on an earlier version and not on iMIS EMS

The endpoint format is similar to the above but includes the instance name: URL/instance name/api/endpoint

For example, your public iMIS website URL is https://abc.org and the website instance name is abcmembers. To call the party endpoint, the full API URL is: https://abc.org/abcmembers/api/party.

Advanced query operations

The REST web API supports a number of advanced querying commands

  • Between, between
  • Contains, contains
  • EndsWith, endsWith
  • Equal, eq,==
  • GreaterThan, gt,>
  • GreaterThanOrEqual, ge,>=
  • In, in
  • IsEmpty, isEmpty,empty
  • IsFalse, isFalse,false
  • IsTrue, isTrue,true
  • LessThan, lt,<
  • LessThanOrEqual, le,<=
  • NotContain, notContain,!contain
  • NotEmpty, notEmpty,!empty
  • NotEqual, ne,!=
  • StartsWith, startsWith