windmill-api 1.732.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
# \DraftApi

All URIs are relative to */api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_draft_for_user**]DraftApi.md#get_draft_for_user | **GET** /w/{workspace}/drafts/get/{kind}/{path} | fetch a single draft's content by workspace username (or the legacy workspace-level row)
[**get_own_draft**]DraftApi.md#get_own_draft | **GET** /w/{workspace}/drafts/get_own/{kind}/{path} | fetch the current user's own draft content at a path (any kind)
[**list_drafts**]DraftApi.md#list_drafts | **GET** /w/{workspace}/drafts/list | list every draft the current user has in this workspace, across all kinds
[**migrate_legacy_draft**]DraftApi.md#migrate_legacy_draft | **POST** /w/{workspace}/drafts/migrate_legacy/{kind}/{path} | resolve a legacy (workspace-level) draft (admin only)
[**update_draft**]DraftApi.md#update_draft | **POST** /w/{workspace}/drafts/update/{kind}/{path} | upsert (or clear) the current user's draft at a path



## get_draft_for_user

> models::GetDraftForUser200Response get_draft_for_user(workspace, kind, path, username)
fetch a single draft's content by workspace username (or the legacy workspace-level row)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**kind** | [**UserDraftItemKind**].md |  | [required] |
**path** | **String** |  | [required] |
**username** | Option<**String**> | Workspace username of the draft owner. Omit to fetch the legacy workspace-level (NULL email) row. |  |

### Return type

[**models::GetDraftForUser200Response**](getDraftForUser_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)


## get_own_draft

> models::GetOwnDraft200Response get_own_draft(workspace, kind, path)
fetch the current user's own draft content at a path (any kind)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**kind** | [**UserDraftItemKind**].md |  | [required] |
**path** | **String** |  | [required] |

### Return type

[**models::GetOwnDraft200Response**](getOwnDraft_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)


## list_drafts

> Vec<models::ListDrafts200ResponseInner> list_drafts(workspace, all_users)
list every draft the current user has in this workspace, across all kinds

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**all_users** | Option<**bool**> | List every draft in the workspace (all users), not just the current user's own + legacy rows. Other users' rows come back with `mine=false` (view-only). |  |

### Return type

[**Vec<models::ListDrafts200ResponseInner>**](listDrafts_200_response_inner.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)


## migrate_legacy_draft

> String migrate_legacy_draft(workspace, kind, path, migrate_legacy_draft_request)
resolve a legacy (workspace-level) draft (admin only)

Delete a legacy draft (email NULL) or assign it to the authed admin as a per-user draft. Workspace admins / superadmins only.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**kind** | [**UserDraftItemKind**].md |  | [required] |
**path** | **String** |  | [required] |
**migrate_legacy_draft_request** | [**MigrateLegacyDraftRequest**]MigrateLegacyDraftRequest.md |  | [required] |

### Return type

**String**

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: text/plain

[[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)


## update_draft

> models::UpdateDraft200Response update_draft(workspace, kind, path, update_draft_request)
upsert (or clear) the current user's draft at a path

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**kind** | [**UserDraftItemKind**].md |  | [required] |
**path** | **String** |  | [required] |
**update_draft_request** | [**UpdateDraftRequest**]UpdateDraftRequest.md |  | [required] |

### Return type

[**models::UpdateDraft200Response**](updateDraft_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)