0% found this document useful (0 votes)
35 views21 pages

Lab Guide - REST API

This document is a comprehensive instruction guide for using a REST API client, specifically Insomnia, to interact with Kofax SignDoc Standard. It outlines three methods for learning and executing REST calls, provides detailed step-by-step instructions for installation and API interactions, and includes challenges for users to complete. The guide emphasizes the importance of prerequisites and offers downloadable resources to assist in the exercises.

Uploaded by

Hadjer Kaddour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views21 pages

Lab Guide - REST API

This document is a comprehensive instruction guide for using a REST API client, specifically Insomnia, to interact with Kofax SignDoc Standard. It outlines three methods for learning and executing REST calls, provides detailed step-by-step instructions for installation and API interactions, and includes challenges for users to complete. The guide emphasizes the importance of prerequisites and offers downloadable resources to assist in the exercises.

Uploaded by

Hadjer Kaddour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

REST API

Instruction Guide

pause following each step that is completed to duplicate


1 the step on your computer.
Table of Contents

HOW TO MAKE THE MOST OF THIS GUIDE .............................................................................. 3


Introduction .................................................................................................................................... 4
Install a REST API Client ............................................................................................................... 6
Execute REST Calls .................................................................................................................... 11

2
HOW TO MAKE THE MOST OF THIS GUIDE
This guide is used in conjunction with the demonstration video covered in the online training lesson. You
may approach this guide in one of THREE WAYS:

METHOD 1: LEARN THEN TRY – Starting with the online lesson demonstrations, watch as we
describe the exercise steps. Next, attempt to complete the challenge lab by yourself. If you have
a problem completing it, review the video or the step-by-step instructions in this guide.
Afterwards, confirm your configuration is correct by comparing against the step-by-step
instructions in this guide.

METHOD 2: FOLLOW ALONG – Start with the online lesson demonstrations, play a step, pause
the video, and then implement the step. Repeat until all steps are completed. This method is less
challenging, but maybe quicker and will build your confidence.

Alternatively, use the step-by-step instructions in this guide to complete each step.

METHOD 3: TRY THEN CONFIRM – Read the challenge, and then use the theory and
configuration information you have learned to try to complete the challenge by yourself. If you
can’t figure out how to complete the lab, or if you run into a problem, use the demonstration video
and step-by-step instructions to assist you. Afterwards, confirm your configuration is correct by
comparing against the step-by-step instructions in this guide.

Before you begin any of the exercises, you should have verified that you have access to the
required resources specified at the beginning of each exercise. Even if you don’t have
access to all those resources, you are still encouraged to watch the demonstration videos to
review the configuration steps.

3
REST API

Introduction
All exercises in this module are structured in the same way:
• First, we provide some information about the challenge and detail any prerequisites.
• Then we provide the challenge, which is your assignment. You might want to try it on your
own. Several hints are provided so that you will not meet this challenge unprepared.
• Most of the time we also provide downloadable resources. The resources may include
sample files, necessary configuration files, and examples of how you could implement
things. You can find these resources in the online lesson.
• Finally, detailed instructions are provided in this lab guide, as well as a demo video in the
online lesson. The demo video provides a step-by-step implementation and explains the
details of the steps involved.

These step-by-step instructions follow the video demos closely, although not always
exactly! As a reminder, focus on the main challenge without overcomplicating the lab.
After completing the lab, we encourage you to improve the lab by handling exceptions or
with items relevant to a planned project or environment.

4
REST API

Typically REST API clients are used by developers or persons who would access the Kofax
SignDoc Standard Rest API to automate many of the functions (creating packages, deleting a
package, and other common KSD functions) that can otherwise be accomplished through the
front-end user interface.

5
REST API

Install a REST API Client


To complete these lab exercises you will need a REST API client. For these lab exercises
Insomnia is used as the REST API client.

