Neurelo Build Docs
Neurelo Build Docs
  • Introduction
    • Core Concepts
    • Key Features
  • Getting Started
    • Sign-in/Sign-up
    • Dashboard
      • Collapsible Sidebar
      • Light/Dark Mode
      • Account Settings
      • Audit Events
      • User Management
        • Permissions (Member v/s Admin)
      • Org Settings
    • Starting your Neurelo Project
      • Quick Start Guide
      • Step 1 - Add a Data Source
      • Step 2 - Build Definitions
      • Step 3 - Create an Environment
      • Step 4 - Create an API Key
      • Step 5 - Start Runners
      • Try your Neurelo APIs
  • "How to" Videos
    • Product Overview
    • Neurelo APIs & SDKs
    • Project Setup
    • Definitions
    • Environments
    • Data Sources
    • Organization Management
    • Creating and Using Custom Queries
    • Using the Schema Builder to build Relationships
    • Mock Data Generation
  • Definitions
    • Neurelo Schema Editor
      • Schema Builder
      • JSON/YAML Editor
      • Schema Visualization: Entity-Relationship Diagram (ERD)
    • Custom APIs for Complex Queries
      • Write and Commit Custom Queries
      • AI-Assisted Query Generation
      • Deploying Custom API Endpoints
      • Using Variables in your Custom Query
    • Branches and Commits
    • API Docs
  • Environments
    • Creating a new Environment
    • API Playground
    • Observability
    • Migrations
    • API Keys
  • Data Sources
    • PostgreSQL
    • MySQL
    • MongoDB
  • Guides
    • Provisioning Cloud Databases for using with Neurelo
      • PostgreSQL
        • AWS RDS (PostgreSQL)
      • MySQL
        • AWS RDS (MySQL)
      • MongoDB Atlas
    • Mock Data Generation
    • Wipe Data Source
    • Remote Git Repository for Definitions
      • Connecting a Remote Git Repo
      • Creating Commits from Neurelo
      • Syncing Branches
    • Data Viewer
    • Environment/Data Source Tags
    • How to work with Embedded documents and References in MongoDB
    • How to download and use the Postman Collection for your Project
    • Building Python applications with Postgres and FastAPI
    • CI Integration using Neurelo CLI
    • Schema Migrations
    • Schema AI Assist
    • Auto-Introspection
    • Access Policies
    • User Auth
      • Google
      • GitHub
      • GitLab
    • MongoDB Atlas - Migrate GraphQL to Neurelo
    • MongoDB Atlas - Migrate REST Data APIs to Neurelo
  • MongoDB Atlas - Migrate REST Data APIs to Neurelo
  • MongoDB Atlas - Migrate GraphQL APIs to Neurelo
  • Neurelo Schema Language (NSL)
    • Example 1 - DVD Rentals
    • Example 2 - Simple "Posts" App
    • Example 3 - Bookstore
  • Neurelo API Reference (REST)
    • Examples of Neurelo Auto-Generated REST API endpoints
      • Example 1 - Simple “Posts” application
      • Example 2 - "DVD Rentals" application
      • Example 3 - "Bookstore” application
      • cURL API Examples
  • Neurelo API Reference (GraphQL)
  • SDKs
    • TypeScript / JavaScript SDK
    • Go SDK
    • Python SDK
      • Python SDK Tutorial -- News Application
        • News Application using Neurelo’s Python SDKs
  • CLI (Preview Version)
  • Self-Hosted Neurelo Gateways
  • Tutorials
    • Building a Real Time Chat Application with Neurelo and MongoDB using Python
    • Building A Financial Terminal with Neurelo and MongoDB in Rust
    • Building a Restaurant Management System with Neurelo and MongoDB using GraphQL in just a few minutes
    • Bringing Neurelo’s Data APIs to Life Instantly with MySQL
  • Project Examples
  • References
    • Supported Databases
    • Supported OS and Browsers
  • Support
Powered by GitBook
On this page
  • Overview
  • Deploying your custom query endpoints with commit:
  • Deploying your custom query endpoints from Environment settings:
  1. Definitions
  2. Custom APIs for Complex Queries

Deploying Custom API Endpoints

PreviousAI-Assisted Query GenerationNextUsing Variables in your Custom Query

Last updated 5 months ago

Overview

Neurelo instantly creates an API end point for every custom query once it is committed in a branch. This custom query API end point can be deployed to one or many environments inside a project. Here is how to use it:

Deploying your custom query endpoints with commit:

  • Create a custom query using AI Assist or manually.

  • Click on "Commit" to save this custom query

  • At the time of the commit, Neurelo offers a choice to deploy this custom query to one or more running environment if there are no schema related migrations needed in the environment.

    • Select environment(s) that you would like to deploy this custom query as part of the commit step. You can always also go into the Environments

    • Your environment should be ready to go. Make sure you have the appropriate environment API Key so you can use it to hit the Custom Query Endpoint

    • You can access this custom query API endpoint at the URL for your Environment

      • For REST, this endpoint can be accessed at ${API_URL_BASE}/custom/<endpointName> (e.g. custom/authorsNumBooks) using the configured HTTP method (GET/POST/PATCH/DELETE) for the endpoint

      • For GraphQL, this endpoint can be accessed with a POST at ${API_URL_BASE}/graphql using custom_<endpointName> (e.g. custom_authorsNumBooks) as the field name in a Query or Mutation operation.

If the "Deploy" option is not offered as part of the commit step (because migrations are needed in the environment) or you want to skip the "Deploy" step here, you can deploy this Commit later from Environment settings option.

Deploying your custom query endpoints from Environment settings:

  • To deploy custom queries in a specific environment, access the specific environment from the left navigation panel under a project

  • You must Stop Runner sfrom the top right side of the page. And once the runners have been stopped, you can select the appropriate Commit of the Definition to be used for the environment from the Commit drop down right next to the Start/Stop Runner button

  • Once the appropriate definition has been selected, click on Start Runner. Runners should start in a few seconds and the new definition would be deployed and be live in that specific environment.

You can test your custom query using any HTTP Client (Postman, Insomnia, or even Curl) and write a request with the following format:

  • REST: GET/POST/PATCH/DELETE ${API_URL_BASE}/custom/<your_custom_query_name>

  • GraphQL: Query or Mutation with custom_<endpointName> as the field name at POST ${API_URL_BASE}/graphQL

Headers needed:

X-API-KEY: Your_Environment_API_KEY

Custom Query Endpoints currently are only supported with API Keys that have both Read and Write permissions. Custom Query endpoints will not work with Read-Only keys and will return a "403 - Forbidden" error.