All URIs are relative to https://demo.firefly-iii.org/api
Method | HTTP request | Description |
---|---|---|
SearchAccounts | GET /v1/search/accounts | Search for accounts |
SearchTransactions | GET /v1/search/transactions | Search for transactions |
AccountArray SearchAccounts (string query, AccountSearchFieldFilter field, Guid? xTraceId = null, int? page = null, AccountTypeFilter? type = null)
Search for accounts
Search for accounts
using System.Collections.Generic;
using System.Diagnostics;
using FireflyIIINet.Api;
using FireflyIIINet.Client;
using FireflyIIINet.Model;
namespace Example
{
public class SearchAccountsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://demo.firefly-iii.org/api";
// Configure OAuth2 access token for authorization: firefly_iii_auth
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new SearchApi(config);
var query = checking; // string | The query you wish to search for.
var field = new AccountSearchFieldFilter(); // AccountSearchFieldFilter | The account field(s) you want to search in.
var xTraceId = "xTraceId_example"; // Guid? | Unique identifier associated with this request. (optional)
var page = 1; // int? | Page number. The default pagination is 50 (optional)
var type = new AccountTypeFilter?(); // AccountTypeFilter? | The type of accounts you wish to limit the search to. (optional)
try
{
// Search for accounts
AccountArray result = apiInstance.SearchAccounts(query, field, xTraceId, page, type);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SearchApi.SearchAccounts: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Search for accounts
ApiResponse<AccountArray> response = apiInstance.SearchAccountsWithHttpInfo(query, field, xTraceId, page, type);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SearchApi.SearchAccountsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
query | string | The query you wish to search for. | |
field | AccountSearchFieldFilter | The account field(s) you want to search in. | |
xTraceId | Guid? | Unique identifier associated with this request. | [optional] |
page | int? | Page number. The default pagination is 50 | [optional] |
type | AccountTypeFilter? | The type of accounts you wish to limit the search to. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/json
Status code | Description | Response headers |
---|---|---|
200 | A list of accounts. | - |
401 | Unauthenticated | - |
404 | Page not found | - |
400 | Bad request | - |
500 | Internal exception | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionArray SearchTransactions (string query, Guid? xTraceId = null, int? page = null)
Search for transactions
Searches through the users transactions.
using System.Collections.Generic;
using System.Diagnostics;
using FireflyIIINet.Api;
using FireflyIIINet.Client;
using FireflyIIINet.Model;
namespace Example
{
public class SearchTransactionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://demo.firefly-iii.org/api";
// Configure OAuth2 access token for authorization: firefly_iii_auth
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new SearchApi(config);
var query = groceries; // string | The query you wish to search for.
var xTraceId = "xTraceId_example"; // Guid? | Unique identifier associated with this request. (optional)
var page = 1; // int? | Page number. The default pagination is 50 (optional)
try
{
// Search for transactions
TransactionArray result = apiInstance.SearchTransactions(query, xTraceId, page);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SearchApi.SearchTransactions: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Search for transactions
ApiResponse<TransactionArray> response = apiInstance.SearchTransactionsWithHttpInfo(query, xTraceId, page);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SearchApi.SearchTransactionsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
query | string | The query you wish to search for. | |
xTraceId | Guid? | Unique identifier associated with this request. | [optional] |
page | int? | Page number. The default pagination is 50 | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/json
Status code | Description | Response headers |
---|---|---|
200 | A list of transactions. | - |
401 | Unauthenticated | - |
404 | Page not found | - |
400 | Bad request | - |
500 | Internal exception | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]