Skip to main content

Open API

Overview

SERVICEME Open API basic call process:

Step 1: Use the interface provided in the authentication section to authenticate and obtain the access token

Authentication is divided into two types: user authentication and client authentication.

  • User authentication: Authentication based on personal account identity.
  • Client authentication: Authentication using the client code and secret issued by SERVICEME.

Step 2: Use the access token to call the corresponding API

Authentication Methods

User AAD Authentication

This method is a type of user authentication and requires the use of an AAD access token as the basis for authentication.

  • How to obtain the AAD access token:

    AAD and React integration documentation: Go to->

    AAD and .Net integration documentation: Go to->

    AAD and Java integration documentation: Go to->

  • Interface address:/openapi/auth/user/aad

  • Request method:post

  • Request body:

Parameter NameRequiredTypeDescription
tokenYesstringUser AAD access token (provided by the integrator)
  • Request example:
curl --location 'https://localhost/openapi/auth/user/aad' \
--header 'Content-Type: application/json' \
--data '{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlhSdmtvOFA3QTNVYVdTblU3Yk05blQwTWpoQSJ9.eyJhdWQiOiIzZTEwNjVhYS1jZWYxLTRiYTgtOWRiOS1kMWQ1Y2UzMGYyZDgiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vNDRjMjRmNDItZDQ5Yi00MT......"
}'
  • Response body:
Parameter NameSub-parameterTypeDescription
dataobjectResponse data
access_tokenstringSERVICEME system access token
expires_innumberExpiration time, in minutes
successbooleanWhether the request was successful
msgstringError message if success is false
  • Response example:
{
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc0V4dGVybmFsIjpmYWxzZSwidXNlcklkIjoiNDAzMDUwMjEwMTEyODgzOTE2OCIsImFjY291bnQiOiJlY210cmlhbEBzZXJ2aWNlbWUub25taWNyb3NvZ......",
"expires_in": 1440
},
"success": true,
"msg": ""
}

Client and User Account Authentication

This authentication method combines client authentication and user account authentication. It authenticates the user account while using client credentials (client code and secret) to ensure the security of the API call. Signature verification is required when calling this interface.

  • How to obtain client and secret?

Please contact the system administrator. The administrator will create and assign client credentials for you through the following address:

https://xxx/#/super-admin/client-management
  • Interface address:/openapi/auth/client_with_account

  • Request method:post

  • Request body:

Parameter NameRequiredTypeDescription
clientYesstringClient code (provided by SERVICEME)
accountYesstringUser account (provided by the integrator)
timestampYesnumberTimestamp (13-digit number, accurate to milliseconds, e.g., 1711537596897)
nonceYesstring6-digit random number (can be a combination of numbers or letters)
signatureYesstringSignature, valid for five minutes (signature format: concatenate with colons and then MD5 client:{client}secret:{secret}account:{account}timestamp:{timestamp}nonce:{nonce} to get a 32-character lowercase MD5 value)
  • JavaScript signature example:

    Please create a new HTML file, paste the following content, and open it in a browser

    <html>
    <head>
    <style>
    .box {
    width: 100%;
    height: 100%;
    padding: 50px 50px;
    }
    .row {
    display: flex;
    height: 50px;
    width: 100%;
    }
    .col1 {
    flex: 1;
    }
    .col2 {
    flex: 3;
    }
    </style>
    </head>
    <body>
    <div class="box">
    <div class="row">
    <div class="col1">client:</div>
    <div class="col2" id="client"></div>
    </div>
    <div class="row">
    <div class="col1">secret:</div>
    <div class="col2" id="secret"></div>
    </div>
    <div class="row">
    <div class="col1">account:</div>
    <div class="col2" id="account"></div>
    </div>
    <div class="row">
    <div class="col1">timestamp:</div>
    <div class="col2" id="timestamp"></div>
    </div>
    <div class="row">
    <div class="col1">nonce:</div>
    <div class="col2" id="nonce"></div>
    </div>
    <div class="row">
    <div class="col1">signature:</div>
    <div class="col2" id="signature"></div>
    </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
    <script>
    const client = "openapi"
    const secret = "DzYwyICrKbUCEseYthCK0PfSfX7NPEuV"
    const account = "test@serviceme.com"
    const timestamp = +new Date()
    const nonce = "123abc"
    const message = `client:${client}secret:${secret}account:${account}timestamp:${timestamp}nonce:${nonce}` // Signature plaintext
    const md5Hash = CryptoJS.MD5(message).toString().toLowerCase(); // MD5 32-bit lowercase

    console.log(`Signature plaintext: ${message}`)
    console.log(`Signature result: ${md5Hash}`)

    document.getElementById('client').innerText = client;
    document.getElementById('secret').innerText = secret;
    document.getElementById('account').innerText = account;
    document.getElementById('timestamp').innerText = timestamp;
    document.getElementById('nonce').innerText = nonce;
    document.getElementById('signature').innerText = md5Hash;
    </script>
    </body>
    </html>
  • Request example:

