LogoLogo
👋 Get in touch⭐️ GitHub
  • Welcome
  • Getting Started
    • Why Superlinked?
    • Setup Superlinked
    • Basic Building Blocks
  • Run in Production
    • Overview
    • Setup Superlinked Server
      • Configuring your app
      • Interacting with app via API
    • Supported Vector Databases
      • Redis
      • Mongo DB
      • Qdrant
  • Concepts
    • Overview
    • Combining Multiple Embeddings for Better Retrieval Outcomes
    • Dynamic Parameters/Query Time weights
  • Reference
    • Overview
    • Changelog
    • Components
      • Dag
        • Period Time
      • Parser
        • Json Parser
        • Dataframe Parser
        • Data Parser
      • Schema
        • Id Schema Object
        • Schema Object
        • Schema
        • Event Schema Object
        • Event Schema
      • App
        • App
        • Interactive
          • Interactive App
        • Online
          • Online App
        • Rest
          • Rest App
        • In Memory
          • In Memory App
      • Space
        • Custom Space
        • Exception
        • Has Space Field Set
        • Number Space
        • Image Space Field Set
        • Text Similarity Space
        • Input Aggregation Mode
        • Image Space
        • Recency Space
        • Space Field Set
        • Categorical Similarity Space
        • Space
      • Executor
        • Exception
        • Executor
        • Interactive
          • Interactive Executor
        • Rest
          • Rest Descriptor
          • Rest Handler
          • Rest Executor
          • Rest Configuration
        • In Memory
          • In Memory Executor
        • Query
          • Query Executor
      • Registry
        • Superlinked Registry
        • Exception
      • Storage
        • Mongo Db Vector Database
        • Vector Database
        • Redis Vector Database
        • In Memory Vector Database
        • Qdrant Vector Database
      • Index
        • Effect
        • Index
        • Util
          • Aggregation Node Util
          • Event Aggregation Node Util
          • Event Aggregation Effect Group
          • Effect With Referenced Schema Object
          • Aggregation Effect Group
      • Source
        • Data Loader Source
        • Interactive Source
        • Types
        • In Memory Source
        • Source
        • Rest Source
      • Query
        • Param
        • Typed Param
        • Query
        • Query Weighting
        • Query Descriptor
        • Nlq Param Evaluator
        • Space Weight Param Info
        • Query Param Information
        • Query Filters
        • Nlq Pydantic Model Builder
        • Clause Params
        • Param Evaluator
        • Query Mixin
        • Query Param Value Setter
        • Query Filter Validator
        • Natural Language Query Param Handler
        • Query Filter Information
        • Query Vector Factory
        • Query Clause
        • Result
        • Query Result Converter
          • Default Query Result Converter
          • Query Result Converter
          • Serializable Query Result Converter
        • Predicate
          • Binary Op
          • Query Predicate
          • Binary Predicate
        • Query Clause
          • Similar Filter Clause
          • Overriden Now Clause
          • Looks Like Filter Clause
          • Space Weight Map
          • Nlq System Prompt Clause
          • Nlq Clause
          • Radius Clause
          • Weight By Space Clause
          • Base Looks Like Filter Clause
          • Limit Clause
          • Select Clause
          • Looks Like Filter Clause Weights By Space
          • Single Value Param Query Clause
          • Hard Filter Clause
          • Query Clause
        • Nlq
          • Nlq Compatible Clause Handler
          • Exception
          • Nlq Clause Collector
          • Nlq Handler
          • Suggestion
            • Query Suggestion Model
            • Query Suggestions Prompt Builder
          • Param Filler
            • Query Param Model Validator
            • Query Param Model Validator Info
            • Query Param Model Builder
            • Query Param Prompt Builder
            • Nlq Annotation
            • Templates
  • Recipes
    • Overview
    • Multi-Modal Semantic Search
      • Hotel Search
    • Recommendation System
      • E-Commerce RecSys
  • Tutorials
    • Overview
    • Semantic Search - News
    • Semantic Search - Movies
    • Semantic Search - Product Images & Descriptions
    • RecSys - Ecommerce
    • RAG - HR
    • Analytics - User Acquisition
    • Analytics - Keyword Expansion
  • Help & FAQ
    • Logging
    • Support
    • Discussion
  • Policies
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page
  • Ingest an entry
  • Query your system
  • Load data from file(s)
  • See available data loaders
  • Trigger the data load

Was this helpful?

Edit on GitHub
  1. Run in Production
  2. Setup Superlinked Server

Interacting with app via API

Once you have your application up and running, you can start loading data and querying the API. Here's a step-by-step guide on how to do it:

Ingest an entry

  1. Data Ingestion: You can test data ingestion by making a POST request to the /api/v1/ingest/your_schema endpoint. Here's an example using curl:

    curl -X POST \
        'http://localhost:8080/api/v1/ingest/your_schema' \
        --header 'Accept: */*' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "id": "your_id",
            ...
        }'

    Note: The current example will not work, please change the request body as your schema requires it.

Query your system

  1. Query the API: After ingesting data, you can query the API by making a POST request to the /api/v1/search/query endpoint. Here's an example using curl:

    curl -X POST \
        'http://localhost:8080/api/v1/search/query' \
        --header 'Accept: */*' \
        --header 'Content-Type: application/json' \
        --header 'x-include-metadata: true' \
        --data-raw '{
            "query_text": "your_search_text"
        }'

    Note: The x-include-metadata: true header will include additional debug information about your query, such as search vector, weights and evaluated NLQ outputs.

Load data from file(s)

See available data loaders

To see what data loaders are available, send a request to the endpoint below:

curl 'http://localhost:8080/data-loader/'

Successful response (200 OK):

{
    "result": [
        "<NAME_OF_YOUR_DATA_LOADER>": "DataLoaderConfig(path='https://path-to-your-file.csv', format=<DataFormat.CSV: 2>, name=None, pandas_read_kwargs='{sep: ;}')"
    ]
}

Trigger the data load

To initiate the data load, invoke its endpoint. This will spawn an asynchronous task DataLoaderSource by its name as defined in your api.py. To trigger the endpoint, simply send a request with curl as shown below. The response should be 202 Accepted. If the name you provided is not found in the system, a 404 NOT FOUND will be returned. See the logs to check the result of that task.

curl -X POST 'http://localhost:8080/data-loader/<NAME_OF_YOUR_DATA_LOADER>/run'

Successful response (200 OK):

{
    "result": "Background task successfully started with name: <NAME_OF_YOUR_DATA_LOADER>",
}
PreviousConfiguring your appNextSupported Vector Databases

Last updated 4 months ago

Was this helpful?

The keys are the available data loader names that you can use for the rest of the data loader endpoints below. To see how these names are constructed and can be altered, read the .

docs here