# GET courses

### URL

```
GET https://training.tapintosafety.com.au/api/v2/courses
```

### Parameters

{% tabs %}
{% tab title="Schema" %}

#### Query Parameters

<table><thead><tr><th width="176">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>categoryType</code></td><td><code>string</code></td><td>Filter the courses returned by category.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Filter the courses returned by name.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```shell
curl https://training.tapintosafety.com.au/api/v2/courses \
    -G -d "categoryType=safety-training" -d "name=Safety" \
    -H "Authorization: Bearer $APIKey"
```

{% endtab %}
{% endtabs %}

### Responses

{% hint style="success" %}
200 - OK

A list of courses from the database. List may be empty.
{% endhint %}

{% tabs %}
{% tab title="Schema" %}

<table><thead><tr><th width="211">Name</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>entities</code></td><td><code>array</code></td><td>The list of the courses returned.</td></tr><tr><td>┃ <code>id</code></td><td><code>string</code></td><td>The Id of the course. Formatted as a GUID.</td></tr><tr><td>┃ <code>name</code></td><td><code>string</code></td><td>The name of the course.</td></tr><tr><td>┃ <code>passRate</code></td><td><code>integer</code></td><td>The pass rate in percent from 0-100, or null if the organisation has not specified a pass rate.</td></tr><tr><td>┗ <code>categories</code></td><td><code>array</code></td><td>A list of the categories the course belongs to.</td></tr><tr><td>  ┃ <code>type</code></td><td><code>string</code></td><td>The type of the category. Can be used for the categoryType filter.</td></tr><tr><td>  ┗ <code>name</code></td><td><code>string</code></td><td>The display name of the category.</td></tr><tr><td><code>page</code></td><td><code>integer</code></td><td>The current page of results (Starts at 1).</td></tr><tr><td><code>entitiesReturned</code></td><td><code>integer</code></td><td>The number of courses in the <code>entities</code> array.</td></tr><tr><td><code>totalEntities</code></td><td><code>integer</code></td><td>The total <code>entities</code> across all pages for the current parameters.</td></tr><tr><td><code>links</code></td><td><code>array</code></td><td>A list of links relevant to the current request. No links are currently returned with this request.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "entities": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Example Name",
      "passRate": 80,
      "categories": [
        {
          "type": "example-category",
          "name": "Example Category"
        }
      ]
    }
  ],
  "page": 1,
  "entitiesReturned": 1,
  "totalEntities": 1,
  "links": []
}
</code></pre>

{% 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.tistraining.com/api-reference/get-courses.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.