curl --location 'https://localhost/openapi/auth/client_with_account' \
--header 'Content-Type: application/json' \
--data '{
"client": "openapi",
"account": "test@serviceme.com",
"timestamp": 1711537596456,
"nonce": "123abc",
"signature": "182be0c5cdcd5072bb1864cdee4d3d6e"
}'
  • Response body:
Parameter NameSub-parameterTypeDescription
dataobjectResponse data
access_tokenstringSERVICEME system access token
expires_innumberExpiration time, in minutes
successbooleanWhether the request was successful
msgstringError message if success is false
  • Response example:
{
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc0V4dGVybmFsIjpmYWxzZSwidXNlcklkIjoiNDAzMDUwMjEwMTEyODgzOTE2OCIsImFjY291bnQiOiJlY210cmlhbEBzZXJ2ub25ta......",
"expires_in": 1440
},
"success": true,
"msg": ""
}

Chat

Send Message to Copilot

  • Interface address:/openapi/chat/expert

  • Request method:post

  • Request header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request body:
Parameter NameRequiredTypeDescription
expertCodeYesstringCopilot code in the SERVICEME system (see SERVICEME system)
contentYesstringQuestion content
sessionIdNostringSession ID, representing a chat context. Pass null to start a new session. The new session ID will be returned in the response. From the second Q&A onwards, carry the session ID returned from the previous response.
streamNobooleanWhether to enable streaming (true: on; false: off), default is off
includeThoughtNobooleanWhether to include thoughts in the response (true: include; false: do not include)

How to obtain the Q&A code? See the image below:

img

  • Request example:
curl --location 'https://localhost/vee/openapi/chat/expert' \
--header 'Authorization: openapi {access_token}' \
--header 'Content-Type: application/json' \
--data '{
"expertCode": "CHATES",
"content": "Overtime application",
"sessionId": null,
"stream": false,
"includeThought": true
}'
  • Response body:
Parameter NameSub-parameterSub-sub-parameterSub-sub-sub-parameterTypeDescription
dataobjectResponse data
chatRecordIdstringChat record ID
sessionIdstringSession ID
contentstringText type response content
mediasobjectArray of media type response content (images and files)
typestringimage: image; file: file
namestringName
suggestionQuestionsarray stringSuggested questions
thoughtsarrayThoughts
thoughtstringThought content
pluginNamestringPlugin name
elapsedTimeobjectPlugin elapsed time information
modelfloatModel elapsed time
actionfloatAction elapsed time
totalfloatTotal elapsed time
statestringState (success: successful)
finish_reasonstringWhether the response is finished. When the value is stop, it means the response is finished. During the response, the value is null.
successbooleanWhether the request was successful
msgstringError message if success is false
  • Non-streaming response example:
{
"data": {
"chatRecordId": "4299234148041625600",
"sessionId": "4292755814873047040",
"content": "The team leader issues work tasks, clarifies completion nodes and acceptance criteria, and employees can work overtime only after reaching an agreement with their superiors. After completing the overtime, the employee fills in the overtime hours in the time system, submits the overtime process in the system, and the remarks must clearly list the overtime tasks. The team leader/superior approves the overtime application process after accepting the overtime results. HR confirms the clock-in records and calculates the compensatory leave quota.",
"medias": [
{
"type": "image",
"name": null,
"url": "http://localhost:3978/openapi/chat/media/image/FE680A9CCFB1B56E80737FB28562DC33F4A37DEF52A65F046464788B83E0BE77"
},
{
"type": "file",
"name": "Reference Document.pdf",
"url": "https://localhost/#/share/preview?fileId=4268457334348447744&objectType=2&previewType=file&mode=login"
}
],
"suggestionQuestions": [],
"thoughts": [
{
"thought": "To answer this question, I need to query relevant information in the knowledge base.",
"pluginName": "Search Knowledgebase",
"elapsedTime": {
"model": 3612.4722,
"action": 689.5891,
"total": 4302.0613
},
"state": "success"
}
],
"finish_reason": "stop"
},
"success": true,
"msg": ""
}
  • Stream Response Example:
