Folders¶
API¶
Infisical Folders Resource API.
FoldersV1
¶
Bases: InfisicalAPI
Infisical Folders v1 API Resource.
Attributes:
| Name | Type | Description |
|---|---|---|
base_uri |
str
|
|
Source code in src/infisical/resources/folders/api.py
__init__
¶
Initialize the Infisical Folders Resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
SyncOrAsyncClient
|
An initialized InfisicalClient or InfisicalAsyncClient. |
required |
Source code in src/infisical/resources/folders/api.py
create
¶
create(request: CreateFolderRequest) -> Folder
Create a new folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateFolderRequest
|
The request object containing folder details. |
required |
Source code in src/infisical/resources/folders/api.py
delete
¶
delete(request: DeleteFolderRequest) -> Folder
Delete a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DeleteFolderRequest
|
The request object containing folder ID or name. |
required |
Source code in src/infisical/resources/folders/api.py
get_by_id
¶
Get a folder by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_id
|
str
|
The ID of the folder to retrieve. |
required |
Source code in src/infisical/resources/folders/api.py
list
¶
list(**params: Unpack[ListFoldersQueryParams]) -> FoldersList
List all folders.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**params
|
ListFoldersQueryParams
|
Optional query parameters for filtering the folder list. |
{}
|
Source code in src/infisical/resources/folders/api.py
update
¶
update(request: UpdateFolderRequest) -> Folder
Update a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
UpdateFolderRequest
|
The request object containing folder ID and update details. |
required |
Source code in src/infisical/resources/folders/api.py
Folders
¶
Infisical Folders Resource.
Attributes:
| Name | Type | Description |
|---|---|---|
v1 |
FoldersV1
|
The v1 API resource for folders. |
Source code in src/infisical/resources/folders/api.py
__init__
¶
Initialize the Infisical Folders Resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
SyncOrAsyncClient
|
An initialized InfisicalClient or InfisicalAsyncClient. |
required |
Source code in src/infisical/resources/folders/api.py
Models¶
Infisical Folders Resource Models.
ListFoldersQueryParams
¶
Bases: TypedDict
Query parameters for listing secrets.
Thesre are the optional query parameters for the list secrets API.
Other Parameters:
| Name | Type | Description |
|---|---|---|
path |
str
|
The path to the folder. |
recursive |
bool
|
Whether to list secrets recursively. |
workspaceId |
str
|
The ID of the workspace. |
environment |
str
|
The environment name. |
lastSecretModified |
datetime
|
The last modified date of the secret. |
Source code in src/infisical/resources/folders/models.py
Environment
¶
Bases: BaseModel
Environment model.
Attributes:
| Name | Type | Description |
|---|---|---|
env_id |
str
|
The ID of the environment. |
env_name |
str
|
The name of the environment. |
env_slug |
str
|
The slug of the environment. |
Source code in src/infisical/resources/folders/models.py
Folder
¶
Bases: BaseModel
Folder model.
Attributes:
| Name | Type | Description |
|---|---|---|
created_at |
datetime
|
The creation date of the folder. |
description |
str | None
|
The description of the folder. |
env_id |
str
|
The ID of the environment. |
environment |
Environment | None
|
The environment of the folder. |
folder_id |
str
|
The ID of the folder. |
is_reserved |
bool | None
|
Whether the folder is reserved. |
last_secret_modified |
datetime | None
|
The last modified date of the secret. |
name |
str
|
The name of the folder. |
parent_id |
str | None
|
The ID of the parent folder. |
path |
str | None
|
The path to the folder. |
project_id |
str | None
|
The ID of the project. |
updated_at |
datetime
|
The last updated date of the folder. |
version |
int | None
|
The version of the folder. |
Source code in src/infisical/resources/folders/models.py
FoldersList
¶
CreateFolderRequest
¶
Bases: InfisicalResourceRequest
Create Folder Request Model.
Attributes:
| Name | Type | Description |
|---|---|---|
description |
str | None
|
The description of the folder. |
name |
str
|
The name of the folder. |
path |
str
|
The path to the folder. |
Source code in src/infisical/resources/folders/models.py
DeleteFolderRequest
¶
Bases: InfisicalResourceRequest
Delete Folder request model.
The following are required when creating a new request:
- `folder_id_or_name`: The ID or name of the folder to delete.
- `workspace_id`: The ID of the workspace.
- `environment`: The environment name.
Attributes:
| Name | Type | Description |
|---|---|---|
folder_id_or_name |
str
|
The ID or name of the folder to delete. |
path |
str
|
The path to the folder. |
workspace_id |
str
|
The ID of the workspace. |
environment |
str
|
The environment name. |
Source code in src/infisical/resources/folders/models.py
UpdateFolderRequest
¶
Bases: InfisicalResourceRequest
Update Folder request model.
The following are required when creating a new request:
- `folder_id`: The ID or name of the folder to delete.
- `workspace_id`: The ID of the workspace.
- `environment`: The environment name.
Attributes:
| Name | Type | Description |
|---|---|---|
description |
str | None
|
The description of the folder. |
folder_id |
str
|
The ID of the folder to update. |
name |
str | None
|
The name of the folder. |
path |
str
|
The path to the folder. |
workspace_id |
str
|
The ID of the workspace. |
environment |
str
|
The environment name. |