---
title: "リトリーブテンプレート"
slug: "retrieve-templates"
abstract: "Sitecore PersonalizeテンプレートREST APIを使ってウェブテンプレートや意思決定テンプレートを取得する方法を説明しています。"
---
# リトリーブテンプレート

GET /v3/templates

すべてのテンプレートを取得します。

レスポンスでは、items配列内のすべてのオブジェクトで、refキーにテンプレート参照が含まれています。

例えば、テンプレート参照を使って特定のテンプレートとやり取りしたり、[取得したり更新](https://doc.sitecore.com/personalize/ja/developers/api/rest-apis/template-rest-api/update-a-template.html "Update a template")したりします。[](https://doc.sitecore.com/personalize/ja/developers/api/rest-apis/template-rest-api/retrieve-a-template.html "Retrieve a template")

curl -X GET '<baseURL>/v3/templates' \\
-H 'Authorization: Bearer <accessToken>' \\
-H 'Accept: application/json'

{
 "href": "<baseURL>/v3/templates",
 "items": 
 {
 "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
 "href": "<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
 "ref": "340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
 "name": "Alert bar template 1",
 "description": "Alert bar template WEB",
 "modifiedByRef": "zwxCA58jwLzfeU2mNGgalCpoJzNVYOJl@clients",
 "modifiedAt": "2026-07-12T10:\`56:46\`.53994Z",
 "revision": 1,
 "archived": false,
 "friendlyId": "alert\_bar\_template\_1",
 "type": "WEB",
 "status": "DRAFT",
 "templateElements": 
 {
 "id": "html",
 "template": "<div id=\\"test\\">My test div</div>"
 },
 {
 "id": "css",
 "template": "#test {text-transform: uppercase}"
 },
 {
 "id": "js",
 "template": "insertHTMLBefore(\\"body\\");\\n\\nconst testDiv = document.querySelector(\\"#test\\");\\ntestDiv.insertAdjacentHTML(\\"afterbegin\\", \\"<p>Hello from JavaScript</p>\\")"
 },
 {
 "id": "freemarker",
 "template": "{}"
 }
 ,
 "render": false,
 "defaultTemplate": false,
 "tags": ,
 "customTemplate": true
 }
 
}