data: {"data":{"chatRecordId":"4299228743576059904","sessionId":"4292755079242457089","content":"","medias":[],"suggestionQuestions":[],"thoughts":[{"thought":"In order to answer this question, I need to search the knowledge base for relevant information.","pluginName":"Search Knowledgebase","elapsedTime":{"model": 3612.4722,"action": 689.5891,"total": 4302.0613},"state": "success"}],"finish_reason":null},"success":true,"msg":""}

data: {"data":{"chatRecordId":"4299228743576059904","sessionId":"4292755079242457089","content":"The team leader issues work tasks, clarifies completion deadlines and acceptance criteria, and employees can work overtime only after reaching an agreement with their superiors. After completing overtime, employees should fill in the overtime hours in the time system, submit the overtime process in the system, and clearly state the overtime tasks in the remarks. Complete clock-in and clock-out records at the workplace, and the team leader/superior will approve the overtime application process after accepting the overtime results. HR will confirm the clock-in records and calculate the compensatory leave quota.","medias":[],"suggestionQuestions":[],"thoughts":[],"finish_reason":null},"success":true,"msg":""}

data: {"data":{"chatRecordId":"4299228743576059904","sessionId":"4292755079242457089","content":"","medias":[{"type":"image","name":null,"url":"http://localhost:3978/openapi/chat/media/image/FE680A9CCFB1B56E80737FB28562DC33F4A37DEF52A65F046464788B83E0BE77"}],"suggestionQuestions":[],"thoughts":[],"finish_reason":null},"success":true,"msg":""}

data: {"data":{"chatRecordId":"4299228743576059904","sessionId":"4292755079242457089","content":"","medias":[{"type":"file","name":"Answer Reference File.pdf","url":"https://localhost/#/share/preview?fileId=4268457334348447744&objectType=2&previewType=file&mode=login"}],"suggestionQuestions":[],"thoughts":[],"finish_reason":"stop"},"success":true,"msg":""}

Get Conversation References

  • Endpoint: /openapi/chat/record/{chatRecordId}/reference

  • Request Method: get

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request URL Parameters:
Parameter NameRequiredTypeDescription
chatRecordIdYesstringValue taken from the chatRecordId field returned by the Q&A interface
  • Request Example:
curl --location 'http://localhost/openapi/chat/record/4299234148041625600/reference' \
--header 'Authorization: openapi {access_token}'
  • Response Body:
Parameter NameSub-ParameterTypeDescription
dataobject arrayResponse data
titlestringTitle
contentstringContent of the referenced segment in the conversation record
scorefloatRelevance (0 to 1, the closer to 1, the more relevant)
urlstringLink (currently only file type references have links)
typestringType enumeration: document (document), image (image), QnA, other
successbooleanWhether the request was successful
msgstringWhen success is false, this field has a value with some error messages
  • Response Example:
{
"data": [
{
"title": "Company Administrative Policy.pdf",
"content": "Segment One ......",
"score": 0.95,
"url": "https://localhost/#/share/preview?fileId=4268457334348447744&objectType=2&previewType=file&mode=login",
"type": "document"
},
{
"title": "Company Administrative Policy.pdf",
"content": "Segment Two ......",
"score": 0.81,
"url": "https://localhost/#/share/preview?fileId=4268457334348447744&objectType=2&previewType=file&mode=login",
"type": "document"
},
{
"title": "Company Administrative Policy.pdf",
"content": "Segment Three ......",
"score": 0.76,
"url": "https://localhost/#/share/preview?fileId=4268457334348447744&objectType=2&previewType=file&mode=login",
"type": "document"
}
],
"success": true,
"msg": ""
}

File Space

Single File Upload

  • Endpoint: v1/openapi/workspace/file/upload

  • Request Method: post

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Content Type: form-data
  • Request Body:
