APIs
Dataworkz API to RAG Apps - to perform QnA, Search and Chat.
Dataworkz RAG Applications support multi-modal data (images, text, and more) in multiple formats (PDF, PowerPoint, and others) from a variety of sources (Google Drive, SharePoint, and others). RAG Applications support the following use cases:
QnA — users ask questions in natural language; Dataworkz uses RAG to return answers from the underlying data corpus.
Enterprise Search — users run semantic search — similarity-based search over vector embeddings — across the data corpus.
Chat — users have a multi-turn conversation with the data corpus. (This is not the Agents API.)
Note: All API calls require an API token. Follow these steps to generate an API Key. Pass the API key in the Authorization header using the format SSWS <your api key>.
LLMProviderId
This is the identifier of an LLM configuration defined in Dataworkz. Dataworkz supports multiple configured LLMs, each suited for different use cases.
API
Returns a map containing unique identifier and name for all QnA systems that have been set up in Dataworkz
Token
For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
GET /api/qna/v1/systems HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation
{
"f9c5aa7e-57a9-4f77-9e91-e8b37eb46": "Security Policies QnA"
}Get details of a specific QnA system
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
GET /api/qna/v1/systems/{systemId} HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation
{
"uuid": "f9c5aa7e-57a9-4f77-9e91-e8b37eb46c18",
"name": "mdb",
"mode": "qa",
"prompt": "this is a prompt",
"dimensions": "0",
"database": "mongodb",
"params": "{}"
}Returns a map containing unique identifier and LLM models that have been configured for a given QnA system
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
GET /api/qna/v1/systems/{systemId}/llm-providers HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation
{
"47b51bb5-bdfa-413d-8bfa-ff040ab1c901": "llama-2-13b-chat"
}Get a list of search results from the configured system that semantically match the query asked based on similarity with the data corpus configured for that QnA system. You can pass filter expressions to control the data retrieval process. Optionally, flags can be passed to configure the RAG engine behaviour. Each request is associated with an id to perform additional actions later.
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54search query terms
Example to join 2 datasets in S3 and write the output to MongoDBId of the LLM to use. This has to be from the list configured in the pipeline. Id can be retrieved using /systems/{systemId}/llm-providers api or copied from the LLM Configuration page. Will only be used if required.
774c246b-a079-4fa5-b3dc-4a82b35aa258Filter expression to apply to data retrieval
version in ('1.2', '2.0')Flags to control behaviour. Format is Key=value pairs separated by ; Supported flags - include_probe : Default is true. Set to false to disable returning probe data with request
include_probe=false;context=3For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc searchResultsList - the search results linksCount - the number of results with a link pdfCount - the number of pdf doc results wordCount - the number of word doc results textCount - the number of text doc results systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question
GET /api/qna/v1/systems/{systemId}/search?query=text HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc searchResultsList - the search results linksCount - the number of results with a link pdfCount - the number of pdf doc results wordCount - the number of word doc results textCount - the number of text doc results systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question
{
"question": "What is the status of the order?",
"questionUuid": "6b807b37-0c41-4cd9-a420-7d2dc9170fe9",
"searchResultsList": [
{
"source": "",
"type": "",
"data": "",
"link": ""
}
],
"linksCount": 4,
"pdfCount": 2,
"wordCount": 2,
"textCount": 0,
"systemName": "OrderSystem",
"systemId": "3756809c-4032-4e48-b3f0-2a6d30a03a54",
"status": "COMPLETED",
"failureReason": "",
"queryPlan": "",
"appliedFilters": "",
"inputFilters": "",
"extractedFilters": ""
}Ask a question to a specific QnA system and leverage RAG techniques to get the question answered based on the data corpus configured for that QnA system. You should specify the LLM to use from the ones configured for this QnA system. You can pass filter expressions to control the data retrieval process. Optionally, flags can be passed to configure the RAG engine behaviour. Each request is associated with an id to perform additional actions later.
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54Text of the question asked to the QnA system. Must be url encoded.
Example to join 2 datasets in S3 and write the output to MongoDBId of the LLM to use. This has to be from the list configured in the pipeline. Id can be retrieved using /systems/{systemId}/llm-providers api or copied from the LLM Configuration page.
774c246b-a079-4fa5-b3dc-4a82b35aa258Filter expression to apply to data retrieval
version in ('1.2', '2.0')Flags to control behaviour. Format is Key=value pairs separated by ; Supported flags - include_probe : Default is true. Set to false to disable returning probe data with request
include_probe=false;context=3For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc answer - the answer from the RAG system context - the contexts retrieved used to answer the question systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question
GET /api/qna/v1/systems/{systemId}/answer?questionText=text&llmProviderId=text HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc answer - the answer from the RAG system context - the contexts retrieved used to answer the question systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question
{
"question": "What is the status of the order?",
"questionUuid": "6b807b37-0c41-4cd9-a420-7d2dc9170fe9",
"answer": "The order is being processed.",
"context": [
{
"source": "",
"type": "",
"data": "",
"link": ""
}
],
"type": "Dataworkz",
"systemName": "OrderSystem",
"systemId": "3756809c-4032-4e48-b3f0-2a6d30a03a54",
"status": "COMPLETED",
"failureReason": "",
"queryPlan": "",
"appliedFilters": "",
"inputFilters": "",
"extractedFilters": ""
}Get a list of all filters associated with this system and their metadata which includes their datatype, cardinality and values (for low cardinality filters)
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
GET /api/qna/v1/systems/{systemId}/filters HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation
{
"filters": [
{
"name": "year",
"type": "integer",
"description": "The year that the data was published",
"cardinality": 3,
"values": [
2021,
2022,
2023
]
}
]
}Get data for a document in this system's dataset
Token
Id of the QnA system
3756809c-4032-4e48-b3f0-2a6d30a03a54Id of the document from the dataset
Detail associated with the document data request
12`1`1`10`20For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
No content
GET /api/qna/v1/systems/{systemId}/document?documentId=text HTTP/1.1
Host: ragapps.dataworkz.com
Authorization: YOUR_API_KEY
Accept: */*
successful operation
No content
Last updated

