> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/ai-in-umbraco/17.latest/management-api/context-resource-types/get.md).

# Get Resource Type

Retrieve a specific context resource type by its ID, including the full settings schema that defines how resources of this type are configured.

## Endpoint

{% code title="Endpoint" %}

```
GET /umbraco/ai/management/api/v1/context-resource-types/{id}
```

{% endcode %}

## Path Parameters

| Parameter | Type   | Description                  |
| --------- | ------ | ---------------------------- |
| `id`      | string | The resource type identifier |

## Response

### Success (200 OK)

{% code title="Response" %}

```json
{
    "id": "document",
    "name": "Document",
    "description": "Adds content items as context resources.",
    "icon": "icon-document",
    "settingsSchema": {
        "fields": [
            {
                "key": "contentId",
                "label": "Content",
                "description": "The unique identifier of the content item.",
                "editorUiAlias": "Umb.PropertyEditorUi.DocumentPicker",
                "defaultValue": null,
                "sortOrder": 0,
                "isRequired": true
            },
            {
                "key": "includeDescendants",
                "label": "Include Descendants",
                "description": "Whether to include descendant content items.",
                "editorUiAlias": "Umb.PropertyEditorUi.Toggle",
                "defaultValue": false,
                "sortOrder": 1,
                "isRequired": false
            }
        ]
    }
}
```

{% endcode %}

### Properties

| Property         | Type   | Description                                        |
| ---------------- | ------ | -------------------------------------------------- |
| `id`             | string | Unique identifier for the type                     |
| `name`           | string | Display name                                       |
| `description`    | string | Description of the resource type                   |
| `icon`           | string | Icon identifier for the backoffice UI              |
| `settingsSchema` | object | Settings schema (nullable if type has no settings) |

### Settings Schema Field Properties

| Property        | Type    | Description                                       |
| --------------- | ------- | ------------------------------------------------- |
| `key`           | string  | Unique key identifying the setting                |
| `label`         | string  | Display label for the setting                     |
| `description`   | string  | Help text for the setting                         |
| `editorUiAlias` | string  | UI alias of the editor used for the setting       |
| `editorConfig`  | object  | Configuration for the editor                      |
| `defaultValue`  | object  | Default value for the setting                     |
| `sortOrder`     | int     | Sort order of the setting in the UI               |
| `isRequired`    | boolean | Whether the setting must be provided              |
| `group`         | string  | Optional group name for visual grouping in the UI |

### Not Found (404)

Returned when the specified resource type ID does not exist.

{% code title="Response" %}

```json
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "Not Found",
    "status": 404,
    "detail": "Context resource type not found"
}
```

{% endcode %}

## Examples

### Get a Resource Type

{% code title="cURL" %}

```bash
curl -X GET "https://your-site.com/umbraco/ai/management/api/v1/context-resource-types/content" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

{% endcode %}

### JavaScript

{% code title="JavaScript" %}

```javascript
const response = await fetch("/umbraco/ai/management/api/v1/context-resource-types/content", {
    credentials: "include",
});

const resourceType = await response.json();

// Use the settings schema to build a dynamic form
console.log(`Settings schema for ${resourceType.name}:`, resourceType.settingsSchema);
```

{% endcode %}

{% hint style="info" %}
The `settingsSchema` describes the configurable fields for this resource type. Use the `editorUiAlias` on each field to render the appropriate Umbraco backoffice editor.
{% endhint %}


---

# 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.umbraco.com/ai-in-umbraco/17.latest/management-api/context-resource-types/get.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.