Prerequisites
• SignDoc Standard installed and configured as a Windows service
• The Insomnia REST client software ([Link]

• Resources
• [Link] file (available for download in the lesson module)

Challenge

• Install the Insomnia REST Client


• Import the [Link] file
• Request the version of your SignDoc Standard

6
REST API

• Step-by-step instructions

Step 1. Install Insomnia:

Once you have downloaded Insomnia right click on the installer file and select Run as
administrator.
Follow the prompts to install.

Once installed Insomnia will open.

7
REST API

Step 2. Import the [Link] file:

From the Document or Collection name dropdown menu, select Import/Export.

Select From File from the Import Data dropdown menu.

8
REST API

Navigate to the [Link] file select the [Link] file then click import.

The REST calls should appear in the left pane.

Note: If you do not see the REST calls, click on the New Environment drop-down list, and
select No Environment. You should see the KSD-Training folder.

9
REST API

Step 3. Get the version of your SignDoc Standard installation:

Click on the “GET 01.0-GetVersionOfKSD” and then Send (in the upper-right corner of the
middle pane). The GET request will return the version of your SignDoc Standard installation.

10
REST API

Execute REST Calls


To complete these lab exercises you will need to enter

Prerequisites
• SignDoc Standard installed and configured as a Windows service
• The Insomnia REST client software installed
• The [Link] file imported


Resources
• [Link] file (available for download in the lesson module)

Challenge

• Add an API key for authentication


• Use REST calls to:
o Create a signing package template
o Add a recipient to a signing package
o Add a document to a signing package
o Adda signature field to a document
o Delete a signing package

11
REST API

• Step-by-step instructions

Step 1. Add an API key to your REST calls:

Click on the “GET 01.1-GetConfiguration.” Before clicking on Send, click on the header tab.
Note that we are passing 2 request Headers:

1. Content -Type – This is the content type we are passing to the API (in this example the
content – type is application/json)

2. API-Key – This is the API key that you generate for the user making the REST call.
Remember that the permissions that the user generating the API key has will determine what
REST calls can be made without error.

Before executing any REST calls replace the API key with one generated by your user.

Remember that the API-Key is located in the user’s preferences

12
REST API

Let’s take a look at my User Admin preferences by logging onto KSD as a user admin, then
going to the drop-down list in the upper-right hand corner and clicking on Preferences.

Once you have generated an API key you will need to go into each Request header for each
REST call and replace the API-Key:... with your own - otherwise the REST calls will not be
authorized.

13
REST API

Step 2. Get the configuration of your SignDoc Standard installation:

Click on the “GET 01.1-GetConfiguration.” and click on Send. Review the information
returned.

14
REST API

Step 3. Create a signing package template:

Click on the “POST 02.0-CreateSigningPackageTemplate.” Take look at the request body


and you see the data that you want to pass to the SignDoc application. What you are looking at
is what is called a JSON object – basically key value pairs used to define data that will be
POSTED to the SignDoc application. This is a simple example as JSON objects can be (and
are) much more detailed than this. In this instance this POST call (via a JSON Request body)
will create a signing package template with a name of SignPackage Template from Rest Call
(with an id of 800).

Click Send to execute the REST call.

15
REST API

Login to SignDoc and check that a signing package template has been created.

Step 4. Add a recipient to a Signing Package:

Click on the “POST 02.1-AddRecipientToPackage.” Take look at the request body and review
the data that you will pass to the SignDoc application.
Click Send to execute the call.

16
REST API

Login to SignDoc and check that a signer (tonicezar3@[Link]) has been added to the
signing package template.

Step 5. Add a document to the Signing Package:

Click on the “POST 02.2-AddDocumentToPackage.” Take look at the request body and
review the data that you will pass to the SignDoc application.
Click Send to execute the call.

17
REST API

Login to SignDoc and check if a document has been added to the signing package template.

Step 6. Add a signature field to the document:

Click on the “POST 02.3-AddSignatureFieldToDocument.” Take look at the request body and
review the data that you will pass to the SignDoc application.
Click Send to execute the call.

18
REST API

Login to SignDoc and check if a signature field has been added to the document in the signing
package.

Step 7. Delete the signing package:

Click on the “DELETE 03.0-Delete PackageTemplate800.”


Click Send to execute the call.

19
REST API

Login to SignDoc and check to see if the signing package template has been deleted.

20
REST API

CONGRATULATIONS
You have completed all the exercises in this module.

21

You might also like