Get Datasets by Unit
Endpoint used to get unit datasets.
Request Example
Section titled “Request Example”curl --request GET \ --url https://chat.api.toolzz.com.br/api/v1/knowledge/unity/{unityId} \ --header 'Authorization: Bearer TOKEN_HERE'Response Example
Section titled “Response Example”{ "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}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters
Section titled “URL Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
unityId | UUID | Unit unique identifier. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
id | UUID | Unique identifier of the Knowledge Base. |
kbName | String | Base identification name. |
kbDescription | String | Detailed description of the base’s purpose. |
kbStatus | Number | Base status code (e.g., 1 for Active). |
kbIconImg | URL | Link to the base’s icon image. |
isActivated | Boolean | Defines if the base is enabled for use by agents. |
documentsInfo | Object | Object with the statistical storage summary of the base. |
documentsInfo.size | Number | Total accumulated size of the files in bytes. |
documentsInfo.documentCount | Number | Total quantity of documents registered in the base. |
kbFolder[] | Array | List of organizational folders within the base. |
kbFolder[].id | UUID | Unique identifier of the folder. |
kbFolder[].name | String | Folder name. |
kbFolder[].isRoot | Boolean | Indicates if this is the root folder of the base. |
kbFolder[]._count.knowLedgeBaseFile | Number | Counter of existing files within this specific folder. |
knowLedgeBaseFile[] | Array | List of files/documents contained in each folder. |
knowLedgeBaseFile[].id | UUID | Unique identifier of the file. |
knowLedgeBaseFile[].fileName | String | Technical file name in storage. |
knowLedgeBaseFile[].maskName | String | Original file name displayed in the interface. |
knowLedgeBaseFile[].status | String | Processing state (e.g., SUCCESS, ERROR, PROCESSING). |
knowLedgeBaseFile[].statusDescription | String | Technical detail of errors, if the status is ERROR. |
knowLedgeBaseFile[].url | URL | Public/signed link for viewing the file. |
knowLedgeBaseFile[].extension | String | File extension (e.g., pdf, txt). |
knowLedgeBaseFile[].size | Number | Individual file size in bytes. |
knowLedgeBaseFile[].tags | Array | List of tags/keywords associated with the document. |
knowLedgeBaseFile[].createdAt | String | File upload date and time (ISO 8601). |
| Global Totals | ||
knowledgeBaseCount | Number | Total knowledge bases existing in the unit. |
activeCount | Number | Quantity of bases that are currently activated. |
knowledgeBaseLimit | Number | Maximum limit of bases allowed for the unit plan. |
Security
Section titled “Security”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:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
