# List ResourceTemplates

`GET /apis/cra.diagrid.io/v1beta1/resourcetemplates`

List ResourceTemplates visible to you — Diagrid-managed (built-in) templates plus your organization's own. Disabled entries are hidden unless `includeDisabled=true`.

## Request

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `includeDisabled` | boolean | No | When `true`, include catalog entries that the caller's org has disabled — built-in or custom. Disabled entries are returned with `spec.disabled` set to `true` (a disabled built-in also keeps its `spec.source` of `built-in`). Defaults to `false`, which hides disabled entries from the catalog view. |
| `apiVersion` | string | No | Filter the result to ResourceTemplates whose `spec.target.apiVersion` equals this value (for example `dapr.io/v1alpha1`). |
| `kind` | string | No | Filter the result to ResourceTemplates whose `spec.target.kind` equals this value (for example `MCPServer`). |

## Responses

### 200 — The list of ResourceTemplates.

`application/json`

A list of ResourceTemplates visible to you: Diagrid-managed (built-in) templates and your organization's own. When a built-in and an organization-owned template share the same name, both are returned; use spec.source to tell them apart.

- `apiVersion` (string)
- `kind` (string)
- `items` (object[])
  - `apiVersion` (string)
  - `kind` (string)
  - `metadata` (object)
    - `name` (string)
    - `uid` (string)
    - `resourceVersion` (integer)
    - `createdAt` (string)
    - `updatedAt` (string)
    - `deletedAt` (string)
    - `labels` (object<string, string>)
    - `annotations` (object)
  - `spec` (object) — Required.
    - `catalog` (object) — Required.
      - `displayName` (string) — Required.
      - `description` (string)
      - `provider` (string)
      - `iconUrl` (string)
      - `tags` (string[])
      - `version` (string) — Required.
    - `target` (object) — Required.
      - `apiVersion` (string) — Required.
      - `kind` (string) — Required.
    - `body` — Required.
    - `options` (object[]) — Options offers sets of mutually-exclusive choices to the user. Each selected choice overlays a JSON fragment onto the body. Dimension keys and choice IDs are opaque strings defined by the template author. Omit for templates with a single fixed body.
      - `key` (string) — Required. Key identifies the dimension within the template. An opaque, author-defined identifier (e.g. "auth"); unique within the template.
      - `displayName` (string) — DisplayName is an optional human label for the dimension.
      - `default` (string) — Default is the ID of the choice to pre-select. When empty the consumer picks (typically the first choice). Must match one of Choices[].ID.
      - `choices` (object[]) — Required. Choices are the mutually-exclusive options; at least one is required. Min items: 1.
        - `id` (string) — Required. ID identifies the choice within its dimension. An opaque, author-defined identifier; unique within the dimension.
        - `displayName` (string) — DisplayName is an optional human label for the choice.
        - `fragment` — Fragment is deep-merged onto the template body when this choice is selected. A nil Fragment means the base body already represents this choice (e.g. an authless default). When set it must be a JSON object.
    - `source` (string)
    - `hash` (string) — Hash is a content hash of the source for built-in templates, used to detect changes. Empty on custom (user-owned) templates.
    - `disabled` (boolean) — Disabled hides this template — and any built-in template it overrides — from the organization's catalog.
  - `status` (object)
    - `status` (string)
    - `messages` (object[])
      - `message` (string)
    - `conditions` (object[])
      - `type` (string)
      - `status` (string)
      - `reason` (string)
      - `message` (string)
      - `lastTransitionTime` (string)

`application/vnd.api+json`

- `data` (object) — A list of ResourceTemplates visible to you: Diagrid-managed (built-in) templates and your organization's own. When a built-in and an organization-owned template share the same name, both are returned; use spec.source to tell them apart.
  - `apiVersion` (string)
  - `kind` (string)
  - `items` (object[])
    - `apiVersion` (string)
    - `kind` (string)
    - `metadata` (object)
      - `name` (string)
      - `uid` (string)
      - `resourceVersion` (integer)
      - `createdAt` (string)
      - `updatedAt` (string)
      - `deletedAt` (string)
      - `labels` (object<string, string>)
      - `annotations` (object)
    - `spec` (object) — Required.
      - `catalog` (object) — Required.
        - `displayName` (string) — Required.
        - `description` (string)
        - `provider` (string)
        - `iconUrl` (string)
        - `tags` (string[])
        - `version` (string) — Required.
      - `target` (object) — Required.
        - `apiVersion` (string) — Required.
        - `kind` (string) — Required.
      - `body` — Required.
      - `options` (object[]) — Options offers sets of mutually-exclusive choices to the user. Each selected choice overlays a JSON fragment onto the body. Dimension keys and choice IDs are opaque strings defined by the template author. Omit for templates with a single fixed body.
        - `key` (string) — Required. Key identifies the dimension within the template. An opaque, author-defined identifier (e.g. "auth"); unique within the template.
        - `displayName` (string) — DisplayName is an optional human label for the dimension.
        - `default` (string) — Default is the ID of the choice to pre-select. When empty the consumer picks (typically the first choice). Must match one of Choices[].ID.
        - `choices` (object[]) — Required. Choices are the mutually-exclusive options; at least one is required. Min items: 1.
          - `id` (string) — Required. ID identifies the choice within its dimension. An opaque, author-defined identifier; unique within the dimension.
          - `displayName` (string) — DisplayName is an optional human label for the choice.
          - `fragment` — Fragment is deep-merged onto the template body when this choice is selected. A nil Fragment means the base body already represents this choice (e.g. an authless default). When set it must be a JSON object.
      - `source` (string)
      - `hash` (string) — Hash is a content hash of the source for built-in templates, used to detect changes. Empty on custom (user-owned) templates.
      - `disabled` (boolean) — Disabled hides this template — and any built-in template it overrides — from the organization's catalog.
    - `status` (object)
      - `status` (string)
      - `messages` (object[])
        - `message` (string)
      - `conditions` (object[])
        - `type` (string)
        - `status` (string)
        - `reason` (string)
        - `message` (string)
        - `lastTransitionTime` (string)

### default — Unexpected error.

`application/json`

In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.

- `code` (string) — Required. This is the same as the HTTP status of the response.
- `message` (string) — Required. A short description of the error.
- `status` (object) — Required. A status code that indicates the error type.
- `details` (object) — Additional details about the errors.
  - `@type` (string) — The type of error.
  - `reason` (string) — A reason for the error.
  - `domain` (string) — The domain in which the error occurred.
  - `metadata` (object) — Additional metadata about the error.

`application/vnd.api+json`

JSONAPI.org specification error response wrapper for UI.

- `error` (object) — In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.
  - `code` (string) — Required. This is the same as the HTTP status of the response.
  - `message` (string) — Required. A short description of the error.
  - `status` (object) — Required. A status code that indicates the error type.
  - `details` (object) — Additional details about the errors.
    - `@type` (string) — The type of error.
    - `reason` (string) — A reason for the error.
    - `domain` (string) — The domain in which the error occurred.
    - `metadata` (object) — Additional metadata about the error.
- `meta` (object<string, object>) — Link members related to the primary data.
  - One of:
    - **string (uri-reference)** — A string containing the link's URL.
    - **object**
      - `href` (string (uri-reference)) — Required. A string containing the link's URL.
      - `meta` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
- `links` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
