# Get a ResourceTemplate

`GET /apis/cra.diagrid.io/v1beta1/resourcetemplates/{templateName}`

Retrieve a ResourceTemplate by name. If your organization has its own template with that name it is returned; otherwise the Diagrid-managed (built-in) template is returned.

## Request

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `templateName` | string | Yes | Name of the ResourceTemplate. Used as the path identifier on the org-scoped templates collection. |

## Responses

### 200 — The requested ResourceTemplate.

`application/json`

- `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)

Example:

```json
{
  "apiVersion": "cra.diagrid.io/v1beta1",
  "kind": "ResourceTemplate",
  "metadata": {
    "name": "github-mcpserver"
  },
  "spec": {
    "catalog": {
      "displayName": "GitHub",
      "description": "GitHub MCP server",
      "provider": "GitHub",
      "version": "1.0.0"
    },
    "target": {
      "apiVersion": "dapr.io/v1alpha1",
      "kind": "MCPServer"
    },
    "body": {
      "spec": {
        "endpoint": {
          "streamableHTTP": {
            "url": "https://api.githubcopilot.com/mcp/"
          }
        }
      }
    }
  }
}
```

`application/vnd.api+json`

- `data` (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)

### 404 — The ResourceTemplate was not found.

`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.

### 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.
