Skip to content

Get Datasets by Unit

Endpoint used to get unit datasets.

Terminal window
curl --request GET \
--url https://chat.api.toolzz.com.br/api/v1/knowledge/unity/{unityId} \
--header 'Authorization: Bearer TOKEN_HERE'
{
"items": [
{
"id": "uuid",
"unityId": "uuid",
"kbCreatorId": "uuid",
"kbInstitutionId": "uuid",
"kbStatus": 123,
"kbName": "<string>",
"kbDescription": "<string>",
"kbIconImg": "<url>",
"kbFolder": [
{
"isRoot": false,
"id": "uuid",
"institutionId": "uuid",
"name": "<string>",
"knowLedgeBaseId": "uuid",
"knowLedgeBaseFile": [
{
"status": "SUCCESS | ERROR | PROCESSING",
"id": "uuid",
"institutionId": "uuid",
"fileName": "<string>",
"internalStorageUrl": "<url>",
"url": "<url>",
"maskName": "<string>",
"knowLedgeBaseId": "uuid",
"kbFolderId": "uuid",
"createdAt": "ISO8601_DATETIME",
"updatedAt": "ISO8601_DATETIME | null",
"extension": "<string>",
"size": 123,
"customData": null,
"integrationId": "uuid | null",
"statusDescription": "<string>",
"category": "<string> | null",
"content": "<string> | null",
"tags": []
}
],
"_count": {
"knowLedgeBaseFile": 123
}
}
],
"documentsInfo": {
"size": 123,
"documentCount": 123
},
"isActivated": true
}
],
"knowledgeBaseCount": 123,
"activeCount": 123,
"knowledgeBaseLimit": 123
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
unityIdUUIDUnit unique identifier.Yes
KeyTypeDescription
idUUIDUnique identifier of the Knowledge Base.
kbNameStringBase identification name.
kbDescriptionStringDetailed description of the base’s purpose.
kbStatusNumberBase status code (e.g., 1 for Active).
kbIconImgURLLink to the base’s icon image.
isActivatedBooleanDefines if the base is enabled for use by agents.
documentsInfoObjectObject with the statistical storage summary of the base.
documentsInfo.sizeNumberTotal accumulated size of the files in bytes.
documentsInfo.documentCountNumberTotal quantity of documents registered in the base.
kbFolder[]ArrayList of organizational folders within the base.
kbFolder[].idUUIDUnique identifier of the folder.
kbFolder[].nameStringFolder name.
kbFolder[].isRootBooleanIndicates if this is the root folder of the base.
kbFolder[]._count.knowLedgeBaseFileNumberCounter of existing files within this specific folder.
knowLedgeBaseFile[]ArrayList of files/documents contained in each folder.
knowLedgeBaseFile[].idUUIDUnique identifier of the file.
knowLedgeBaseFile[].fileNameStringTechnical file name in storage.
knowLedgeBaseFile[].maskNameStringOriginal file name displayed in the interface.
knowLedgeBaseFile[].statusStringProcessing state (e.g., SUCCESS, ERROR, PROCESSING).
knowLedgeBaseFile[].statusDescriptionStringTechnical detail of errors, if the status is ERROR.
knowLedgeBaseFile[].urlURLPublic/signed link for viewing the file.
knowLedgeBaseFile[].extensionStringFile extension (e.g., pdf, txt).
knowLedgeBaseFile[].sizeNumberIndividual file size in bytes.
knowLedgeBaseFile[].tagsArrayList of tags/keywords associated with the document.
knowLedgeBaseFile[].createdAtStringFile upload date and time (ISO 8601).
Global Totals
knowledgeBaseCountNumberTotal knowledge bases existing in the unit.
activeCountNumberQuantity of bases that are currently activated.
knowledgeBaseLimitNumberMaximum limit of bases allowed for the unit plan.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page