All URIs are relative to http://localhost:7072/api
Method | HTTP request | Description |
---|---|---|
HttpSavedSearchesGetAll | GET /savedsearches |
List<SavedSearch> HttpSavedSearchesGetAll (bool? external = null, bool? translations = null, string acceptLanguage = null)
This endpoint lists all saved searches in database.
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpSavedSearchesGetAllExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost:7072/api";
// Configure API key authorization: function_key
config.AddApiKey("x-functions-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-functions-key", "Bearer");
var apiInstance = new PublicSavedSearchApi(config);
var external = true; // bool? | This parameter filters out all saved searches on basis this boolean. (optional)
var translations = true; // bool? | When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header) (optional)
var acceptLanguage = "acceptLanguage_example"; // string | The requested language of the response. If not matching it falls back to default language. (optional)
try
{
List<SavedSearch> result = apiInstance.HttpSavedSearchesGetAll(external, translations, acceptLanguage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicSavedSearchApi.HttpSavedSearchesGetAll: " + 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
{
ApiResponse<List<SavedSearch>> response = apiInstance.HttpSavedSearchesGetAllWithHttpInfo(external, translations, acceptLanguage);
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 PublicSavedSearchApi.HttpSavedSearchesGetAllWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
external | bool? | This parameter filters out all saved searches on basis this boolean. | [optional] |
translations | bool? | When default language should be returned and the translation dictionary is delivered. (Ignores the "Accept-Language" header) | [optional] |
acceptLanguage | string | The requested language of the response. If not matching it falls back to default language. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns all saved searches in database. | - |
401 | Unauthorized. API Key not provided. | - |
500 | Internal server error. Please contact administrator. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]