Parameter NameRequiredTypeDescription
workspaceYesstringFile space
fileYesfileFile (single)
eponymousCoverNoboolWhether to overwrite if a file with the same name exists (default is not to overwrite)
  • Request Example:
curl --location 'http://localhost/v1/openapi/workspace/file/upload' \
--header 'Authorization: openapi {access_token}' \
--form 'workspace="Test Space"' \
--form 'file=@"/C:/test.doc"' \
--form 'eponymousCover="false"'
  • Response Body:
Parameter NameSub-ParameterTypeDescription
dataobjectResponse data
fileIdstringFile ID
fileNamestringFile name
uploaderstringUploader
successbooleanWhether the request was successful
msgstringWhen success is false, this field has a value with some error messages
  • Response Example:
{
"data": {
"fileId": "4345229404125790208",
"fileName": "test.doc",
"uploader": "test@serviceme.com"
},
"success": true,
"msg": ""
}

Multiple File Upload

Submit Files

  • Endpoint: v1/openapi/workspace/file/upload/batchSubmit

  • Request Method: post

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Content Type: form-data
  • Request Body:
Parameter NameRequiredTypeDescription
workspaceYesstringFile space
filesYesfileFiles (multiple)
eponymousCoverNoboolWhether to overwrite if a file with the same name exists (default is not to overwrite)
  • Request Example:
curl --location 'http://localhost/v1/openapi/workspace/file/upload/batchSubmit' \
--header 'Authorization: openapi {access_token}' \
--form 'workspace="Test Space"' \
--form 'files=@"/C:/test1.doc"' \
--form 'files=@"/C:/test2.docx"' \
--form 'eponymousCover="false"'
  • Response Body:
Parameter NameSub-ParameterTypeDescription
dataobjectResponse data
stateIdstringUpload state ID, which can be used to continuously poll for the latest upload results
successbooleanWhether the request was successful
msgstringWhen success is false, this field has a value with some error messages
  • Response Example:
{
"data": {
"stateId": "4345229404125790208"
},
"success": true,
"msg": ""
}

Query Upload Results

  • Endpoint: v1/openapi/workspace/file/upload/batchSubmit/{stateId}

  • Request Method: get

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request URL Parameters:
Parameter NameRequiredTypeDescription
stateIdYesstringThe stateId field value returned by the multiple file submission upload interface
  • Request Example:
curl --location 'http://localhost/v1/openapi/workspace/file/upload/batchSubmit/4345227891722682368' \
--header 'Authorization: openapi {access_token}'
  • Response Body:
Parameter NameSub-ParameterTypeDescription
dataobject arrayResponse data
fileIdstringFile ID
fileNamestringFile name
statestringState enumeration: underway (in queue), success (successful), fail (failed)
uploaderstringUploader
errorMsgstringWhen the state is fail, this field stores the reason for the failure
finishTimestringTime when the file processing was completed
successbooleanWhether the request was successful
msgstringWhen success is false, this field has a value with some error messages
  • Response Example:
{
"data": [
{
"fileId": "4345227925730099200",
"fileName": "test1.doc",
"state": "success",
"uploader": "test@serviceme.com",
"errorMsg": "",
"finishTime": "2024-08-17T05:04:30.0128596Z"
},
{
"fileId": "4345227924266287104",
"fileName": "test2.docx",
"state": "success",
"uploader": "test@serviceme.com",
"errorMsg": "",
"finishTime": "2024-08-17T05:04:29.7952274Z"
}
],
"success": true,
"msg": ""
}

QnA Creation

  • Endpoint: v1/openapi/workspace/qna/create

  • Request Method: post

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request Body:
Parameter NameSub-ParameterRequiredTypeDescription
workspaceYesstringFile space
questionsYesstring arrayQuestion array, can be multiple
answerYesstringAnswer
metadatasNoobject arrayMetadata
typeCodeYesstringMetadata type
contentYesstringContent
  • Request Example:
curl --location 'http://localhost/v1/openapi/workspace/qna/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: openapi {access_token}' \
--data '{
"questions": [
"Test Question"
],
"answer": "Test Answer",
"workspace": "Test Space",
"metadatas": [
{
"typeCode": "Document type",
"content": "Test Metadata"
}
]
}'
  • Response Body:
Parameter NameTypeDescription
successbooleanWhether the request was successful
msgstringWhen success is false, this field has a value with some error messages
  • Response Example:
{
"success": true,
"msg": ""
}

