Rest API Resources

This guide describes the document indexing, storage, and retrieval functions available in the GlobalSearch API.

Basics

The REST API offers a rich set of tools for performing all major create, read, update, delete, and search operations within the system. The Square 9 API’s default web path is http://localhost/square9api/api, where localhost represents the DNS name or IP address of your GlobalSearch server.

Square 9’s REST implementation is simple and offers a language agnostic approach to enabling document management functionality into your existing applications. You can program with your language of choice (Python, PHP, VB, C#, JavaScript, etc.), and most functionality is implemented as HTTP GET requests. Many of the calls can be tested by typing the request directly into your browser’s address bar. In you are unfamiliar with calling into a RESTful API, Google “Using a REST API” to gain some insight on the basics using your language of choice.

All connections to the website must first be authenticated with a valid Windows user account. Once authenticated, any call can be made. Functionality available is categorized and described below. Note that some calls may require data returned from another call. All calls with the exception of getting a database list require a license token, which is returned by making a call to the Get License method. As the name implies, Get License consumes a GlobalSearch license. Remember to release licenses you consume using the Delete License call.

Example code may be found in Square 9’s GitHub here.

 

Authentication and Licensing

GlobalSearch Web Services are authenticated with Windows Authentication. User accounts are created and managed as they are in all other scenarios. User’s must be authorized in the system and granted a license in order to log in. Refer to the GlobalSearch Configuration Guide for details on creating user accounts, assigning licenses, and granting access to database.

Get License: Attempts to get a license token for the current user

Delete License: Remove a specified license token

Database Access

Each database in GlobalSearch has an ID and is self-contained. Access to all documents begins with targeting the correct database.

Get Database List: Get a list of databases for the currently authenticated user.

Get Root Archive List: Gets a list of top-level archives from the specified database.

Get Child Archives List: Get a list of child-archives of the specified archive.

Searching

Access to documents is modeled around searching. In general, in order to access a specific document, an application would want to get the information about a search, run that search, and retrieve a document in the result.

Get Archive Searches: Gets a list of searches from an archive

Get Archive Search: Gets information about a single search

Run Search: Returns results from a search

Get Archive Fields: Returns Fields for Archive

Document Actions

GlobalSearch’s API has the ability to Import and Export documents, as well as modify the field data associated with a document already in a database, manually or via a Document Workflow.

Get Document: Retrieve a document file or meta-data

Get Workflows: Gets all possible workflows on an archive.

Run Workflow: Execute a Workflow

Update Index Data: Make a change to a field value

Import Document: Imports a new document into a database

Upload File to Server: Puts document in “WebPortalCache”

Export Document: Exports a document out of a database

Delete Document: Deletes the Specified Document

Transfer Document: Moves or Copies Document

Get Document Revision: Returns document revisions

Run DataXChange: Check an external source for matching data.

Get GlobalAction Queue Actions: Get a list of GlobalAction Queue Actions for a document

Fire GlobalAction Queue Action: Fire a GlobalAction Queue Action on a document

Get Document Secure ID: Get the Secure ID without running a search

Miscellaneous

Various utility methods.

Get Username: Get the currently logged in username

Get List: Get the contents of a pick-list

Get DataXChange Sources: Get a list of configured DataXChange sources.

Administration

Square 9’s Rest API now supports preforming certain administrative tasks relating to archives, fields, and lists.

Get Secured Users and Groups: Get users and groups secured to any database

Get Unsecured Users and Groups: Get users and groups not secured to a database

Get Tree Structure: Get tree structure of all databases, archives and searches

Get Archive User Permissions: Get user archive permissions on a specified archive

Get Search Properties: Get search options for all searches for the user in a database.

Add Archive Security: Add users and groups to archive security for one or more archives

Add Database Security: Add users and groups to database security for one or more databases

Add Search Security: Add search security for given users

Add Search Settings: Add search settings for users and groups in an archive

Add user: Create a new Square 9 user

Delete User: Permanently delete a Square 9 user

Update User: Update a Square 9 user password

Inboxes

Inboxes act as a holding folder for documents that have not been indexed yet. There is one set of inboxes no matter how many databases a GlobalSearch install has.

Get Inboxes: Return Inbox metadata.

Import Document to an Inbox: Adds a document to an inbox.

Chunking Upload

As of version 4.0.1.0 there are multiple ways to upload files to the server. This section details how to upload files for Archives, either in whole or in part using chunks of a file.

Create Archive Job: Initialize upload job to index a file into an archive.

Create Inbox Job: Initialize upload job to save a file to an inbox.

Upload File Chunk: Send part of a file.

Finalize Upload: File upload job complete.

Import Actions

Various calls for getting and creating capture workflows.

Get Capture Workflows List: Retrieve a list of available import scans capture workflows

Post Import XML: Creates an XML for Capture Workflow

Subscribe to get the most recent news, best practices, product updates, and our take on emerging tech

Subscribe for the latest from Square 9