# Models

A model refers to a blueprint or definition that outlines the structure and constraints of a data model. It provides a set of rules and specifications for how data should be organised and stored within a system.

There are 3 types of Models in Cosmocloud right now -

## Database collection model

These define and mirror the database collections (tables / entities) in the system. The name of these models should be exactly the same as the underlying Database collection.

{% hint style="info" %}
You can check the `database model` naming convention [here](https://www.mongodb.com/docs/manual/reference/limits/#mongodb-limit-Restriction-on-Collection-Names). You can easily define these as strings containing \[a-zA-Z0-9\_] characters and ***cannot*** begin with numbers or underscore.
{% endhint %}

## Query params model

Query param models, are structures or schemas that define the expected format and data types of query parameters used in API calls. They serve as a set of rules that guide how query parameters should be constructed and what types of values they should hold when making requests to an API.

## Request body model

A "Request Body Model" is a structured definition that outlines the format, structure, and data types expected in the payload of an HTTP request made to an API endpoint. It serves as a blueprint for using HTTP methods like POST, PUT, PATCH, and DELETE. Unlike GET requests that retrieve data, these methods involve sending data to the server for processing .

{% hint style="warning" %}
Request Body has an option set as \`extra\_fields=forbid\` which makes your request bodies strict. Any extra field passed while calling the API, would lead to 400 Bad Request with appropriate error message.
{% endhint %}


---

# 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.cosmocloud.io/resources/models.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.
