HighQ 5.5

Using the generic connector for AI - APIs required by the generic connector for AI

OVERVIEW

Your AI service must support specific APIs to allow the AI Hub to connect to the service, authenticate, send files and receive data. In addition, the HighQ service will provide a webhook URL that your service should call when document metadata has been extracted, and is ready to be pulled back into the HighQ system by your customers.

Authorisation

Your AI service must provide a “client ID” and “secret key” that will be used by the HighQ AI Hub to authorise requests to your AI APIs. This client ID and secret key is entered by the HighQ System Administrator when they configure the connection, and should not be shared. Each customer should have their own client ID and secret key. The client ID and key can be ASCII text up to 250 characters, and will be used to request an access token from your AI service. The access token will be included in every API request in order to authenticate the request.

Root URL

Your AI service must make all APIs available on a root URL. This root URL can be at any level – for example, www.myAI.com and www.myAI.com/services/ai/extraction are both valid root URLs. Each API endpoint must be found on this root endpoint: for example, www.myAI.com/services/ai/extraction/authorize must exist for the connection to work.

Whitelisting IP range

In addition, to enable connection from the HighQ AI Hub to your AI service, you may need to whitelist the HighQ data centre IP ranges. If your service requires IP whitelisting, please contact the HighQ support team and request the IP ranges to whitelist.

API details

Your AI service must support the HighQ GET and POST APIs in the table below in order to comply with the HighQ AI Hub generic connector for AI specification.

Sr No. API Title Request Type HighQ Will provide in request Expected response Notes
1 /authorize POST

parameters:

client_id(String)

client_secret(String)

access_token(String)

client_id
Unique identifier required at system-level; provided to system admin

client_secret
Secret key required to access the AI service

access_token 
HighQ will use the token for every communication with your AI service.

This API specification was changed from GET to POST in 5.6.17 version.

2 /heartbeat GET - No response needed. But system should provide status code (200) Confirms if the AI service is available.
3 /callback POST

parameters:

clientCallbackUrl(url)

aiUniqueIdentifier(String)

"SUCCESS"/"FAILURE"(String)

clientCallbackUrl
URL that the AI service will call for reverse communication. For example, when documents have been processed the AI service will call this URL to inform the HighQ site that the processing has finished.

aiUniqueIdentifier 
Unique Identifier created by the system admin. The AI service provider will send this every time when it sends a call back URL request.

4 /projects GET - [

 projectId(String) 
projectName(String) 
 projectDescription(String)
}
]
projectID
Classifier that allows the AI engine and site to handle multiple Projects. A user can associate documents with a specific project.
5 /document/upload POST

parameters:

file(MultipartFile)

projectID(String)

jobID(String) jobID 
Unique ID provided by the AI service. This ID is used for all further API calls for uploaded documents
6 /questions GET List<projectID(String)> [
 {
 questionID(String) 
 questionText(String)
  [
   projectID(String)
  ]
 }
]

projectID 
Classifier that allows the AI engine and site to handle multiple Projects. A user can associate documents with a specific project

questionID 
recipe/item ID that the AI service can extract from a document.
For example, 'Party Location' with ID: 1

questionText 
Recipe/items that the AI service can extract from a document. For example, 'Party Location','Party Name','Document Class','Language'

7 /answers GET jobID(String) [
 {
  questionID(String)
  questionText(String)
   [
    answer(String)
   ]
 }
]

jobID 
Unique ID that is provided by the AI service when the document is uploaded

answer 
Extracted data value from a document, for example, language:English

 

Planned for future releases

Sr No. API Title Request Type HighQ Will provide in request Expected response Notes
1 /project/create POST {
 projectId(String)
 templateID(String)
 projectName(String)
 projectDescription(String)
}
projectID(String) -
2 /templates GET - [
 {
  templateId(String)
  templateName(String)
  templateDescription(String)
 }
]
-
3 /reanalyze POST [
jobID(String)
]
"SUCCESS"/"FAILURE"(String) -
4 /delete DELETE [
jobID(String)
]
"SUCCESS"/"FAILURE"(String) -

 

Comments


0 Comments

Last Updated: Nov 08,2024