Getting Folder List
Please read the Material Usage Rules on this site.
Description: This method retrieves a list of folders available in the specified workspace. Optionally, it is possible to limit the number of results, specify filters, or define sorting conditions. If no parameters are specified, the method returns the first page of profile folders in the default order.
Request parameters:
| Parameter | Type | Format | Default | Description |
|---|---|---|---|---|
| workspaceId | integer | int64 | -1 | Workspace identifier. -1 means the default workspace. |
| start | integer | int32 | (empty) | Index of the first folder (zero-based). |
| total | integer | int32 | (empty) | Maximum number of folders to retrieve. |
| id | string | uuid | (empty) | Unique folder identifier (optional filter). |
| name | string | (empty) | Folder name (optional filter). | |
| sorting | string | (empty) | Sorting condition: Id, Name, FolderType, Quantity (optional). | |
| location | string | (empty) | Folder location: "Local" or "Cloud". Defaults to null. |
Example request:
GET
CURL:
curl 'http://localhost:8160/v1/profile_folders?workspaceId=-1&start=0&total=1000&id=123e4567-e89b-12d3-a456-426614174000&name=ApiEntity&sorting=name%20ASC&location=Local' \
--header 'Api-Token: YOUR_SECRET_TOKEN'
C#:
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("http://localhost:8160/v1/profile_folders?workspaceId=-1&start=0&total=1000&id=123e4567-e89b-12d3-a456-426614174000&name=ApiEntity&sorting=name%20ASC&location=Local"),
Headers =
{
{ "Api-Token", "YOUR_SECRET_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
Cube:
http://localhost:8160/v1/profile_folders?workspaceId=-1&start=0&total=1000&id=&name=&sorting=&location=

Additionally:
User-Agent: {-Profile.UserAgent-}
Api-Token: Token from UserArea2.

Response API:
| Response code | Result |
|---|---|
200 OK | OK |
401 Unauthorized | Unauthorized |
403 Forbidden | Forbidden |
500 Internal Server Error | Internal Server Error |
Success Response (200 OK):
{
"totalCount": 1,
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Sample Name",
"location": "string",
"quantity": 1
}
]
}
Error Response (500):
{
"message": null
}