GoodMem
ReferenceClient SDKs.NET SDK

Rerankers API

Rerankers API documentation for .NET SDK

All URIs are relative to *http://localhost:8080*

MethodHTTP requestDescription
CreateRerankerPOST /v1/rerankersCreate a new reranker
DeleteRerankerDELETE /v1/rerankers/{id}Delete a reranker
GetRerankerGET /v1/rerankers/{id}Get a reranker by ID
ListRerankersGET /v1/rerankersList rerankers
UpdateRerankerPUT /v1/rerankers/{id}Update a reranker

CreateReranker

RerankerResponse CreateReranker (RerankerCreationRequest rerankerCreationRequest)

Create a new reranker

Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another reranker exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. DEFAULTS: api_path defaults to '/rerank' if omitted; supported_modalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class CreateRerankerExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new RerankersApi(httpClient, config, httpClientHandler);
            var rerankerCreationRequest = new RerankerCreationRequest(); // RerankerCreationRequest | Reranker configuration details

            try
            {
                // Create a new reranker
                RerankerResponse result = apiInstance.CreateReranker(rerankerCreationRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RerankersApi.CreateReranker: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateRerankerWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create a new reranker
    `ApiResponse<RerankerResponse>` response = apiInstance.CreateRerankerWithHttpInfo(rerankerCreationRequest);
    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 RerankersApi.CreateRerankerWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
rerankerCreationRequestRerankerCreationRequestReranker configuration details

Return type

RerankerResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Successfully created reranker with Location header* Location - URL of the created reranker resource
400Invalid request - missing required fields or invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to create rerankers-
409Conflict - reranker already exists with identical owner_id, provider_type, endpoint_url, api_path, model_identifier, and credentials_fingerprint-

↑ Back to .NET SDK

DeleteReranker

void DeleteReranker (string id)

Delete a reranker

Permanently deletes a reranker configuration. This operation cannot be undone and immediately removes the reranker record from the database. SIDE EFFECTS: Invalidates any cached references to this reranker; does not affect historical usage data or audit logs. Requires DELETE_RERANKER_OWN permission for rerankers you own (or DELETE_RERANKER_ANY for admin users). This operation is safe to retry - may return NOT_FOUND if already deleted.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class DeleteRerankerExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new RerankersApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the reranker to delete

            try
            {
                // Delete a reranker
                apiInstance.DeleteReranker(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RerankersApi.DeleteReranker: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DeleteRerankerWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete a reranker
    apiInstance.DeleteRerankerWithHttpInfo(id);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RerankersApi.DeleteRerankerWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the reranker to delete

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204Reranker successfully deleted-
400Invalid request - reranker ID in invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to delete this reranker-
404Not found - reranker with the specified ID does not exist-

↑ Back to .NET SDK

GetReranker

RerankerResponse GetReranker (string id)

Get a reranker by ID

Retrieves the details of a specific reranker configuration by its unique identifier. SECURITY NOTE: The credentials field is omitted from the response for security reasons. Requires READ_RERANKER_OWN permission for rerankers you own (or READ_RERANKER_ANY for admin users). This is a read-only operation with no side effects and is safe to retry.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class GetRerankerExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new RerankersApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the reranker to retrieve

            try
            {
                // Get a reranker by ID
                RerankerResponse result = apiInstance.GetReranker(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RerankersApi.GetReranker: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetRerankerWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get a reranker by ID
    `ApiResponse<RerankerResponse>` response = apiInstance.GetRerankerWithHttpInfo(id);
    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 RerankersApi.GetRerankerWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the reranker to retrieve

Return type

RerankerResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved reranker-
400Invalid request - reranker ID in invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to view this reranker-
404Not found - reranker with the specified ID does not exist-

↑ Back to .NET SDK

ListRerankers

ListRerankersResponse ListRerankers (string? ownerId = null, string? providerType = null, string? label = null)

List rerankers

Retrieves a list of reranker configurations accessible to the caller, with optional filtering. IMPORTANT: Pagination is NOT supported - all matching results are returned. Results are ordered by created_at descending. SECURITY NOTE: credentials fields are omitted from all responses. PERMISSION-BASED FILTERING: With LIST_RERANKER_OWN permission, only your own rerankers are shown. With LIST_RERANKER_ANY permission, you can see all rerankers or filter by any owner_id. Specifying owner_id without LIST_RERANKER_ANY permission returns PERMISSION_DENIED.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class ListRerankersExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new RerankersApi(httpClient, config, httpClientHandler);
            var ownerId = 550e8400-e29b-41d4-a716-446655440000;  // string? | Filter rerankers by owner ID. With LIST_RERANKER_ANY permission, omitting this shows all accessible rerankers; providing it filters by that owner. With LIST_RERANKER_OWN permission, only your own rerankers are shown regardless of this parameter (PERMISSION_DENIED if set to another user). (optional) 
            var providerType = TEI;  // string? | Filter rerankers by provider type (e.g., OPENAI, TEI, VLLM, etc.) (optional) 
            var label = ?label.environment=production&label.team=search;  // string? | Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=search) (optional) 

            try
            {
                // List rerankers
                ListRerankersResponse result = apiInstance.ListRerankers(ownerId, providerType, label);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RerankersApi.ListRerankers: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ListRerankersWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List rerankers
    `ApiResponse<ListRerankersResponse>` response = apiInstance.ListRerankersWithHttpInfo(ownerId, providerType, label);
    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 RerankersApi.ListRerankersWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
ownerIdstring?Filter rerankers by owner ID. With LIST_RERANKER_ANY permission, omitting this shows all accessible rerankers; providing it filters by that owner. With LIST_RERANKER_OWN permission, only your own rerankers are shown regardless of this parameter (PERMISSION_DENIED if set to another user).[optional]
providerTypestring?Filter rerankers by provider type (e.g., OPENAI, TEI, VLLM, etc.)[optional]
labelstring?Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=search)[optional]

Return type

ListRerankersResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved rerankers-
400Invalid request - invalid filter parameters or pagination token-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to list rerankers-

↑ Back to .NET SDK

UpdateReranker

RerankerResponse UpdateReranker (string id, UpdateRerankerRequest updateRerankerRequest)

Update a reranker

Updates an existing reranker configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMMUTABLE FIELDS: provider_type and owner_id cannot be changed after creation. SUPPORTED_MODALITIES UPDATE: If the array contains ≥1 elements, it replaces the stored set; if empty or omitted, no change occurs. Returns ALREADY_EXISTS if update would create duplicate with same {endpoint_url, api_path, model_identifier}. Requires UPDATE_RERANKER_OWN permission for rerankers you own (or UPDATE_RERANKER_ANY for admin users). This operation is idempotent.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class UpdateRerankerExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new RerankersApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the reranker to update
            var updateRerankerRequest = new UpdateRerankerRequest(); // UpdateRerankerRequest | Updated reranker configuration details

            try
            {
                // Update a reranker
                RerankerResponse result = apiInstance.UpdateReranker(id, updateRerankerRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RerankersApi.UpdateReranker: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the UpdateRerankerWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update a reranker
    `ApiResponse<RerankerResponse>` response = apiInstance.UpdateRerankerWithHttpInfo(id, updateRerankerRequest);
    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 RerankersApi.UpdateRerankerWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the reranker to update
updateRerankerRequestUpdateRerankerRequestUpdated reranker configuration details

Return type

RerankerResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully updated reranker-
400Invalid request - invalid fields or label strategy conflict-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to update this reranker-
404Not found - reranker with the specified ID does not exist-
409Conflict - update would create duplicate with same endpoint_url, api_path, and model_identifier-

↑ Back to .NET SDK