> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/databases/mongodb/templates/get-templates.md).

# Get Templates

Retrieves a list of valid templates. These templates can be used to create MongoDB clusters; they contain properties, such as number of cores, RAM, and the storage size.

```json
{"openapi":"3.0.3","info":{"title":"IONOS DBaaS MongoDB REST API","version":"1.0.0"},"tags":[{"name":"Templates","description":"Templates define a list of 'CUBE' compute resources to be used by Business Edition database clusters."}],"servers":[{"url":"https://api.ionos.com/databases/mongodb","description":"Production"}],"security":[{"basicAuth":[]},{"tokenAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"For 'Basic' authentication, take your credentials by first combining the username and password with a colon (``username:password``) and then encoding the resulting string in base64 (``YWxhZGRpbjpvcGVuc2VzYW1l``).\n\n**Example Request Header**\n\n``Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl``\n\nMore details: https://en.wikipedia.org/wiki/Basic_access_authentication\n"},"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization is granted when a valid proof of identity is provided along with an API request for data. This proof of identity is in the form of a JSON web access token, a unique string that identifies a user.\n\n**Example Request Header**\n\n``Authorization: Bearer ACCESS_TOKEN``\n"}},"parameters":{"PaginationLimit":{"name":"limit","in":"query","description":"The maximum number of elements to return. Use together with 'offset' for pagination.","required":false,"schema":{"type":"integer","default":100,"maximum":1000,"minimum":1}},"PaginationOffset":{"name":"offset","in":"query","description":"The first element to return. Use together with 'limit' for pagination.","required":false,"schema":{"type":"integer","default":0}}},"schemas":{"TemplateList":{"description":"List of MongoDB templates.","allOf":[{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ResourceType"},"id":{"$ref":"#/components/schemas/ResourceId"},"items":{"type":"array","items":{"$ref":"#/components/schemas/TemplateResponse"}}}},{"$ref":"#/components/schemas/DeprecatedPagination"}],"type":"object"},"ResourceType":{"description":"The resource type.","type":"string","enum":["collection","cluster","user","snapshot","template"]},"ResourceId":{"type":"string","description":"The unique ID of the resource."},"TemplateResponse":{"description":"A MongoDB template.","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ResourceType"}]},"id":{"$ref":"#/components/schemas/ResourceId"},"metadata":{"$ref":"#/components/schemas/Metadata"},"properties":{"$ref":"#/components/schemas/TemplateProperties"}},"type":"object"},"Metadata":{"description":"The metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The date the resource was created."},"createdBy":{"type":"string","description":"The user who created the resource."},"createdByUserId":{"type":"string","description":"The ID of the user who created the resource."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date the resource was last modified."},"lastModifiedBy":{"type":"string","description":"The last user who modified the resource."},"lastModifiedByUserId":{"type":"string","description":"The ID of the user who last modified the resource."},"state":{"$ref":"#/components/schemas/State"},"health":{"$ref":"#/components/schemas/Health"}}},"State":{"description":"The current status reported by the cluster.\n* **AVAILABLE** Resources for this cluster exist and are healthy.\n* **BUSY** Resources for this cluster are being created or updated.\n* **DESTROYING** Delete cluster command was issued, the cluster is being deleted.\n* **FAILED** Failed to get the cluster status.\n* **UNKNOWN** The state is unknown.\n* **UPGRADING** The cluster is upgrading to a different edition.\n","type":"string","enum":["AVAILABLE","BUSY","DESTROYING","FAILED","UNKNOWN","UPGRADING"]},"Health":{"description":"The current health status reported by the cluster.\n* **HEALTHY** Primary exists and number of replicas is equal to specified.\n* **UNHEALTHY** Primary does not exist or cluster doesn't have majority.\n* **DEGRADED** Primary exists and number of replicas is less than specified.\n* **UNKNOWN** The health status is unknown.\n","type":"string","enum":["HEALTHY","UNHEALTHY","DEGRADED","UNKNOWN"]},"TemplateProperties":{"description":"The properties of a MongoDB template.","properties":{"name":{"type":"string","description":"The name of the template."},"edition":{"type":"string","description":"The edition of the template (e.g. enterprise)"},"cores":{"type":"integer","description":"The number of CPU cores."},"ram":{"type":"integer","description":"The amount of memory in MB."},"storageSize":{"type":"integer","description":"The amount of storage size in GB."}}},"DeprecatedPagination":{"description":"Pagination information in list responses. DEPRECATED because of misspelled _links attribute.","type":"object","properties":{"offset":{"$ref":"#/components/schemas/PaginationOffset"},"limit":{"$ref":"#/components/schemas/PaginationLimit"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"PaginationOffset":{"description":"The offset specified in the request (if none was specified, the default\noffset is 0).\n","type":"integer","minimum":0,"default":0},"PaginationLimit":{"description":"The limit specified in the request (if none was specified, the default\nlimit is 100).\n","type":"integer","minimum":0,"default":100,"maximum":1000},"PaginationLinks":{"description":"The URLs to navigate the different pages.\n","type":"object","properties":{"prev":{"description":"The URL (with offset and limit parameters) of the previous page; only\npresent if the offset is greater than 0.\n","type":"string","format":"uri","readOnly":true},"self":{"description":"The URL (with offset and limit parameters) of the current page.\n","type":"string","format":"uri","readOnly":true},"next":{"description":"The URL (with offset and limit parameters) of the next page; only\npresent if the offset and limit is less than the total number of elements.\n","type":"string","format":"uri","readOnly":true}}},"ErrorResponse":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"type":"object"},"ErrorMessage":{"properties":{"errorCode":{"type":"string","description":"Application internal error code.\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}},"type":"object"}},"responses":{"ApiError":{"description":"Any erroneous status code: 400 (parse error), 401 (authorization error),\n402 (trial access), 403 (insufficient permissions), 404 (not found),\n405 (unsupported HTTP method), 415 (unsupported content type),\n422 (validation error), 429 (request rate limit exceeded),\n500 (server error), 503 (maintenance)\n","headers":{"Content-Type":{"description":"The content type of the response.","schema":{"type":"string","default":"application/problem+json"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/templates":{"get":{"operationId":"templatesGet","summary":"Get Templates","description":"Retrieves a list of valid templates. These templates can be used to create MongoDB clusters; they contain properties, such as number of cores, RAM, and the storage size.\n","tags":["Templates"],"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationOffset"}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/api-reference/databases/mongodb/templates/get-templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
