go-firefly3/docs/UsersApi.md

219 lines
8.0 KiB
Markdown
Raw Normal View History

2024-05-11 14:43:57 +03:00
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteUser**](UsersApi.md#DeleteUser) | **Delete** /v1/users/{id} | Delete a user.
[**GetUser**](UsersApi.md#GetUser) | **Get** /v1/users/{id} | Get a single user.
[**ListUser**](UsersApi.md#ListUser) | **Get** /v1/users | List all users.
[**StoreUser**](UsersApi.md#StoreUser) | **Post** /v1/users | Store a new user
[**UpdateUser**](UsersApi.md#UpdateUser) | **Put** /v1/users/{id} | Update an existing user's information.
# **DeleteUser**
> DeleteUser(ctx, id, optional)
Delete a user.
Delete a user. You cannot delete the user you're authenticated with. This cannot be undone. Be careful!
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The user ID. |
**optional** | ***UsersApiDeleteUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a UsersApiDeleteUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### 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)
# **GetUser**
> UserSingle GetUser(ctx, id, optional)
Get a single user.
Gets all info of a single user.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The user ID. |
**optional** | ***UsersApiGetUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a UsersApiGetUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**UserSingle**](UserSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, 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)
# **ListUser**
> UserArray ListUser(ctx, optional)
List all users.
List all the users in this instance of Firefly III.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***UsersApiListUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a UsersApiListUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**UserArray**](UserArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, 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)
# **StoreUser**
> UserSingle StoreUser(ctx, body, createdAt, updatedAt, email, blocked, blockedCode, role, optional)
Store a new user
Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the \"forgot password\" function.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**User**](User.md)| JSON array or key=value pairs with the necessary user information. See the model for the exact specifications. |
**createdAt** | **time.Time**| |
**updatedAt** | **time.Time**| |
**email** | **string**| |
**blocked** | **bool**| |
**blockedCode** | [**UserBlockedCodeProperty**](.md)| |
**role** | [**UserRoleProperty**](.md)| |
**optional** | ***UsersApiStoreUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a UsersApiStoreUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**UserSingle**](UserSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+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)
# **UpdateUser**
> UserSingle UpdateUser(ctx, body, createdAt, updatedAt, email, blocked, blockedCode, role, id, optional)
Update an existing user's information.
Update existing user.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**User**](User.md)| JSON array with updated user information. See the model for the exact specifications. |
**createdAt** | **time.Time**| |
**updatedAt** | **time.Time**| |
**email** | **string**| |
**blocked** | **bool**| |
**blockedCode** | [**UserBlockedCodeProperty**](.md)| |
**role** | [**UserRoleProperty**](.md)| |
**id** | **string**| The user ID. |
**optional** | ***UsersApiUpdateUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a UsersApiUpdateUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**UserSingle**](UserSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, 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)