Query Files

- **API Endpoint:** ```v1/openapi/workspace/file```

- **Request Method:** ```post```

- **Request Header:**

| Parameter Name | Required | Type | Description |
| -------------- | -------- | ------ | --------------------------------------------------------------- |
| Authorization | Yes | string | Fill in the SERVICEME access token, format: openapi `{access_token}` |

- **Request Body:**

| Parameter Name | Required | Type | Description |
| -------------- | -------- | ------ | --------------------- |
| workspace | Yes | string | File workspace |
| pageIndex | No | number | Page number, default is the first page |
| pageSize | No | number | Number of items to retrieve, default is 10 |

- **Request Example:**

```shell
curl --location 'http://localhost/v1/openapi/workspace/file' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"workspace": "test workspace",
"pageIndex": 1,
"pageSize": 10
}'
  • Response Body:

    Parameter NameSub-ParameterSub-Sub-ParameterTypeDescription
    dataobject arrayResponse data
    idstringFile ID
    namestringFile name
    sizenumberFile size in bytes
    descriptionstringDescription
    fullPathstringFile path
    tagsobject arrayFile tag information
    idstringTag ID
    valuestringTag content
    chunkingStatestringFile indexing state: waiting, success, fail, underway
    previewStatestringFile preview state: waiting, success, fail, underway
    fileCanPreviewbooleanWhether the file can be previewed, true: yes; false: no
    previewUrlstringFile preview URL
    createdByRealNamestringFile creator's name
    createdByAccountstringFile creator's account
    createddatetimeFile creation time
    modifiedByRealNamestringFile editor's name
    modifiedByAccountstringFile editor's account
    modifieddatetimeFile modification time
    successbooleanWhether the request was successful
    msgstringError message if success is false
  • Response Example:

{
"data": [
{
"id": "4339013367831199744",
"name": "test.docx",
"size": 15113,
"description": null,
"fullPath": "/",
"tags": [],
"chunkingState": "success",
"previewState": "success",
"fileCanPreview": true,
"previewUrl": "http://localhost.com/#/share/preview?fileId=4339013367831199744&objectType=2&previewType=file&mode=login",
"createdByRealName": "test",
"createdByAccount": "test",
"created": "2024-07-31T01:30:02.88",
"modifiedByRealName": "test",
"modifiedByAccount": "test",
"modified": "2024-07-31T01:30:02.88"
}
],
"pageSize": 10,
"pageIndex": 1,
"totalCount": 1,
"success": true,
"msg": ""
}

Query File Chunks

  • API Endpoint: v1/openapi/workspace/file/chunk

  • Request Method: post

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request Body:
Parameter NameRequiredTypeDescription
fileIdYesstringFile ID
imageFormatNostringImage format, markdown or html, default is markdown
pageIndexNonumberPage number, default is the first page
pageSizeNonumberNumber of items to retrieve, default is 10
  • Request Example:
curl --location 'http://localhost/v1/openapi/workspace/file/chunk' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"fileId": "4344174161665458176",
"imageFormat": "html",
"pageIndex": 1,
"pageSize": 10
}'
  • Response Body:

    Parameter NameSub-ParameterSub-Sub-ParameterTypeDescription
    dataobject arrayResponse data
    idstringChunk ID
    contentstringChunk content
    successbooleanWhether the request was successful
    msgstringError message if success is false
  • Response Example:

{
"data": [
{
"id": "4339013367831199744",
"content": "test"
}
],
"pageSize": 10,
"pageIndex": 1,
"totalCount": 1,
"success": true,
"msg": ""
}

RAG

  • API Endpoint: /v1/openapi/rag

  • Request Method: post

  • Request Header:

Parameter NameRequiredTypeDescription
AuthorizationYesstringFill in the SERVICEME access token, format: openapi {access_token}
  • Request Body:
Parameter NameTypeRequiredDefaultDescription
querystringNoNoneThe question or content to be searched. Cannot be null if keywords is also null.
keywordsstringNoNoneKeywords, separated by `
workspacesarrayNoNoneThe file workspace names or IDs to be searched in this RAG. If provided, the search will be limited to these workspaces.
ragObjectRagObjectYes0RAG object type, enumerated values (see RagObject Enum).
topknumberYesNoneNumber of results to return.
minSimilaritydoubleNo0.8Minimum similarity, range [0, 1].
metadataFilterarrayNoNoneMetadata filter types to use. Currently only supports default filter.
ragModeSearchModeYes0RAG mode, enumerated values (see SearchMode Enum).
weightsobjectNoNoneRRF weights for various indexes, only effective when RagMode is Hybrid. If null, default weights will be used.
rerankerstringNoNoneIf null, reranker will not be used.
  • Request Example:
