Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: v4
- SDK version: 5.1.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit https://www.search.io/company/contact
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.13.0 or later
- Json.NET - 12.0.3 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
Generate the DLL using your preferred tool (e.g. dotnet build
)
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Com.Sajari.Sdk.Api;
using Com.Sajari.Sdk.Client;
using Com.Sajari.Sdk.Model;
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using Com.Sajari.Sdk.Api;
using Com.Sajari.Sdk.Client;
using Com.Sajari.Sdk.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.search.io";
// Configure HTTP basic authorization: BasicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new CollectionsApi(config);
var collectionId = "collectionId_example"; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`.
var collection = new Collection(); // Collection | Details of the collection to create.
var accountId = "accountId_example"; // string | The account that owns the collection, e.g. `1618535966441231024`. (optional)
try
{
// Create collection
Collection result = apiInstance.CreateCollection(collectionId, collection, accountId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CollectionsApi.CreateCollection: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://api.search.io
Class | Method | HTTP request | Description |
---|---|---|---|
CollectionsApi | CreateCollection | POST /v4/collections | Create collection |
CollectionsApi | DeleteCollection | DELETE /v4/collections/{collection_id} | Delete collection |
CollectionsApi | Experiment | POST /v4/collections/{collection_id}:experiment | Experiment |
CollectionsApi | GetCollection | GET /v4/collections/{collection_id} | Get collection |
CollectionsApi | ListCollections | GET /v4/collections | List collections |
CollectionsApi | QueryCollection | POST /v4/collections/{collection_id}:query | Query collection |
CollectionsApi | QueryCollection2 | POST /v4/collections/{collection_id}:queryCollection | Query collection |
CollectionsApi | TrackEvent | POST /v4/collections/{collection_id}:trackEvent | Track event |
CollectionsApi | UpdateCollection | PATCH /v4/collections/{collection_id} | Update collection |
EventsApi | SendEvent | POST /v4/events:send | Send event |
EventsApi | SendEvent2 | POST /v4/events:sendEvent | Send event |
PipelinesApi | CreatePipeline | POST /v4/collections/{collection_id}/pipelines | Create pipeline |
PipelinesApi | GeneratePipelines | POST /v4/collections/{collection_id}:generatePipelines | Generate pipelines |
PipelinesApi | GetDefaultPipeline | GET /v4/collections/{collection_id}:getDefaultPipeline | Get default pipeline |
PipelinesApi | GetDefaultVersion | GET /v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion | Get default pipeline version |
PipelinesApi | GetPipeline | GET /v4/collections/{collection_id}/pipelines/{type}/{name}/{version} | Get pipeline |
PipelinesApi | ListPipelines | GET /v4/collections/{collection_id}/pipelines | List pipelines |
PipelinesApi | SetDefaultPipeline | POST /v4/collections/{collection_id}:setDefaultPipeline | Set default pipeline |
PipelinesApi | SetDefaultVersion | POST /v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion | Set default pipeline version |
PromotionsApi | CreatePromotion | POST /v4/collections/{collection_id}/promotions | Create promotion |
PromotionsApi | DeletePromotion | DELETE /v4/collections/{collection_id}/promotions/{promotion_id} | Delete promotion |
PromotionsApi | GetPromotion | GET /v4/collections/{collection_id}/promotions/{promotion_id} | Get promotion |
PromotionsApi | ListPromotions | GET /v4/collections/{collection_id}/promotions | List promotions |
PromotionsApi | UpdatePromotion | PATCH /v4/collections/{collection_id}/promotions/{promotion_id} | Update promotion |
RecordsApi | BatchUpdateRecords | POST /v4/collections/{collection_id}/records:batchUpdate | Batch update records |
RecordsApi | BatchUpsertRecords | POST /v4/collections/{collection_id}/records:batchUpsert | Batch upsert records |
RecordsApi | DeleteRecord | POST /v4/collections/{collection_id}/records:delete | Delete record |
RecordsApi | GetRecord | POST /v4/collections/{collection_id}/records:get | Get record |
RecordsApi | UpdateRecord | POST /v4/collections/{collection_id}/records:update | Update record |
RecordsApi | UpsertRecord | POST /v4/collections/{collection_id}/records:upsert | Upsert record |
RedirectsApi | CreateRedirect | POST /v4/collections/{collection_id}/redirects | Create redirect |
RedirectsApi | DeleteRedirect | DELETE /v4/collections/{collection_id}/redirects/{redirect_id} | Delete redirect |
RedirectsApi | GetRedirect | GET /v4/collections/{collection_id}/redirects/{redirect_id} | Get redirect |
RedirectsApi | ListRedirects | GET /v4/collections/{collection_id}/redirects | List redirects |
RedirectsApi | UpdateRedirect | PATCH /v4/collections/{collection_id}/redirects/{redirect_id} | Update redirect |
SchemaApi | BatchCreateSchemaFields | POST /v4/collections/{collection_id}/schemaFields:batchCreate | Batch create schema fields |
SchemaApi | CreateSchemaField | POST /v4/collections/{collection_id}/schemaFields | Create schema field |
SchemaApi | DeleteSchemaField | DELETE /v4/collections/{collection_id}/schemaFields/{schema_field_name} | Delete schema field |
SchemaApi | ListSchemaFields | GET /v4/collections/{collection_id}/schemaFields | List schema fields |
SchemaApi | UpdateSchemaField | PATCH /v4/collections/{collection_id}/schemaFields/{schema_field_name} | Update schema field |
- Model.ActivePromotion
- Model.Banner
- Model.BatchCreateSchemaFieldsRequest
- Model.BatchCreateSchemaFieldsResponse
- Model.BatchCreateSchemaFieldsResponseError
- Model.BatchUpdateRecordsRequest
- Model.BatchUpdateRecordsResponse
- Model.BatchUpdateRecordsResponseError
- Model.BatchUpdateRecordsResponseRecord
- Model.BatchUpsertRecordsRequest
- Model.BatchUpsertRecordsRequestPipeline
- Model.BatchUpsertRecordsResponse
- Model.BatchUpsertRecordsResponseError
- Model.BatchUpsertRecordsResponseKey
- Model.BatchUpsertRecordsResponseVariables
- Model.Collection
- Model.CollectionType
- Model.DeleteRecordRequest
- Model.Error
- Model.Event
- Model.ExperimentRequest
- Model.ExperimentRequestPipeline
- Model.ExperimentResponse
- Model.GeneratePipelinesRequest
- Model.GeneratePipelinesResponse
- Model.GetCollectionRequestView
- Model.GetDefaultPipelineResponse
- Model.GetDefaultVersionRequestView
- Model.GetPipelineRequestView
- Model.GetRecordRequest
- Model.ListCollectionsRequestView
- Model.ListCollectionsResponse
- Model.ListPipelinesRequestView
- Model.ListPipelinesResponse
- Model.ListPromotionsRequestPromotionView
- Model.ListPromotionsResponse
- Model.ListRedirectsResponse
- Model.ListSchemaFieldsResponse
- Model.PercentileDataPoint
- Model.Pipeline
- Model.PipelineStep
- Model.PipelineStepParamBinding
- Model.PipelineType
- Model.Promotion
- Model.PromotionCategory
- Model.PromotionExclusion
- Model.PromotionFilterBoost
- Model.PromotionFilterCondition
- Model.PromotionPin
- Model.PromotionPinMode
- Model.PromotionRangeBoost
- Model.ProtobufAny
- Model.ProtobufFieldMask
- Model.ProtobufNullValue
- Model.QueryAggregateResult
- Model.QueryAggregateResultAnalysis
- Model.QueryAggregateResultBuckets
- Model.QueryAggregateResultBucketsBucket
- Model.QueryAggregateResultCount
- Model.QueryAggregateResultDate
- Model.QueryAggregateResultMetric
- Model.QueryAggregateResultPercentile
- Model.QueryCollectionRequest
- Model.QueryCollectionRequestPipeline
- Model.QueryCollectionRequestTracking
- Model.QueryCollectionRequestTrackingType
- Model.QueryCollectionResponse
- Model.QueryCollectionResponsePipeline
- Model.QueryResult
- Model.QueryResultToken
- Model.QueryResultTokenClick
- Model.QueryResultTokenPosNeg
- Model.RecordKey
- Model.Redirect
- Model.RedirectResult
- Model.SchemaField
- Model.SchemaFieldMode
- Model.SchemaFieldType
- Model.SendEventRequest
- Model.SetDefaultPipelineRequest
- Model.SetDefaultVersionRequest
- Model.Status
- Model.TextPosition
- Model.UpdateRecordRequest
- Model.UpsertRecordRequest
- Model.UpsertRecordRequestPipeline
- Model.UpsertRecordResponse
- Type: HTTP basic authentication