2025.26 Public API/SDK changes
2 min read
Public API
New Endpoints
tech GET Folder Info - Get the information of a folder based on the folder path or id. This can also be used to check whether a folder exists or not.
Example
GETby Idcurl --location --request GET '<https://gateway.<your-app>>.unique.app/public/chat/folder/info?scopeId=scope_jhsgdf7393bd83ewwer' \ --header 'x-user-id: <your-user-id>' \ --header 'x-company-id: <your-company-id>' \ --header 'Authorization: <your-api-key>' \ --header 'x-app-id: <your-app-id>' \ --header 'x-api-version: 2023-12-06' \ --header 'Content-Type: application/json' \
GETby Folder Pathcurl --location --request GET '<https://gateway.<your-app>>.unique.app/public/chat/folder/info?folderPath=%2FCompany%2FClients%2FPortofolio' \ --header 'x-user-id: <your-user-id>' \ --header 'x-company-id: <your-company-id>' \ --header 'Authorization: <your-api-key>' \ --header 'x-app-id: <your-app-id>' \ --header 'x-api-version: 2023-12-06' \ --header 'Content-Type: application/json' \
tech Add Access to Folder Based on Path - Add access for a user or a group of users to a folder based on the path. Previously, this could only be done using the id.
Set
applyToSubScopeto true if you want to propagate the change to the sub scopes (default is false).Use either the path of the folder you want to update (
folderPath) or the id of the folder (scopeId). If both are provided, the scopeId will take precedence.Example
curl --location --request PATCH '<https://gateway.<your-app>>.unique.app/public/chat/folder/add-access' \ --header 'x-user-id: <your-user-id>' \ --header 'x-company-id: <your-company-id>' \ --header 'Authorization: <your-api-key>' \ --header 'x-app-id: <your-app-id>' \ --header 'x-api-version: 2023-12-06' \ --header 'Content-Type: application/json' \ --data '{ "folderPath": "Company/Clients/Portofolio", # use either folderPath or scopeId "scopeId": "scope_jhsgdf7393bd83ewwer, # use either folderPath or scopeId "scopeAccesses": [ { "entityId": "group_f1pj8i73nbs7c1yl9yjtlwc8", "entityType": "GROUP", "type": "WRITE" } ], "applyToSubScopes": true }'
tech Remove Access from Folder Based on Path - Remove access for a user or a group of users from a folder based on the path. Previously, this could only be done using the id.
Set
applyToSubScopeto true if you want to propagate the change to the sub scopes (default is false).Use either the path of the folder you want to update (
folderPath) or the id of the folder (scopeId). If both are provided, the scopeId will take precedence.Example
curl --location --request PATCH '<https://gateway.<your-app>>.unique.app/public/chat/folder/remove-access' \ --header 'x-user-id: <your-user-id>' \ --header 'x-company-id: <your-company-id>' \ --header 'Authorization: <your-api-key>' \ --header 'x-app-id: <your-app-id>' \ --header 'x-api-version: 2023-12-06' \ --header 'Content-Type: application/json' \ --data '{ "folderPath": "Company/Clients/Portofolio", # use either folderPath or scopeId "scopeId": "scope_jhsgdf7393bd83ewwer, # use either folderPath or scopeId "scopeAccesses": [ { "entityId": "group_f1pj8i73nbs7c1yl9yjtlwc8", "entityType": "GROUP", "type": "WRITE" } ], "applyToSubScopes": true }'
tech Update the Ingestion Config of a Folder Based on Path - Update the ingestion config of a folder based on the path. Previously, this could only be done using the id.
Set
applyToSubScopeto true if you want to propagate the change to the sub scopes (default is false).Use either the path of the folder you want to update (
folderPath) or the id of the folder (scopeId). If both are provided, the scopeId will take precedence.Example
curl --location --request PATCH '<https://gateway.<your-app>>.unique.app/public/folder/ingestion-config' \ --header 'x-user-id: <your-user-id>' \ --header 'x-company-id: <your-company-id>' \ --header 'Authorization: <your-api-key>' \ --header 'x-app-id: <your-app-id>' \ --header 'x-api-version: 2023-12-06' \ --header 'Content-Type: application/json' \ --data '{ "folderPath": "Company/Clients/Portofolio", # use either folderPath or scopeId "scopeId": "scope_jhsgdf7393bd83ewwer, # use either folderPath or scopeId "ingestionConfig": { "chunkMaxTokens": 1000, "chunkMaxTokensOnePager": 500, "chunkMinTokens": 100 }, "applyToSubScopes": true }'
The updates above are also available in the SDK. Check out Unique SDK on PyPI: https://pypi.org/project/unique_sdk/ .
Author |
|
|---|