curl --location 'http://localhost/v1/openapi/rag' \
--header 'Authorization: ••••••' \
--header 'Content-Type: application/json' \
--data '{
"query": "What is artificial intelligence?",
"keywords": "AI|machine learning",
"workspaces": ["workspace1", "workspace2"],
"ragObject": 2,
"topk": 3,
"minSimilarity": 0.85,
"metadataFilter": ["default"],
"ragMode": 0,
"weights": {
"Embedding": 0.9,
"FullText": 0.8
},
"reranker": "default"
} '
  • Response Body:
Field NameTypeDescription
dataobjectResponse data object, containing search results and search ID information.
data.resultsarrayList of search results, each element is an object containing chunk information.
data.results[].chunkIdstringChunk ID
data.results[].fileIdstringFile ID to which the chunk belongs
data.results[].fileNamestringFile name to which the chunk belongs
data.results[].contentstringChunk content
data.results[].metadatajsonChunk metadata
data.results[].urlstringURL address of the chunk (if any)
data.results[].searchScoredoubleSimilarity score
data.results[].rrfScoredoubleRRF score
data.results[].rerankScoredoubleRe-rank score
data.results[].workspaceIdstringWorkspace ID to which the file belongs
data.results[].workspaceNamestringWorkspace name to which the file belongs
data.searchIdstringUnique identifier for this search operation
successbooleanWhether the request was successful
msgstringMessage returned by the request (if any)
  • Response Example:
{
"data": {
"results": [
{
"chunkId": "4422442085118906369",
"fileId": "4417076017114382336",
"fileName": "file1.pdf",
"content": "...",
"metadata": {
"Url": "https://...",
"FileName": "file1.pdf",
"WorkspaceName": "workspace1",
"FileId": "4417076017114382336",
"FilePath": "/",
"Created": "2025-03-03T11:23:08.803",
"Size": "1160594"
},
"url": "https://...",
"searchScore": 0.153852914388501,
"rrfScore": 0.8768274796195331,
"rerankScore": 0.0,
"workspaceId": "4417069258022846464",
"workspaceName": ""
},
{
"chunkId": "4422442085114712073",
"fileId": "4417076017114382336",
"fileName": "file1.pdf",
"content": "...",
"metadata": {
"Url": "https://...",
"FileName": "file1.pdf",
"WorkspaceName": "workspace1",
"FileId": "4417076017114382336",
"FilePath": "/",
"Created": "2025-03-03T11:23:08.803",
"Size": "1160594"
},
"url": "https://...",
"searchScore": 0.152822583517241,
"rrfScore": 0.8670604574184315,
"rerankScore": 0.0,
"workspaceId": "4417069258022846464",
"workspaceName": ""
},
{
"chunkId": "4422442085114712071",
"fileId": "4417076017114382336",
"fileName": "file1.pdf",
"content": "...",
"metadata": {
"Url": "...",
"FileName": "file1.pdf",
"WorkspaceName": "workspace1",
"FileId": "4417076017114382336",
"FilePath": "/",
"Created": "2025-03-03T11:23:08.803",
"Size": "1160594"
},
"url": "...",
"searchScore": 0.153708375384407,
"rrfScore": 0.8661891817471927,
"rerankScore": 0.0,
"workspaceId": "4417069258022846464",
"workspaceName": ""
}
],
"searchId": "4423568945336811520"
},
"success": true,
"msg": ""
}
  • Enumeration Types

RagObject Enumeration

Enumeration ValueEnumeration NumberDescription
Both0Retrieve both Q&A and document content.
Qna1Retrieve only Q&A content.
Doc2Retrieve only document content.

SearchMode Enumeration

Enumeration ValueEnumeration NumberDescription
Hybrid0Hybrid search mode, combining embedding vectors and full-text search.
Embedding1Search mode based only on embedding vectors.
FullText2Search mode based only on full-text search.