# /courses/{course}/contacts?type={contact\_type}

{% tabs %}
{% tab title="GET" %}
Return a modified collection based on the query parameter's value.

{% hint style="info" %}
This will return all the contacts of the given course that are of contact type &#x58;*.*
{% endhint %}

{% hint style="warning" %}
On each newly added query parameter, evaluate if it should be structured as a sub-collection in the URI.
{% endhint %}
{% endtab %}

{% tab title="POST" %}
Query parameters are rarely used to modify the newly added resource or change the endpoint's behaviour.

{% hint style="danger" %}
Don't pass query parameters in `POST` requests. Pass data fields as `POST` parameters instead of query parameters.
{% endhint %}

{% hint style="warning" %}
This is very uncommon and usually not recommended.&#x20;
{% endhint %}
{% endtab %}

{% tab title="PUT" %}
Query parameters are rarely used to modify the newly added resource or change the endpoint's behaviour.

{% hint style="info" %}
It should be implied that this would replace the entire subset of contacts that match the query.
{% endhint %}

{% hint style="danger" %}
Don't pass query parameters in `PUT` requests. Pass data fields as `PUT` parameters instead of query parameters.
{% endhint %}

{% hint style="warning" %}
This is uncommon and not recommended.
{% endhint %}
{% endtab %}

{% tab title="PATCH" %}
Query parameters are used to modify the newly added resource or change the endpoint's behaviour.

This would imply modifying a subset of data matching the query.

{% hint style="info" %}
For example, reordering a large dataset of a course's contacts of a specific type (faster than looping PUT requests).
{% endhint %}

{% hint style="warning" %}
This is uncommon and not recommended because it's difficult to interpret what the endpoint is doing based on the URI alone.&#x20;
{% endhint %}
{% endtab %}

{% tab title="DELETE" %}
Deletes all entities that match the query parameter.

{% hint style="info" %}
For example, delete all the contacts of the given course that are of contact type &#x58;*.*
{% endhint %}

{% hint style="warning" %}
Use with care.
{% endhint %}
{% 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.elentra.org/api/elentra-api-standards/routing-and-parameters/example-routing-patterns-with-http-method/courses-course-contacts-type-contact_type.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.
