You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sort options for the folder-contents listing. Superset of the base :class:`PathOrder` columns plus ``STATUS`` (``approval_state``). Kept separate from ``PathOrder`` so the extra columns do not leak onto ``/folders`` or ``/path-parts``, and only apply at depth 1.
4
+
5
+
## Enum
6
+
7
+
*`LOGICAL` (value: `'LOGICAL'`)
8
+
9
+
*`NAME` (value: `'NAME'`)
10
+
11
+
*`UPDATED_AT` (value: `'UPDATED_AT'`)
12
+
13
+
*`CREATED_AT` (value: `'CREATED_AT'`)
14
+
15
+
*`STATUS` (value: `'STATUS'`)
16
+
17
+
*`OWNER` (value: `'OWNER'`)
18
+
19
+
*`TAGS` (value: `'TAGS'`)
20
+
21
+
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
Copy file name to clipboardExpand all lines: sdks/_generated-python/FoldersApi.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,7 @@ Name | Type | Description | Notes
370
370
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
``sort_dir``, ``owner_id``, ``name_like``, the created_at/updated_at range
389
+
filters, and the STATUS/OWNER/TAGS sorts apply to the direct-children
390
+
listing only (``max_depth=1``); combining them with a deeper traversal is a
391
+
400.
392
+
388
393
This is the preferred way to list folder contents when you need document metadata.
389
394
For generic path traversal of folders only, use GET /path-parts.
390
395
@@ -395,9 +400,10 @@ For generic path traversal of folders only, use GET /path-parts.
395
400
396
401
```python
397
402
import ksapi
403
+
from ksapi.models.contents_sort_order import ContentsSortOrder
398
404
from ksapi.models.paginated_response_annotated_union_folder_response_document_response_workflow_definition_response_workflow_run_response_data_source_response_data_source_schema_response_data_source_table_response_api_connection_response_discriminator import PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator
399
-
from ksapi.models.path_order import PathOrder
400
405
from ksapi.models.path_part_approval_state import PathPartApprovalState
406
+
from ksapi.models.sort_direction import SortDirection
401
407
from ksapi.rest import ApiException
402
408
from pprint import pprint
403
409
@@ -429,17 +435,24 @@ with ksapi.ApiClient(configuration) as api_client:
owner_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Filter to items owned by this user (optional)
441
+
name_like ='name_like_example'# str | Case-insensitive substring filter on the item name (optional)
433
442
with_tags =False# bool | Include tag IDs for each item (default: false) (optional) (default to False)
434
443
limit =20# int | Number of items per page (optional) (default to 20)
435
444
offset =0# int | Number of items to skip (optional) (default to 0)
436
445
approval_state = [ksapi.PathPartApprovalState()] # List[PathPartApprovalState] | Keep only items in these approval states (repeatable): not_required, pending, approved. (optional)
437
446
include_tag_ids =None# List[UUID] | Keep only items that carry at least one of these tags on the item itself or any ancestor folder (repeatable, OR / tag inheritance). (optional)
438
447
exclude_tag_ids =None# List[UUID] | Drop items that carry any of these tags on the item itself or any ancestor folder (repeatable). Takes precedence over include_tag_ids. (optional)
448
+
created_after ='2013-10-20T19:20:30+01:00'# datetime | Only items created at or after this timestamp (inclusive) (optional)
449
+
created_before ='2013-10-20T19:20:30+01:00'# datetime | Only items created strictly before this timestamp (optional)
450
+
updated_after ='2013-10-20T19:20:30+01:00'# datetime | Only items updated at or after this timestamp (inclusive) (optional)
451
+
updated_before ='2013-10-20T19:20:30+01:00'# datetime | Only items updated strictly before this timestamp (optional)
**owner_id** | **UUID**| Filter to items owned by this user | [optional]
474
+
**name_like** | **str**| Case-insensitive substring filter on the item name | [optional]
459
475
**with_tags** | **bool**| Include tag IDs for each item (default: false) | [optional][default to False]
460
476
**limit** | **int**| Number of items per page | [optional][default to 20]
461
477
**offset** | **int**| Number of items to skip | [optional][default to 0]
462
478
**approval_state** | [**List[PathPartApprovalState]**](PathPartApprovalState.md)| Keep only items in these approval states (repeatable): not_required, pending, approved. | [optional]
463
479
**include_tag_ids** | [**List[UUID]**](UUID.md)| Keep only items that carry at least one of these tags on the item itself or any ancestor folder (repeatable, OR / tag inheritance). | [optional]
464
480
**exclude_tag_ids** | [**List[UUID]**](UUID.md)| Drop items that carry any of these tags on the item itself or any ancestor folder (repeatable). Takes precedence over include_tag_ids. | [optional]
481
+
**created_after** | **datetime**| Only items created at or after this timestamp (inclusive) | [optional]
482
+
**created_before** | **datetime**| Only items created strictly before this timestamp | [optional]
483
+
**updated_after** | **datetime**| Only items updated at or after this timestamp (inclusive) | [optional]
484
+
**updated_before** | **datetime**| Only items updated strictly before this timestamp | [optional]
Sort options for the folder-contents listing. Superset of the base :class:`PathOrder` columns plus ``STATUS`` (``approval_state``). Kept separate from ``PathOrder`` so the extra columns do not leak onto ``/folders`` or ``/path-parts``, and only apply at depth 1.
List all contents (folders and documents) under a folder. Returns a discriminated union of FolderResponse and DocumentResponse items, distinguished by the `part_type` field (\"FOLDER\" or \"DOCUMENT\"). When with_tags=true, each item includes a tags field with the full tag objects. ``approval_state`` / ``include_tag_ids`` / ``exclude_tag_ids`` filter the result at the path_part layer: approval state on the item, tags matched by self-or-ancestor inheritance (include = OR, exclude wins). This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
328
+
List all contents (folders and documents) under a folder. Returns a discriminated union of FolderResponse and DocumentResponse items, distinguished by the `part_type` field (\"FOLDER\" or \"DOCUMENT\"). When with_tags=true, each item includes a tags field with the full tag objects. ``approval_state`` / ``include_tag_ids`` / ``exclude_tag_ids`` filter the result at the path_part layer: approval state on the item, tags matched by self-or-ancestor inheritance (include = OR, exclude wins). ``sort_dir``, ``owner_id``, ``name_like``, the created_at/updated_at range filters, and the STATUS/OWNER/TAGS sorts apply to the direct-children listing only (``max_depth=1``); combining them with a deeper traversal is a 400. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
329
329
330
330
### Example
331
331
@@ -351,8 +351,14 @@ async function example() {
351
351
folderId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
352
352
// number | Maximum depth to traverse (1=direct children, default: 1) (optional)
353
353
maxDepth: 56,
354
-
//PathOrder | Sort order for results (default: LOGICAL) (optional)
354
+
//ContentsSortOrder | Sort order for results (default: LOGICAL) (optional)
// string | Filter to items owned by this user (optional)
359
+
ownerId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
360
+
// string | Case-insensitive substring filter on the item name (optional)
361
+
nameLike: nameLike_example,
356
362
// boolean | Include tag IDs for each item (default: false) (optional)
357
363
withTags: true,
358
364
// number | Number of items per page (optional)
@@ -365,6 +371,14 @@ async function example() {
365
371
includeTagIds: ...,
366
372
// Array<string> | Drop items that carry any of these tags on the item itself or any ancestor folder (repeatable). Takes precedence over include_tag_ids. (optional)
367
373
excludeTagIds: ...,
374
+
// Date | Only items created at or after this timestamp (inclusive) (optional)
375
+
createdAfter: 2013-10-20T19:20:30+01:00,
376
+
// Date | Only items created strictly before this timestamp (optional)
377
+
createdBefore: 2013-10-20T19:20:30+01:00,
378
+
// Date | Only items updated at or after this timestamp (inclusive) (optional)
379
+
updatedAfter: 2013-10-20T19:20:30+01:00,
380
+
// Date | Only items updated strictly before this timestamp (optional)
|**folderId**|`string`||[Defaults to `undefined`]|
388
402
|**maxDepth**|`number`| Maximum depth to traverse (1=direct children, default: 1) |[Optional][Defaults to `1`]|
389
-
|**sortOrder**|`PathOrder`| Sort order for results (default: LOGICAL) |[Optional][Defaults to `undefined`][Enum: LOGICAL, NAME, UPDATED_AT, CREATED_AT]|
403
+
|**sortOrder**|`ContentsSortOrder`| Sort order for results (default: LOGICAL) |[Optional][Defaults to `undefined`][Enum: LOGICAL, NAME, UPDATED_AT, CREATED_AT, STATUS, OWNER, TAGS]|
404
+
|**sortDir**|`SortDirection`| Sort direction; overrides the column\'s natural default |[Optional][Defaults to `undefined`][Enum: ASC, DESC]|
405
+
|**ownerId**|`string`| Filter to items owned by this user |[Optional][Defaults to `undefined`]|
406
+
|**nameLike**|`string`| Case-insensitive substring filter on the item name |[Optional][Defaults to `undefined`]|
390
407
|**withTags**|`boolean`| Include tag IDs for each item (default: false) |[Optional][Defaults to `false`]|
391
408
|**limit**|`number`| Number of items per page |[Optional][Defaults to `20`]|
392
409
|**offset**|`number`| Number of items to skip |[Optional][Defaults to `0`]|
393
410
|**approvalState**|`Array<PathPartApprovalState>`| Keep only items in these approval states (repeatable): not_required, pending, approved. |[Optional]|
394
411
|**includeTagIds**|`Array<string>`| Keep only items that carry at least one of these tags on the item itself or any ancestor folder (repeatable, OR / tag inheritance). |[Optional]|
395
412
|**excludeTagIds**|`Array<string>`| Drop items that carry any of these tags on the item itself or any ancestor folder (repeatable). Takes precedence over include_tag_ids. |[Optional]|
413
+
|**createdAfter**|`Date`| Only items created at or after this timestamp (inclusive) |[Optional][Defaults to `undefined`]|
414
+
|**createdBefore**|`Date`| Only items created strictly before this timestamp |[Optional][Defaults to `undefined`]|
415
+
|**updatedAfter**|`Date`| Only items updated at or after this timestamp (inclusive) |[Optional][Defaults to `undefined`]|
416
+
|**updatedBefore**|`Date`| Only items updated strictly before this timestamp |[Optional][Defaults to `undefined`]|
0 commit comments