# API

## Get All Templates

<mark style="color:blue;">`GET`</mark> `https://www.toptal.com/developers/gitignore/api/list?format=:format:`

This endpoint allows you to get free cakes.

#### Query Parameters

| Name   | Type   | Description                                                 |
| ------ | ------ | ----------------------------------------------------------- |
| format | string | The format of the list response `lines` (default) or `json` |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
	"jboss4": {
		"key": "jboss4",
		"name": "JBoss4",
		"contents": "\n### JBoss4 ###\n# gitignore for JBoss v4 projects\n\n\/server\/all\/data\n\/server\/all\/log\n\/server\/all\/tmp\n\/server\/all\/work\n\/server\/default\/data\n\/server\/default\/log\n\/server\/default\/tmp\n\/server\/default\/work\n\/server\/minimal\/data\n\/server\/minimal\/log\n\/server\/minimal\/tmp\n\/server\/minimal\/work\n\n# Note:\n# there may be other directories that contain *.xml.failed or *.war.failed files\n\/server\/default\/deploy\/*.xml.failed\n\/server\/default\/deploy\/*.war.failed\n",
		"fileName": "JBoss4.gitignore"
	},
	"extjs": {
		"key": "extjs",
		"name": "ExtJs",
		"contents": "\n### ExtJs ###\n.architect\nbootstrap.css\nbootstrap.js\nbootstrap.json\nbootstrap.jsonp\nbuild\/\nclassic.json\nclassic.jsonp\next\/\nmodern.json\nmodern.jsonp\nresources\/sass\/.sass-cache\/\nresources\/.arch-internal-preview.css\n.arch-internal-preview.css\n",
		"fileName": "ExtJs.gitignore"
	}
	...
}
```

{% endtab %}
{% endtabs %}


---

# 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.gitignore.io/use/api.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.
