# Examples of Neurelo Auto-Generated REST API endpoints

### Overview

Neurelo auto-generates a rich set of REST API endpoints from your schema for the project.

The API endpoints comprise of -

1. <mark style="color:green;">**GET**</mark> method endpoints to retrieve data
2. <mark style="color:blue;">**POST**</mark> method endpoints to add new data
3. <mark style="color:purple;">**PATCH**</mark> method endpoints to update data
4. <mark style="color:red;">**DELETE**</mark> method endpoints to delete data

{% hint style="info" %}
These endpoints support a rich set of filters, aggregation, sorting, pagination and other operations.
{% endhint %}

{% hint style="info" %}
These endpoints allow you to take action on a single object or across multiple objects in a single call, using any specified references between them (e.g. relationships, embedded documents).
{% endhint %}

The endpoints are reachable at **https\://$ENV\_API\_URL/rest/**

* **$ENV\_API\_URL** can be retrieved from the Neurelo environment in the project you want to use. This path will be different depending on the region where the runners for your environment have been instantiated.
* You will need an api key to use these endpoints.
  * API Keys can be generated within the settings of your Neurelo Environment.
  * An api key needs to be provided in the **X-API-KEY** header for your HTTPs calls and will look something like this

    ```json
    —header 'X-API-KEY: neurelo_9wAFBp854Z5xFw....q3S4++ktfGmelrcQI='
    ```
* You can download the **OpenAPI spec** for your auto-generated endpoints and a **Postman collection** to get you started from the API documentation page.

## Examples

The following pages cover examples for using the auto-generated REST APIs for 3 different sample schemas -&#x20;

1. [Example 1 - Simple "Posts" application](/neurelo-api-reference-rest/examples-of-neurelo-auto-generated-rest-api-endpoints/example-1-simple-posts-application.md)
2. [Example 2 - "DVD Rentals" application](/neurelo-api-reference-rest/examples-of-neurelo-auto-generated-rest-api-endpoints/example-2-dvd-rentals-application.md)
3. [Example 3 - "Bookstore" application](/neurelo-api-reference-rest/examples-of-neurelo-auto-generated-rest-api-endpoints/example-3-bookstore-application.md)
4. [cURL examples for using the APIs](/neurelo-api-reference-rest/examples-of-neurelo-auto-generated-rest-api-endpoints/curl-api-examples.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neurelo.com/neurelo-api-reference-rest/examples-of-neurelo-auto-generated-rest-api-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
