Background

docMgt has a very robust REST API system. This means that most data and transactions are available via REST calls. For more information about REST, refer to this Wiki link. For information about docMgt’s implementation of REST web services, refer to the online reference here.

While most modern languages like .NET, Java, JavaScript and others can perform calls to REST services it is quite common to use JavaScript. So for this example I will be using a simple JavaScript form that uses both jQuery and Bootstrap to allow a user to enter a search term and get back a list of the matching Records from a docMgt server.

Scenario

The scenario for this example is a simple web application that allows the user to add a new Record into docMgt containing Name, Address and City via a simple form. The important thing to remember is that Records are merely a set of Data elements. So when you save a new Record you are really just saving a set of Data elements.

rest-api-saving-records-screen1

Key Points

There are several items demonstrated here but the ones most important are the following:

  • Shows the basic methodology of calling the docMgt REST services
  • Demonstrates the use of authorized connections to docMgt
  • Shows how to save a Record using a POST command to the REST interface
  • Records are merely a collection of Data elements

The example here is broken up into 2 files – HTML and JavaScript. However, the downloadable example is a single HTML file with the JavaScript embedded. Either method works just fine.

Download source here: JavaScriptTest.zip.

 

Please Rate this Article

Join Our Mailing List

Join our mailing list to receive the latest news and updates from the docMgt team

You have Successfully Subscribed!

Pin It on Pinterest